SaeedZF
(Saeed Zarinfam)
January 14, 2023, 10:17am
1
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.
tomp
(Thomas Parrott)
January 16, 2023, 9:31am
2
Thats a QEMU crash.
Searching for that error lead me here:
opened 08:26AM - 20 Mar 19 UTC
closed 08:46AM - 20 Mar 19 UTC
### General information
I am running Ubuntu 18.04 on my VMware workstation.
… Virtualization is enabled (`Virtualize Intel VT-x/EPT or AMD-V/RVI` is checked).
* Minishift version: minishift v1.33.0+ba29431
* OS: Linux Ubuntu 18.04
```
root@ubuntu:~# uname -a && lsb_release -a
Linux ubuntu 4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
```
* Hypervisor: KVM
### Steps to reproduce
Make sure minikube is running with `minikube start --vm-driver=none`. and then `minikube status` and `kubectl get pods`.
1. Follow the [instructions ](https://docs.okd.io/latest/minishift/getting-started/setting-up-virtualization-environment.html)to prepare virtualization environment
2. Download `minishift-1.33.0-linux-amd64.tgz`
3. Extracted it and ran `minishift start -
4.
### Expected
minishift to start
### Actual
### Logs
```
root@ubuntu:~# minishift start --show-libmachine-logs -v5
-- minishift version: v1.33.0+ba29431
-- Starting profile 'minishift'
Found binary path at /usr/local/bin/docker-machine-driver-kvm
Launching plugin server for driver kvm
Plugin server listening at address 127.0.0.1:38563
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minishift) Calling .GetState
(minishift) DBG | Getting current state...
(minishift) DBG | Fetching VM...
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'kvm' is supported on this platform ... OK
-- Checking if KVM driver is installed ...
Driver is available at /usr/local/bin/docker-machine-driver-kvm ...
Checking driver binary is executable ... OK
-- Checking if Libvirt is installed ... OK
-- Checking if Libvirt default network is present ... OK
-- Checking if Libvirt default network is active ... OK
-- Checking the ISO URL ... OK
-- Checking if provided oc flags are supported ... OK
-- Starting the OpenShift cluster using 'kvm' hypervisor ...
-- Starting Minishift VM ....Found binary path at /usr/local/bin/docker-machine-driver-kvm
Launching plugin server for driver kvm
Plugin server listening at address 127.0.0.1:44151
() Calling .GetVersion
Using API Version 1
() Calling .SetConfigRaw
() Calling .GetMachineName
(minishift) Calling .GetState
(minishift) DBG | Getting current state...
(minishift) DBG | Fetching VM...
(minishift) Calling .Start
(minishift) DBG | Starting VM minishift
(minishift) Failed to start: virError(Code=1, Domain=10, Message='internal error: process exited while connecting to monitor: 2019-03-20T08:24:27.738295Z qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
(minishift) qemu-system-x86_64: /build/qemu-dVNw8t/qemu-2.11+dfsg/target/i386/kvm.c:1807: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.')
FAIL E0320 01:24:28.148969 33192 start.go:494] Error starting the VM: Error starting stopped host: virError(Code=1, Domain=10, Message='internal error: process exited while connecting to monitor: 2019-03-20T08:24:27.738295Z qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-dVNw8t/qemu-2.11+dfsg/target/i386/kvm.c:1807: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.'). Retrying.
Error starting the VM: Error starting stopped host: virError(Code=1, Domain=10, Message='internal error: process exited while connecting to monitor: 2019-03-20T08:24:27.738295Z qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-dVNw8t/qemu-2.11+dfsg/target/i386/kvm.c:1807: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.')
```
Does that help?
seven
(skies)
January 26, 2023, 1:48am
3
+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
seven
(skies)
February 10, 2023, 4:14am
4
@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?
seven
(skies)
February 10, 2023, 4:42am
5
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
tomp
(Thomas Parrott)
February 10, 2023, 9:05am
6
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.
tomp
(Thomas Parrott)
February 10, 2023, 9:06am
7
Also LXD 5.10 had some improvements to the way we detect QEMU features, so you may find that works better.
seven
(skies)
February 10, 2023, 10:08am
8
I am on opensuse, not using snap.
seven
(skies)
February 10, 2023, 10:09am
9
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?
tomp
(Thomas Parrott)
February 10, 2023, 11:47am
10
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
seven
(skies)
February 10, 2023, 2:13pm
11
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.
seven
(skies)
February 12, 2023, 7:37am
12
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?