Can not launch LXD vm on vmware fusion host machine

I install Ubuntu 22.04 server on VMware fusion (mac), and when I run kvm-ok on the ubuntu vm everything seemed good:

INFO: /dev/kvm exists
KVM acceleration can be used

But, when I want to create a VM:

lxc launch images:ubuntu/22.04 vm1 --vm

I get this error:

Error: Failed to run: forklimits limit=memlock:unlimited:unlimited fd=3 -- /snap/lxd/23541/bin/qemu-system-x86_64 -S -name vm1 -uuid 4912d38d-9bff-407d-b915-a5336dcc9fcc -daemonize -cpu host,hv_passthrough -nographic -serial chardev:console -nodefaults -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=allow,resourcecontrol=deny -readconfig /var/snap/lxd/common/lxd/logs/vm1/qemu.conf -spice unix=on,disable-ticketing=on,addr=/var/snap/lxd/common/lxd/logs/vm1/qemu.spice -pidfile /var/snap/lxd/common/lxd/logs/vm1/qemu.pid -D /var/snap/lxd/common/lxd/logs/vm1/qemu.log -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas lxd: : Process exited with non-zero value 1
Try `lxc info --show-log lxds:vm1` for more info

This is the result of the log:

lxc info --show-log vm1                                                                                                                                          67% ▆ 
Name: vm1
Status: STOPPED
Type: virtual-machine
Architecture: x86_64
Created: 2023/01/14 10:01 CET

Log:

qemu-system-x86_64: error: failed to set MSR 0x48d to 0x5600000016
qemu-system-x86_64: ../target/i386/kvm/kvm.c:2996: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.

Thats a QEMU crash.

Searching for that error lead me here:

Does that help?

+1. I do have the same issue here.
Host on Openssue15.4.
Old vms does not seem to start anymore after upgrade.

lxc start ubuntuClient 
Error: Failed to run: forklimits limit=memlock:unlimited:unlimited fd=3 -- /usr/bin/qemu-system-x86_64 -S -name ubuntuClient -uuid 6ab4cf04-3ec9-4430-8c49-e9ae6b29f432 -daemonize -cpu host,hv_passthrough -nographic -serial chardev:console -nodefaults -no-user-config -sandbox on,obsolete=deny,elevateprivileges=allow,spawn=allow,resourcecontrol=deny -readconfig /var/log/lxd/ace_ubuntuClient/qemu.conf -spice unix=on,disable-ticketing=on,addr=/var/log/lxd/ace_ubuntuClient/qemu.spice -pidfile /var/log/lxd/ace_ubuntuClient/qemu.pid -D /var/log/lxd/ace_ubuntuClient/qemu.log -smbios type=2,manufacturer=Canonical Ltd.,product=LXD -runas nobody: : Process exited with non-zero value 1
Try `lxc info --show-log ubuntuClient` for more info


Log:

qemu-system-x86_64: error: failed to set MSR 0x40000081 to 0x1
qemu-system-x86_64: ../target/i386/kvm/kvm.c:2893: kvm_buf_set_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.
1 Like

@cyphar Hey Aleksa, can you check on this please?
Running on opensuse 5.14.21-150400.24.41-default
lxd --version 5.9
from virtualization:containers reository.
@tomp Is ther anything you sould suggest in order to solve this?

New vms deos not work as well.

lxc launch ubuntu:22.04 ubuntu2 --vm
Creating ubuntu2
Error: Failed instance creation: Failed creating instance record: Instance type "virtual-machine" is not supported on this server: QEMU failed to run feature checks

Take a look at /var/snap/lxd/common/lxd/logs/lxd.log and near the top you should see some additional info near the lines “Instance type operational” (for containers), about why VMs are not operational.

Also LXD 5.10 had some improvements to the way we detect QEMU features, so you may find that works better.

I am on opensuse, not using snap.

Given that I am on opensuse, Will installing lxd from snap take into effect my current data store and installed vms/containers, and will it use my already created bridges?

Unlikely I would say. On ubuntu there is a migration path from deb to snap, but I don’t think the same thing exists/works for OpenSuse

Just had a look into using snap from deb, And if I could make it work with OpenSuse. That would definetly break my server setup.
@cyphar I wonder if could help. Is ther a timeline when we could have 5.10 on OpenSsue 15.4? It is really needed.

Hey @tomp I built from source.
but am getting this issue now

lxc start ubuntu
Error: lstat /usr/share/OVMF: no such file or directory
Try `lxc info --show-log ubuntu` for more info

had a look on Cannot start virtual machines missing OVMF Gentoo

Then

