cbc02009
(Cbc02009)
1
I’m trying to create an empty vm to install an OS (Manjaro) via ISO, but I’m running into an error I can’t figure out.
To setup the VM, I ran lxc init VM-NAME --empty --vm
then manually added the ISO to the devices in the config file.
When I try to start the VM using lxc start VM-NAME
I get the following error:
Error: lstat /usr/share/edk2-ovmf/x64/OVMF_VARS.ms.fd: no such file or directory
Has anyone run into this issue before and knows how to fix it? I’m really not even sure where to start.
tomp
(Thomas Parrott)
2
Are you running LXD 4.14? It has a commit to address this:
Also this may help in the next release too:
cbc02009
(Cbc02009)
3
Yes, I am running LXD 4.14. Just double-checked. Is there some sort of re-init I might need to do?
I also see that when I run lxc info --show-log VM-NAME
I get the following output:
Name: VM-NAME
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/05/23 17:16 UTC
Status: Stopped
Type: virtual-machine
Profiles: vm-default
Error: open /var/log/lxd/VM-NAME/qemu.log: no such file or directory
Not sure if they’re related.
tomp
(Thomas Parrott)
4
Do you have OVMF_VARS.ms.fd
on your system anywhere?
cbc02009
(Cbc02009)
5
Running sudo find / -name OVMF_VARS.ms.fd
doesn’t returning anything, so I guess not?
This is the ls -al /usr/share/edk2-ovmf/x64/
output:
total 3454
drwxr-xr-x 2 root root 6 May 17 19:10 ./
drwxr-xr-x 4 root root 4 May 17 19:10 ../
-rw-r--r-- 1 root root 1966080 Mar 11 14:34 OVMF_CODE.fd
-rw-r--r-- 1 root root 1966080 Mar 11 14:34 OVMF_CODE.secboot.fd
-rw-r--r-- 1 root root 2097152 Mar 11 14:34 OVMF.fd
-rw-r--r-- 1 root root 131072 Mar 11 14:34 OVMF_VARS.fd
Is it possible that OVMF_VARS.fd
is what I need and it’s just misnamed?
tomp
(Thomas Parrott)
6
There’s a section about LXD VMs in the Arch wiki:
https://wiki.archlinux.org/title/LXD#Starting_a_virtual_machine_fails
If you see the error: Error: Required EFI firmware settings file missing: /usr/share/ovmf/x64/OVMF_VARS.ms.fd
Arch Linux does not distribute secure boot signed ovmf firmware, to boot virtual machines you need to disable secure boot for the time being.
$ lxc launch ubuntu:18.04 test-vm --vm -c security.secureboot=false
This can also be added to the default profile by doing:
$ lxc profile set default security.secureboot=false
cbc02009
(Cbc02009)
7
I’ve read that a hundred times, I can’t believe I missed that. Thank you so much!
Now on to the next error…
$ lxc start VM-NAME
Error: Failed to run: forklimits limit=memlock:unlimited:unlimited -- /usr/bin/qemu-system-x86_64 -S -name VM-NAME -uuid d505af76-9c93-4174-95fb-3c32307b8df1 -daemonize -cpu host -nographic -serial chardev:console -nodefaults -no-reboot -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=deny,resourcecontrol=deny -readconfig /var/log/lxd/VM-NAME/qemu.conf -spice unix=on,disable-ticketing=on,addr=/var/log/lxd/VM-NAME/qemu.spice -pidfile /var/log/lxd/VM-NAME/qemu.pid -D /var/log/lxd/VM-NAME/qemu.log -chroot /var/lib/lxd/virtual-machines/VM-NAME -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas nobody: char device redirected to /dev/pts/8 (label console)
: Process exited with a non-zero value
Try `lxc info --show-log VM-NAME` for more info
chris@Uiharu:~$ lxc info --show-log VM-NAME
Name: VM-NAME
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/05/23 17:16 UTC
Status: Stopped
Type: virtual-machine
Profiles: vm-default
Log:
qemu-system-x86_64:/var/log/lxd/VM-NAME/qemu.conf:54: Failed to lock byte 100
Should I start a new thread for this?
tomp
(Thomas Parrott)
8
Yes I think that would help others find it in the future, as this is a VM start issue rather than creation issue too. Thanks
1 Like