Open TwoLeggedCat opened 3 years ago
Hi @TwoLeggedCat, make sure you have Internet Sharing disabled in Settings/Sharing.
Hi @TwoLeggedCat, make sure you have Internet Sharing disabled in Settings/Sharing.
Thanks for the hasty reply; I do.
@TwoLeggedCat you mean you do have it disabled? This error pops up when macOS prevents the VM from creating its network. You may try enabling Internet Sharing and disabling it again, that could clear some internal macOS state. Rebooting could also help. Let us know please!
@Saviq yes, I have Internet Sharing disabled, and haven’t had it enabled in about a year to my memory. I’ll try rebooting and then disconnecting again when I get back to my computer.
@Saviq I went through the following steps:
multipass launch focal
(name solid-roadrunner)multipass shell solid-roadrunner
and sudo shutdown now
multipass shell solid-roadrunner
:
start failed: The following errors occurred:
Instance stopped while starting
At this point, multipass list
still shows that solid-roadrunner is "Starting."
Edit: woops, accidentally closed this.
Thanks @TwoLeggedCat, so it's this that makes it go bad:
[2021-09-06T10:17:34.502] [info] [solid-roadrunner] virtio_net: Could not create vmnet interface, permission denied or no entitlement?
Hyperkit tries to set up networking, but macOS is in a state preventing that. If you then reboot without the iPhone plugged in, does it work ok? What about if you enable and disable Internet Sharing?
@Saviq enabling and disabling Internet Sharing changed nothing; rebooting with the iPhone unplugged allowed me to launch it. After plugging the iPhone back in, I could still launch the instance. It seems it only starts to break when I unplug the iPhone, not when I plug it in.
Thanks @TwoLeggedCat, unfortunately it's an unsolved issue in xhyve/hyperkit, there's a number of unanswered issues out there (machine-drivers/docker-machine-driver-xhyve#85, machine-drivers/docker-machine-driver-xhyve#107).
That said, we're moving to QEMU as our preferred VM backend on macOS, it would be interesting if the issue is seen there as well. If you're willing, please try this installer:
And use sudo multipass set local.driver=qemu
to switch to that backend. Note you will lose access (but not data) to existing VMs. To switch back, sudo multipass set local.driver=hyperkit
.
@Saviq, with local.driver
set to qemu
, I get the following (after creating the tireless-rodent on iPhone USB since I needed to download the image and then disconnecting the phone):
~ % m shell tireless-rodent
start failed: The following errors occurred:
Failed to start interface: generic failure
Hint: vmnet requires running with root access
qemu-system-x86_64: -netdev vmnet-macos,mode=shared,id=hostnet0: Device 'vmnet-macos' could not be initialized
tireless-rodent: shutdown called while starting
Using that build with qemu did seem to fix all the problems with multipass list
but I'm assuming that's unrelated.
Also, to confirm:
~ % multipass --version
multipass 1.8.0-dev.404.pr403+g4f730915.mac
multipassd 1.8.0-dev.404.pr403+g4f730915.mac
Yeah so that's the same problem - macOS doesn't allow to use the virtual network subsystem for some reason. Thanks for diving in, we'll need to look for potential solutions to this.
Just a note, I managed to recreate this problem with multipass 1.8.0 by ctrl-c'ing (aggressively) during a launch when I didn't want to continue launching that machine (wrong default image/alias). This was on an M1 Macbook Pro running Monterey 12.3.1. Thought this might give you a starting point for a reproducible case for diagnosing and debugging the issue!
ubuntu@sanctified-cardinal:~$ exit
logout
~ multipass delete sanctified-cardinal
~ multipass launch
Starting inspiring-pratincole |^C⏎
~ multipass list
Name State IPv4 Image
primary Deleted -- Not Available
inspiring-pratincole Unknown -- Ubuntu 20.04 LTS
sanctified-cardinal Deleted -- Not Available
vocal-bellbird Deleted -- Not Available
~ multipass delete inspiring-pratincole
~
~ multipass list
Name State IPv4 Image
primary Deleted -- Not Available
inspiring-pratincole Deleted -- Not Available
sanctified-cardinal Deleted -- Not Available
vocal-bellbird Deleted -- Not Available
~ multipass purge
~ multipass launch
launch failed: The following errors occurred:
Failed to start interface: generic failure
Hint: vmnet requires running with root access
qemu-system-aarch64: -nic vmnet-macos,mode=shared,model=virtio-net-pci,mac=52:54:00:79:8d:24: Device 'vmnet-macos' could not be initialized
My internet connection currently comes from an iPhone hotspot over a lightning cable. After removing all instances, I can create a new one with
I then stopped the instance with
sudo shutdown now
, unplugged the iPhone, and tried to launch it again withm shell pet-gadwall
:The last few lines of
/Library/Logs/Multipass/multipassd.log
:Stopping the daemon with
sudo kill pid
and attempting to launch the instance the same way succeeds as normal.The daemon is running as root.
macOS Catalina version 10.15.7 (19H1323)
I installed Multipass using the pkg file from GitHub releases, not Homebrew (nor do I have Homebrew on this machine).
Also worth noting is that, when I use
m list
after receiving the startup error, the instance's state is shown as "Starting." Stopping the instance appears to run as normal but has no effect; I can still not start it again after doing so and the state is still shown as "Starting." I can also start a new instance after making the network change, I just cannot start one that was running with internet after disconnecting from the internet (until I restart the daemon).