New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multipass fails to launch on raspberry pi 4 with 18.04 because of missing qemu parameter #1376
Comments
Yes, we need to be better about detecting the host architecture and then setting any specific |
Huh I could've sworn I replied here… I wonder why |
Somehow QEMU on ARM and ARM64 did not have default machine set and can be set by recompiling the QEMU only. So maybe try adding the -machine flag when run on ARM? And I think the reason of not setting default -machine flag is this (From Documentation/Platforms/ARM):
They said that we can use -machine virt for just virtual machine |
What's the status of this bug? Is it within the scope of multipass to just add this argument when running on i.e. Raspberry Pi? |
Hi @anonymouse64 we're working hard on a LXD backend (will be an option within a couple weeks), at which point it's LXD that will handle qemu, and not Multipass, directly. You should already be able to try this out with LXD directly for the moment. |
Does not work when building tmux on Raspberry Pi 3 either: user@rbpi3:~/git/snap-tmux$ snapcraft --debug
Launching a VM.
launch failed: Internal error: qemu-system-x86_64 failed getting vmstate (Process returned exit code: 1) with output:
qemu-system-aarch64: -nographic: No machine specified, and there is no default
Use -machine help to list supported machines
An error occurred with the instance when trying to launch with 'multipass': returned exit code 2.
Ensure that 'multipass' is setup correctly and try again. Output from log: sudoer@rbpi3:~$ sudo snap logs multipass
2020-06-23T20:59:56Z multipassd[1242]: process arguments '--enable-kvm, -device, virtio-scsi-pci,id=scsi0, -drive, file=/var/snap/multipass/common/data/multipassd/vault/instances/test18/ubuntu-18.04-server-cloudimg-arm64.img,if=none,format=qcow2,discard=unmap,id=hda, -device, scsi-hd,drive=hda,bus=scsi0.0, -smp, 1, -m, 1024M, -device, virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:f1:5c:b6, -netdev, tap,id=hostnet0,ifname=tap-dd34acb92a4,script=no,downscript=no, -qmp, stdio, -cpu, host, -chardev, null,id=char0, -serial, chardev:char0, -nographic, -cdrom, /var/snap/multipass/common/data/multipassd/vault/instances/test18/cloud-init-config.iso'
2020-06-23T20:59:57Z multipassd[1242]: qemu-system-aarch64:
2020-06-23T20:59:57Z multipassd[1242]: qemu-system-aarch64: -nographic: No machine specified, and there is no default
Use -machine help to list supported machines
2020-06-23T20:59:57Z multipassd[1242]: attempting to release non-existant addr: 52:54:00:76:0b:b2
2020-06-23T20:59:57Z dnsmasq[1466]: reading /etc/resolv.conf
2020-06-23T20:59:57Z dnsmasq[1466]: using local addresses only for domain multipass
2020-06-23T20:59:57Z dnsmasq[1466]: using nameserver 127.0.0.53#53
2020-06-23T20:59:57Z dnsmasq[1466]: reading /etc/resolv.conf
2020-06-23T20:59:57Z dnsmasq[1466]: using local addresses only for domain multipass
2020-06-23T20:59:57Z dnsmasq[1466]: using nameserver 127.0.0.53#53 |
the error message here trying this is now a little confusing, I can't tell if it's trying to use qemu-system-x86_64 or not ...
|
Hey @anonymouse64, The |
Actually, it wasn't added too recent and I'm the one who did it, lol |
Hi @townsend2010 👋
|
Hi @tbalthazar, At this time, the only thing I can think of is to install the LXD snap and switch to using the LXD driver in multipass via:
Hope this helps! |
Thanks @townsend2010, it did help! $ sudo snap install lxd
$ sudo lxd init --auto
$ sudo snap connect multipass:lxd lxd
$ sudo multipass set local.driver=lxd
$ multipass launch
$ 🎉 |
Something doesn't work, creating a VM times out and they don't get an IP: $ multipass list
Name State IPv4 Image
doting-sole Running UNKNOWN Ubuntu 18.04 LTS
opulent-mosquito Running UNKNOWN Ubuntu 18.04 LTS I cannot delete/stop them: ubuntu@ubuntu:~$ multipass stop doting-sole
stop failed: unix:///var/snap/lxd/common/lxd/unix.socket@1.0/operations/cb6da465-0fb3-4f80-9c56-f22452353f11/wait?project=multipass: Operation canceled I'll investigate... |
I had the same experience as @tbalthazar, so I tried just using lxd directly and didn't get much further,
Probably worth an upstream LXD issue/bug report. |
Seems maybe LXD's |
here are the Multipass logs (
and when I try to stop a VM that's running without an IP:
There are no logs in |
Hi @tbalthazar, I wonder what LXD thinks about these instances. After launching an instance, could you please run:
and post the output? At the least the image hash you posted above lets me know that it is indeed downloading the arm64 image. Thanks! |
Hey @townsend2010, Thanks for getting back to me. ubuntu@ubuntu:~$ sudo snap install lxd
lxd 4.4 from Canonical✓ installed
ubuntu@ubuntu:~$ sudo snap install multipass --candidate
multipass (candidate) 1.3.0 from Canonical✓ installed
ubuntu@ubuntu:~$ sudo lxd init --auto
ubuntu@ubuntu:~$ sudo snap connect multipass:lxd lxd
ubuntu@ubuntu:~$ sudo multipass set local.driver=lxd
ubuntu@ubuntu:~$ multipass launch
launch failed: The following errors occurred:
evocative-gar: timed out waiting for response
ubuntu@ubuntu:~$ multipass list
Name State IPv4 Image
evocative-gar Running UNKNOWN Ubuntu 18.04 LTS
ubuntu@ubuntu:~$ lxc list --project=multipass
To start your first instance, try: lxc launch ubuntu:18.04
+---------------+---------+------+------+-----------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------------+---------+------+------+-----------------+-----------+
| evocative-gar | RUNNING | | | VIRTUAL-MACHINE | 0 |
+---------------+---------+------+------+-----------------+-----------+
ubuntu@ubuntu:~$ lxc show evocative-gar --project=multipass
Error: unknown command "show" for "lxc"
Did you mean this?
stop
ubuntu@ubuntu:~$ lxc info evocative-gar --project=multipass
Name: evocative-gar
Location: none
Remote: unix://
Architecture: aarch64
Created: 2020/08/03 13:39 UTC
Status: Running
Type: virtual-machine
Profiles: default
Pid: 4109122
Ips:
eth0: inet6 fe80::216:3eff:febb:576d tapd2c8ae55
Resources:
Processes: -1
Network usage:
eth0:
Bytes received: 0B
Bytes sent: 0B
Packets received: 0
Packets sent: 0 Let me know if I can provide more info. |
Hey @tbalthazar, Thanks! Sorry about the wrong As suspected, there is something wrong with the networking. Could you please provide the following:
If you see a
and
Thanks! |
here you are @townsend2010 😉 ubuntu@ubuntu:~$ lxc network list
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
| NAME | TYPE | MANAGED | IPV4 | IPV6 | DESCRIPTION | USED BY |
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
| cni0 | bridge | NO | | | | 0 |
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
| docker0 | bridge | NO | | | | 0 |
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
| eth0 | physical | NO | | | | 0 |
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
| lxdbr0 | bridge | YES | 10.189.31.1/24 | fd42:7e7a:704c:6cc0::1/64 | | 1 |
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
| mpbr0 | bridge | YES | 10.5.101.1/24 | fd42:9ef7:1148:4f27::1/64 | Network bridge for Multipass | 2 |
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
| wlan0 | physical | NO | | | | 0 |
+---------+----------+---------+----------------+---------------------------+------------------------------+---------+
ubuntu@ubuntu:~$ lxc network show mpbr0
config:
ipv4.address: 10.5.101.1/24
ipv4.nat: "true"
ipv6.address: fd42:9ef7:1148:4f27::1/64
ipv6.nat: "true"
volatile.bridge.hwaddr: 00:16:3e:68:06:6c
description: Network bridge for Multipass
name: mpbr0
type: bridge
used_by:
- /1.0/instances/evocative-gar?project=multipass
- /1.0/profiles/default?project=multipass
managed: true
status: Created
locations:
- none
ubuntu@ubuntu:~$ lxc network info mpbr0
Name: mpbr0
MAC address: 00:16:3e:68:06:6c
MTU: 1500
State: up
Ips:
inet 10.5.101.1
inet6 fd42:9ef7:1148:4f27::1
inet6 fe80::216:3eff:fe68:66c
Network usage:
Bytes received: 5.01kB
Bytes sent: 6.05kB
Packets received: 27
Packets sent: 34 |
Hey @tbalthazar, So I looked through LXD issues and we seem we might be hitting https://github.com/lxc/lxd/issues/7191 and particularly https://github.com/lxc/lxd/issues/7191#issuecomment-613775164. |
Thanks for looking into it @townsend2010 🤔 |
Maybe |
No luck: ubuntu@ubuntu:~$ lxc list --project=multipass
+---------------+---------+------+------+-----------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------------+---------+------+------+-----------------+-----------+
| evocative-gar | RUNNING | | | VIRTUAL-MACHINE | 0 |
+---------------+---------+------+------+-----------------+-----------+
ubuntu@ubuntu:~$ sudo lxc config set evocative-gar security.secureboot=false
Error: not found
ubuntu@ubuntu:~$ sudo lxc config set security.secureboot=false
Error: cannot set 'security.secureboot' to 'false': unknown key
ubuntu@ubuntu:~$ sudo lxc config set security.secureboot=0
Error: cannot set 'security.secureboot' to '0': unknown key |
You need |
Right, so try
If we're lucky, that should do it! |
Thanks for bearing with me! ubuntu@ubuntu:~$ sudo lxc config set evocative-gar security.secureboot=false --project=multipass
Error: Only user.* keys can be updated on running VMs
ubuntu@ubuntu:~$ sudo lxc stop evocative-gar --project=multipass --force
ubuntu@ubuntu:~$ lxc config set evocative-gar security.secureboot=false --project=multipass
ubuntu@ubuntu:~$ multipass start evocative-gar
ubuntu@ubuntu:~$ multipass ls
Name State IPv4 Image
evocative-gar Running 10.5.101.9 Ubuntu 18.04 LTS
ubuntu@ubuntu:~$ multipass shell evocative-gar
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-112-generic aarch64) Thanks a lot for your help, @townsend2010, it worked. 🎉 Any rough idea about when this could be fixed upstream so we have the same seamless experience of Anyway, thanks again for your help and all your work on multipass! 🙏 |
Awesome that it works now! Too bad about having to jump through so many hoops to get it going. Here is the upstream bug for UEFI secure boot on arm64: https://bugs.launchpad.net/ubuntu/+source/shim/+bug/1862279 I've no idea if the signed shim on arm64 will be backported to 18.04. |
@tbalthazar @townsend2010 I think the commands only works on ubuntu 18.04. When I tried the first command in ubuntu 20.04, it returned as of |
@zfeng8 correct, on 18:04 it return |
👋 Hello amazing people. I just wanted to report the same issue on Raspberry Pi 4, running Ubuntu 20.04. $ multipass launch
launch failed: Internal error: qemu-system-x86_64 failed getting vmstate (Process returned exit code: 1) with output:
qemu-system-aarch64: -nographic: No machine specified, and there is no default
Use -machine help to list supported machines Doesn't look like there's a resolution yet, but if there's any way I can help, please let me know |
Same error with me. Fresh ubuntu focal arm64 host (8cpus, 64Gb of ram, this ain't no pi4):
snap logs shows:
I hit this when I was trying to build a snap on arm64 using snapcraft. The default experience will hit this bug, as multipass is the default build environment. |
Hi @panlinux, we're moving to LXD as our default KVM backend very soon, could you please verify that you can |
Nope, that did not work:
Log has:
|
I filed an lxd bug about that: https://github.com/lxc/lxd/issues/7846 |
@panlinux now the fix got merged you should be able to: $ snap refresh lxd --channel edge
$ snap refresh multipass --channel edge # stable should work for the most part, too
$ snap connect multipass:lxd lxd:
$ multipass set local.driver=lxd
$ multipass launch |
@Saviq thanks for the heads-up. It didn't work for me:
|
Hey @tbalthazar, The original |
@townsend2010 I tried again and it still doesn't work.
|
Hi @tbalthazar, Hmm, LXD is not happy with something we are sending it. Could you run in a separate terminal |
@townsend2010 that's what I get:
|
Hey @tbalthazar, Well, First thing to do is:
then do: Then from |
here you are @townsend2010 :
|
So, there are no fix for this? Using Ubuntu 20.04 on Pi 4, getting the same error. |
@Dibbyo456 did you try with the LXD driver? |
@Saviq Thank you so much for getting back to me. I'm kinda linux noob. Can you please give me all the commands step by step? |
For the benefit of those playing at home, here's the commands you should run to install and setup multipass with lxd set as the driver on a Raspberry Pi 4 (tested using on aarch64 Ubuntu 21.04):
|
Multipass 1.8.0 is now in the |
Launching a VM on a raspberry pi 4 with ubuntu server 18.04 fails:
It seems that when launching an image on ARM64 hosts, multipass does not add the necessary
-machine=virt
parameter.Launching a virtual machine with qemu with those parameters and
-machine=virt
added, it launches and runs fine. It looks like multipass just needs to add that parameter when launching on arm64 hosts?system info:
The text was updated successfully, but these errors were encountered: