canonical / multipass

Multipass orchestrates virtual Ubuntu instances
https://multipass.run
GNU General Public License v3.0
7.77k stars 642 forks source link

No network interfaces found #3225

Open ojan2021 opened 1 year ago

ojan2021 commented 1 year ago

Hello, my vm instance suddenly stopped working as it cannot find my network adapters. When I run multipass networks , I get below message: No network interfaces found. In order to troubleshoot the issue I ran the same command with verbose output and here is the result:

PS C:\Users\Orhan> multipass networks -vvvv
[2023-09-13T11:32:06.736] [trace] [primary] Got VMState: poweroff
[2023-09-13T11:32:06.767] [info] [virtualbox factory] VirtualBox found 0 interface(s)
[2023-09-13T11:32:06.767] [trace] [Network Listing on Windows Platform] PowerShell arguments: Get-NetAdapter, -physical, |, Select-Object, -Property, Name,MediaType,PhysicalMediaType,InterfaceDescription, |, ConvertTo-Csv, -NoTypeInformation, |, Select-Object, -Skip, 1, |, foreach, {, $_, -replace, '^"|"$|"(?=,)|(?<=,)"','', }
[2023-09-13T11:32:06.767] [trace] [Network Listing on Windows Platform] PowerShell working dir ''
[2023-09-13T11:32:06.767] [trace] [Network Listing on Windows Platform] PowerShell program 'powershell.exe'
[2023-09-13T11:32:06.767] [trace] [Network Listing on Windows Platform] [0] PowerShell state changed to Starting
[2023-09-13T11:32:06.767] [trace] [Network Listing on Windows Platform] [0] PowerShell state changed to Running
[2023-09-13T11:32:06.767] [debug] [powershell.exe] [11248] started: powershell.exe Get-NetAdapter -physical | Select-Object -Property Name,MediaType,PhysicalMediaType,InterfaceDescription | ConvertTo-Csv -NoTypeInformation | Select-Object -Skip 1 | foreach { $_ -replace '^"|"$|"(?=,)|(?<=,)"','' }
[2023-09-13T11:32:08.095] [trace] [Network Listing on Windows Platform] [11248] PowerShell state changed to NotRunning
[2023-09-13T11:32:08.095] [debug] [Network Listing on Windows Platform] [11248] PowerShell finished successfully
[2023-09-13T11:32:08.095] [trace] [Network Listing on Windows Platform] [11248] Output:
Ethernet,802.3,802.3,Realtek PCIe GbE Family Controller
Wi-Fi,Native 802.11,Native 802.11,Intel(R) Wi-Fi 6 AX201 160MHz
No network interfaces found.

And also here is my powershell output fot network adapters:

PS C:\Users\Orhan> powershell.exe Get-NetAdapter -physical

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Ethernet                  Realtek PCIe GbE Family Controller           22 Disconnected 24-4B-FE-BA-84-A5          0 bps
Wi-Fi                     Intel(R) Wi-Fi 6 AX201 160MHz                19 Up           34-7D-F6-BB-22-6D       287 Mbps

I am running Windows 10 Pro and using VirtualBox for multipass.

georgeliao commented 1 year ago

Hi, @ojan2021 , Thanks for reporting this issue, multipass networks does nothing but runs the VBoxManage list -l bridgedifs command to retrieve the networks information. So it looks like that virtualbox did not recognize anything. As to why the list is not the same as the Get-NetAdapter produced. Well first, the Ethernet one status is not up, so it kind of make sense that virtualbox did not see it. The Wi-Fi one is more tricky, it could be related to admin right and other virtualbox related stuff.

JudaB commented 11 months ago

Same problem here

