On Thu, Oct 11, Daniel P. Berrange wrote:
Hmm, on Fedora non-root is able to use KVM just fine. If you have a
new enough libvirt, you should have a 'virt-host-validate' command.
Can you run that as both root and non-root and provide the output
for each case.
The issue is that a user is not automatically in the kvm group, which however
does not prevent a successful run of 'LIBGUESTFS_ATTACH_METHOD=appliance
libguestfs-test-tool'.
root@stein-schneider:~ # virt-host-validate
QEMU: Checking for hardware virtualization : PASS
QEMU: Checking for device /dev/kvm : PASS
QEMU: Checking for device /dev/vhost-net : PASS
QEMU: Checking for device /dev/net/tun : PASS
LXC: Checking for Linux >= 2.6.26 : PASS
olaf@stein-schneider:~> virt-host-validate
QEMU: Checking for hardware virtualization : PASS
QEMU: Checking for device /dev/kvm : FAIL (Check
that the 'kvm-intel' or 'kvm-amd' modules are loaded & the BIOS has
enabled virtualization)
QEMU: Checking for device /dev/vhost-net : WARN (Load
the 'vhost_net' module to improve performance of virtio networking)
QEMU: Checking for device /dev/net/tun : PASS
LXC: Checking for Linux >= 2.6.26 : PASS
olaf@stein-schneider:~> l /dev/kvm
crw-rw---- 1 root kvm 10, 232 Okt 11 12:37 /dev/kvm
olaf@stein-schneider:~> id
uid=1000(olaf) gid=100(users) groups=100(users),33(video)
However, adding 'olaf' into group 'kvm' does not help to run
libguestfs-test-tool, its still a 'qemu' guest.
olaf@stein-schneider:~> virsh -c qemu:///session capabilities
<capabilities>
<host>
<uuid>30826d35-f748-ac09-3792-1386d0a79891</uuid>
<cpu>
<arch>x86_64</arch>
<model>Nehalem</model>
<vendor>Intel</vendor>
<topology sockets='1' cores='4' threads='2'/>
<feature name='rdtscp'/>
<feature name='dca'/>
<feature name='pdcm'/>
<feature name='xtpr'/>
<feature name='tm2'/>
<feature name='est'/>
<feature name='vmx'/>
<feature name='ds_cpl'/>
<feature name='monitor'/>
<feature name='dtes64'/>
<feature name='pbe'/>
<feature name='tm'/>
<feature name='ht'/>
<feature name='ss'/>
<feature name='acpi'/>
<feature name='ds'/>
<feature name='vme'/>
</cpu>
<power_management>
<suspend_disk/>
</power_management>
<migration_features>
<live/>
<uri_transports>
<uri_transport>tcp</uri_transport>
</uri_transports>
</migration_features>
<topology>
<cells num='1'>
<cell id='0'>
<cpus num='8'>
<cpu id='0'/>
<cpu id='1'/>
<cpu id='2'/>
<cpu id='3'/>
<cpu id='4'/>
<cpu id='5'/>
<cpu id='6'/>
<cpu id='7'/>
</cpus>
</cell>
</cells>
</topology>
<secmodel>
<model>none</model>
<doi>0</doi>
</secmodel>
</host>
</capabilities>
Olaf