canonical / multipass

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

Failed to start instance: virtio_net: Could not create vmnet interface #1505

Closed asevans closed 1 month ago

asevans commented 4 years ago

Describe the bug I'm unable to start any multipass instances

To Reproduce How, and what happened?

  1. plug a TOTU 8-in-1 USB-C Hub into computer
  2. multipass launch --name foo --mem 4G --disk 40G

Expected behavior Instance should start

Logs From /Library/Logs/Multipass/multipassd.log:

[2020-04-22T15:48:52.377] [info] [foo] fcntl(F_PUNCHHOLE) failed: host filesystem does not support sparse files: Operation not permitted
[2020-04-22T15:48:52.381] [info] [foo] virtio_net: Could not create vmnet interface, permission denied or no entitlement?

[2020-04-22T15:48:52.382] [info] [foo] process state changed to NotRunning
[2020-04-22T15:48:52.382] [info] [foo] process finished with exit code 1

Additional info

Additional context Removing the USB C hub allows multipass to successfully launch containers again

Saviq commented 4 years ago

Hi @asevans, what about if you use a different --name? Or skip it altogether?

We've seen this issue a couple times, but couldn't get what's going on. I'm starting to think it's reusing the name that's ultimately causing this.

asevans commented 4 years ago

@Saviq neither using a unique --name nor omitting it makes any difference. Same error.

asevans commented 4 years ago

I forgot to note in the original report, this problem also applies to restarting previously created instances. If I have an instance stopped and plug in my USB-C hub, they can't start anymore.

Unfortunately, I don't have any other USB-C hub to test with.

Saviq commented 4 years ago

Thanks @asevans… this is a bit crazy. Your hub has Ethernet in it, which somehow must make macOS / hyperkit confused about the networking setup. Have you tried rebooting with the dock plugged in? Or restarting Multipass when it is plugged in?

$ sudo launchctl unload /Library/LaunchDaemons/com.canonical.multipassd.plist
$ sudo launchctl load /Library/LaunchDaemons/com.canonical.multipassd.plist
asevans commented 4 years ago

@Saviq I tried restarting with the hub plugged in and also restarting multipassd: no luck.

fesplugas commented 4 years ago

Same problem here but no USB-C hub involved. I've uninstalled TunnelBlick just in case but I still have the same issue. As a workaround I've installed VirtualBox but I'm not getting an IPv4.

$ multipass list            
Name                    State             IPv4             Image
moving-lab              Running           N/A              Ubuntu 20.04 LTS
fesplugas commented 4 years ago

Fixed by disabling the "Internet Sharing" option.

image
asevans commented 4 years ago

Disabling "Internet Sharing" for my "USB 10/100/1000 LAN" fixed the problem. I'm not sure why that was turned on, because it wasn't intentional.

If this is a hyperkit issue, it might be worth at least documenting this issue.

Saviq commented 4 years ago

@asevans we obviously will!

Thanks @fesplugas for this hint!

jen20 commented 4 years ago

I've just observed the same here on macOS 10.15.4 - disabling internet sharing allows Multipass to start instances.

AdamTheLang commented 3 years ago

This is infuriating. Keeping me from using multipass on my server. Is there any inkling of a workaround?

Saviq commented 3 years ago

@AdamTheLang did you see the comments above? Disabling Internet Sharing in the Sharing settings should make it go away.

AdamTheLang commented 3 years ago

@Saviq I did in fact see it. It's not an option for me, as I use that server as a gateway machine for its own subnet. Unless you can suggest some other way of configuring a Mac as a router/DHCP server that does not cause this issue?

Saviq commented 3 years ago

@AdamTheLang the only option would be using VirtualBox, then.

This option enabled prevents the use of the default hyperkit backend.

ameenbadri7 commented 2 years ago

Fixed by disabling the "Internet Sharing" option.

image

I LOVE YOU MAN you save my whole month

giuliazanchi commented 1 month ago

Internet sharing is already mentioned as one of the possible causes / factors interfering with networking, so I'm marking this as closed.