`D:\Oracle\VirtualBox>VBoxManage.exe list -l bridgedifs Name: TP-Link Wireless PCI Express Adapter GUID: f9f389a5-eab2-4d0b-a623-9574973710ae DHCP: Enabled IPAddress: 192.168.1.227 NetworkMask: 255.255.255.0 IPV6Address: IPV6NetworkMaskPrefixLength: 0 HardwareAddress: 60:a4:b7:ff:60:cd MediumType: Ethernet Wireless: Yes Status: Up VBoxNetworkName: HostInterfaceNetworking-TP-Link Wireless PCI Express Adapter

Name: VirtualBox Host-Only Ethernet Adapter GUID: 30465020-3302-4a76-b3a6-afb588384001 DHCP: Disabled IPAddress: 0.0.0.0 NetworkMask: 0.0.0.0 IPV6Address: IPV6NetworkMaskPrefixLength: 0 HardwareAddress: 00:00:00:00:00:00 MediumType: Ethernet Wireless: No Status: Down VBoxNetworkName: HostInterfaceNetworking-VirtualBox Host-Only Ethernet Adapter

Name: Realtek PCIe GbE Family Controller GUID: 4a58aeba-c694-4489-9519-02d6104a2257 DHCP: Disabled IPAddress: 10.100.102.41 NetworkMask: 255.255.255.0 IPV6Address: IPV6NetworkMaskPrefixLength: 0 HardwareAddress: 0c:9d:92:82:1b:85 MediumType: Ethernet Wireless: No Status: Down VBoxNetworkName: HostInterfaceNetworking-Realtek PCIe GbE Family Controller D:\Oracle\VirtualBox>

Must say it was working 30 minutes ago ;( D:\Oracle\VirtualBox>multipass networks No network interfaces found. D:\Oracle\VirtualBox>

did uninstall to both virtualBox and MultiPass

`

georgeliao commented 11 months ago

@JudaB , Thanks for reporting this.

First, one side note is that it would be nice if you could format the code part so it is easier to read.

Coming back to the issue, based on your terminal output, it looks like that VBoxManage.exe list -l bridgedifs and multipass networks output different network interface list. Did you run them roughly at the same time? It is kind if surprising.

limfjm commented 8 months ago

@ojan2021, Were you able to solve the issue? I encountered the same issue on Windows 11

limfjm commented 8 months ago

Hi, @ojan2021 , Thanks for reporting this issue, multipass networks does nothing but runs the VBoxManage list -l bridgedifs command to retrieve the networks information. So it looks like that virtualbox did not recognize anything. As to why the list is not the same as the Get-NetAdapter produced. Well first, the Ethernet one status is not up, so it kind of make sense that virtualbox did not see it. The Wi-Fi one is more tricky, it could be related to admin right and other virtualbox related stuff.

@georgeliao, I got the same issue even the Ethernet is up. Any suggestions to solve the issue?

georgeliao commented 8 months ago

Hi @limfjm , thanks for reporting.

Can you show us the output of powershell.exe Get-NetAdapter -physical and VBoxManage list -l bridgedifs first?

limfjm commented 8 months ago

Hi @limfjm , thanks for reporting.

Can you show us the output of powershell.exe Get-NetAdapter -physical and VBoxManage list -l bridgedifs first?

@georgeliao, Please see below the results:

For powershell.exe Get-NetAdapter -physical

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
Wi-Fi                     Intel(R) Wi-Fi 6 AX201 160MHz                23 Up           8C-B8-7E-F3-ED-AA       780 Mbps
Ethernet                Realtek PCIe GbE Family Controller          10 Up           6C-24-08-18-05-B5          1 Gbps

For 'VBoxManage list -l bridgedifs, no result has been displayed

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list -l bridgedifs

C:\Program Files\Oracle\VirtualBox>VBoxManage list -l bridgedifs

C:\Program Files\Oracle\VirtualBox>
georgeliao commented 8 months ago

ok, it is clear that virtualbox is unable to detect any available network interfaces which leads to multipass showing nothing. This may have something to do with VirtualBox's version, configuration, bridge network driver, etc. Can you try something here https://stackoverflow.com/a/55877129 and see if it fix on the VirtualBox end?