[lxc-users] can't get kvm to work inside lxc

Spike spike at drba.org
Tue Apr 4 03:46:41 UTC 2017


Hi,

I'm trying to get kvm working inside a container but not much luck so far.

I've added /dev/kvm to the container and kvm-ok returns all good, but then
I'm trying to use libvirt and virt-install to create a kvm instances and
getting all kinds of fail.

Libvirtd is running, however trying to connect to it from my desktop fails
so reasons I ignore, I'm seeing these errors tho:

Failed to open config space file '/sys/bus/pci/devices/0000:00:1f.2/c
internal error: Child process (/usr/sbin/dmidecode -q -t 0,1,2,4,17)
unexpected exit status 1: /sys/firmware/dmi/tables/smbios_entry_point:
Permission denied
/dev/mem: No such file or directory

that said locally virsh works, so I'm not sure why virt-manager, which is
basically just wrapping the virsh call over ssh is failing.

In any case, I then tried to install an ubuntu instance on kvm with
virt-install and ran into issues with pty devices:
Apr  4 03:31:42 lxc-testlab libvirtd[276]: Unable to write to
'/sys/fs/cgroup/cpu,cpuacct/machine/template.libvirt-qemu/tasks':
Permission denied
Apr  4 03:31:42 lxc-testlab libvirtd[276]: internal error: process exited
while connecting to monitor: 2017-04-04T03:31:42.338111Z
qemu-system-x86_64: -chardev pty,id=charserial0: Failed to create PTY: No
such file or directory

I'm also seeing network related errors I guess since I got this:

Apr  4 03:29:31 lxc-testlab libvirtd[276]: Failed to open config space file
'/sys/bus/pci/devices/0000:00:1f.2/config': Permission denied

and that device matches to eth0 I guess:

P: /devices/pci0000:00/0000:00:19.0
E: DEVPATH=/devices/pci0000:00/0000:00:19.0
E: DRIVER=e1000e
E: MODALIAS=pci:v00008086d000010DEsv0000103Csd00003048bc02sc00i00
E: PCI_CLASS=20000
E: PCI_ID=8086:10DE
E: PCI_SLOT_NAME=0000:00:19.0
E: PCI_SUBSYS_ID=103C:3048
E: SUBSYSTEM=pci

any pointer would be much appreciated.

this is on ubuntu xenial stock with lxd 2.12 from ppa-stable.

thanks,

Spike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170404/aafcf1c4/attachment.html>


More information about the lxc-users mailing list