rpm -ql qemu-ovmf-x86_64
/usr/share/licenses/qemu-ovmf-x86_64
/usr/share/licenses/qemu-ovmf-x86_64/License-ovmf.txt
/usr/share/licenses/qemu-ovmf-x86_64/License.txt
/usr/share/qemu
/usr/share/qemu/firmware
/usr/share/qemu/firmware/50-ovmf-x86_64-secure-ms.json
/usr/share/qemu/firmware/50-ovmf-x86_64-secure-opensuse.json
/usr/share/qemu/firmware/50-ovmf-x86_64-secure-suse.json
/usr/share/qemu/firmware/50-ovmf-x86_64-secure.json
/usr/share/qemu/firmware/50-xen-hvm-x86_64.json
/usr/share/qemu/firmware/60-ovmf-x86_64-2m-ms.json
/usr/share/qemu/firmware/60-ovmf-x86_64-2m-opensuse.json
/usr/share/qemu/firmware/60-ovmf-x86_64-2m-suse.json
/usr/share/qemu/firmware/60-ovmf-x86_64-2m.json
/usr/share/qemu/firmware/60-ovmf-x86_64-ms.json
/usr/share/qemu/firmware/60-ovmf-x86_64-opensuse.json
/usr/share/qemu/firmware/60-ovmf-x86_64-suse.json
/usr/share/qemu/firmware/60-ovmf-x86_64.json
/usr/share/qemu/ovmf-x86_64-4m-code.bin
/usr/share/qemu/ovmf-x86_64-4m-vars.bin
/usr/share/qemu/ovmf-x86_64-4m.bin
/usr/share/qemu/ovmf-x86_64-code.bin
/usr/share/qemu/ovmf-x86_64-devel-4m-code.bin
/usr/share/qemu/ovmf-x86_64-devel-4m-vars.bin
/usr/share/qemu/ovmf-x86_64-devel-4m.bin
/usr/share/qemu/ovmf-x86_64-devel-code.bin
/usr/share/qemu/ovmf-x86_64-devel-vars.bin
/usr/share/qemu/ovmf-x86_64-devel.bin
/usr/share/qemu/ovmf-x86_64-ms-4m-code.bin
/usr/share/qemu/ovmf-x86_64-ms-4m-vars.bin
/usr/share/qemu/ovmf-x86_64-ms-4m.bin
/usr/share/qemu/ovmf-x86_64-ms-code.bin
/usr/share/qemu/ovmf-x86_64-ms-vars.bin
/usr/share/qemu/ovmf-x86_64-ms.bin
/usr/share/qemu/ovmf-x86_64-opensuse-4m-code.bin
/usr/share/qemu/ovmf-x86_64-opensuse-4m-vars.bin
/usr/share/qemu/ovmf-x86_64-opensuse-4m.bin
/usr/share/qemu/ovmf-x86_64-opensuse-code.bin
/usr/share/qemu/ovmf-x86_64-opensuse-vars.bin
/usr/share/qemu/ovmf-x86_64-opensuse.bin
/usr/share/qemu/ovmf-x86_64-smm-code.bin
/usr/share/qemu/ovmf-x86_64-smm-devel-code.bin
/usr/share/qemu/ovmf-x86_64-smm-devel-vars.bin
/usr/share/qemu/ovmf-x86_64-smm-devel.bin
/usr/share/qemu/ovmf-x86_64-smm-ms-code.bin
/usr/share/qemu/ovmf-x86_64-smm-ms-vars.bin
/usr/share/qemu/ovmf-x86_64-smm-ms.bin
/usr/share/qemu/ovmf-x86_64-smm-opensuse-code.bin
/usr/share/qemu/ovmf-x86_64-smm-opensuse-vars.bin
/usr/share/qemu/ovmf-x86_64-smm-opensuse.bin
/usr/share/qemu/ovmf-x86_64-smm-suse-code.bin
/usr/share/qemu/ovmf-x86_64-smm-suse-vars.bin
/usr/share/qemu/ovmf-x86_64-smm-suse.bin
/usr/share/qemu/ovmf-x86_64-smm-vars.bin
/usr/share/qemu/ovmf-x86_64-smm.bin
/usr/share/qemu/ovmf-x86_64-suse-4m-code.bin
/usr/share/qemu/ovmf-x86_64-suse-4m-vars.bin
/usr/share/qemu/ovmf-x86_64-suse-4m.bin
/usr/share/qemu/ovmf-x86_64-suse-code.bin
/usr/share/qemu/ovmf-x86_64-suse-vars.bin
/usr/share/qemu/ovmf-x86_64-suse.bin
/usr/share/qemu/ovmf-x86_64-vars.bin
/usr/share/qemu/ovmf-x86_64-xen-4m.bin
/usr/share/qemu/ovmf-x86_64-xen.bin
/usr/share/qemu/ovmf-x86_64.bin

Then;

LXD_OVMF_PATH=/usr/share/qemu
echo $LXD_OVMF_PATH
/usr/share/qemu

lxc start ubuntu
Error: lstat /usr/share/OVMF: no such file or directory
Try `lxc info --show-log ubuntu` for more info

Any idea please?

Hello @tomp ,
I am revisiting this as it did raise as an issue with my other server.

Running fresh opensue 15.4 lxd 5.10

// /var/log/lxd/lxd.log
level=warning msg="Unable to use virtio-fs for config drive, using 9p as a fallback" err="Virtiofsd missing" instance=u22 instanceType=virtual-machine

Does the enw logs help perhaps missing driver?

All good now. Thank you.