Reputation: 106
I'm testing out a new network config using VM's and got libvirt and qemu setup on my system. Following the documentation for Fedora CoreOS to help get started.
Steps Taken
> groups
[ .. ] video kvm fuse libvirt
{"ignition":{"version":"3.1.0"},"passwd":{"users":[{ ...
...
<qemu:commandline xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">
<qemu:arg value="-fw_cfg"/>
<qemu:arg value="name=opt/com.coreos/config,file=/var/lib/libvirt/machine/main.ign"/>
</qemu:commandline>
$ ls -l /var/lib/libvirt/machine/
total 8
-rw-r--r-- 1 root libvirt 2242 Sep 20 17:16 domain.xml
-rwxr-xr-x 1 root libvirt 658 Sep 20 17:15 main.ign
$ virsh list --all
Id Name State
-----------------------------
- machine shut off
Only issue is the machine will not work from virt-manager or virsh:
$ virsh start machine
error: Failed to start domain machine
error: internal error: qemu unexpectedly closed the monitor: 2020-09-21T00:34:59.972390Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48FH).vmx-exit-load-perf-global-ctrl [bit 12]
2020-09-21T00:34:59.972427Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(490H).vmx-entry-load-perf-global-ctrl [bit 13]
2020-09-21T00:34:59.973278Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(48FH).vmx-exit-load-perf-global-ctrl [bit 12]
2020-09-21T00:34:59.973287Z qemu-system-x86_64: warning: host doesn't support requested feature: MSR(490H).vmx-entry-load-perf-global-ctrl [bit 13]
2020-09-21T00:34:59.980931Z qemu-system-x86_64: -fw_cfg name=opt/com.coreos/config,file=/var/lib/libvirt/machine/main.ign: can't load /var/lib/libvirt/machine/main.ign: Failed to open file “/var/lib/libvirt/machine/main.ign”: Permission denied
Now out of ideas on what to do. Someone have an idea?
Upvotes: 1
Views: 2790
Reputation: 11
Setting
security_driver = "none"
in /etc/libvirt/qemu.conf and restart libvirtd worked for me to solve a similar problem. (Debian 11, neither AppArmor or SELinux activated / used at all). Error here looked like:
Error: error creating libvirt domain: internal error: process exited while connecting to monitor: ...
and
Could not open '/var/lib/libvirt/images/d1test4-centos7.qcow2': Permission denied
Upvotes: 1
Reputation: 11
Modify the following line in /etc/libvirt/qemu.conf
security_driver = "none"
Upvotes: 1
Reputation: 156
Try this instead
# mv main.ign /var/lib/libvirt/images/
# restorecon /var/lib/libvirt/images/main.ign
/var/lib/libvirt/images
is properly permissioned and selinux labelled for VMs to access. /var/lib/libvirt/machines
is not a standard libvirt directory so depending on how you created it the qemu process may not have access. Also on Fedora the qemu process is launched as 'qemu' user, not 'kvm' or 'libvirt', so it could be due to that too, but if the file is in /var/lib/libvirt/images and global read permissions then I think that should be enough
Upvotes: 0