[Bug 918946] Re: cannot run libvirt in an 'lxc create -t ubuntu' container
Scott Moser
smoser at ubuntu.com
Fri Jan 20 01:44:36 UTC 2012
re-attaching libvirt.xml (this one has full, not relative, path to
/tmp/disk.img, and has 'qemu' as the type).
** Description changed:
if you try to start a qemu/kvm guest from inside a container crated by lxc create -t ubuntu, it will fail with something like:
error: Failed to start domain my.img
error: unable to allow device /dev/full: Operation not permitted
$ lxc-create -t ubuntu -n lv1
$ lxc-start -n lv1 -d
$ lxc-console -n lv1
# login here
- % apt-get install qemu-kvm
+ % apt-get install qemu-kvm wget
% apt-get install dbus # bug 918343
% apt-get install libvirt-bin
- % qemu-img create -f qcow2 /tmp/disk.img 1G
+ % wget http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img -O disk.zimg
+ % qemu-img convert disk.zimg -O qcow2 /tmp/disk.img
% virsh define libvirt.xml
% virsh start mytest
from a working qemu guest, I see:
# cat /sys/fs/cgroup/devices/libvirt/qemu/myname/devices.list
c 136:* rw
c 1:3 rw
c 1:7 rw
c 1:5 rw
c 1:8 rw
c 1:9 rw
c 5:2 rw
c 254:0 rw
So I think we need to add access to that list of devices. (haven't testd
this all the way yet).
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxc 0.7.5-3ubuntu5
ProcVersionSignature: User Name 3.2.0-8.15-virtual 3.2.0
Uname: Linux 3.2.0-8-virtual x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Thu Jan 19 21:52:06 2012
Ec2AMI: ami-0000012b
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
** Attachment removed: "libvirt.xml referenced in bug report"
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/918946/+attachment/2683222/+files/libvirt.xml
** Attachment added: "libvirt.xml referenced in bug report"
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/918946/+attachment/2683440/+files/libvirt.xml
** Description changed:
if you try to start a qemu/kvm guest from inside a container crated by lxc create -t ubuntu, it will fail with something like:
error: Failed to start domain my.img
error: unable to allow device /dev/full: Operation not permitted
$ lxc-create -t ubuntu -n lv1
$ lxc-start -n lv1 -d
$ lxc-console -n lv1
# login here
% apt-get install qemu-kvm wget
% apt-get install dbus # bug 918343
% apt-get install libvirt-bin
% wget http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img -O disk.zimg
% qemu-img convert disk.zimg -O qcow2 /tmp/disk.img
+ % wget https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/918946/+attachment/2683440/+files/libvirt.xml
% virsh define libvirt.xml
% virsh start mytest
from a working qemu guest, I see:
# cat /sys/fs/cgroup/devices/libvirt/qemu/myname/devices.list
c 136:* rw
c 1:3 rw
c 1:7 rw
c 1:5 rw
c 1:8 rw
c 1:9 rw
c 5:2 rw
c 254:0 rw
So I think we need to add access to that list of devices. (haven't testd
this all the way yet).
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: lxc 0.7.5-3ubuntu5
ProcVersionSignature: User Name 3.2.0-8.15-virtual 3.2.0
Uname: Linux 3.2.0-8-virtual x86_64
ApportVersion: 1.90-0ubuntu1
Architecture: amd64
Date: Thu Jan 19 21:52:06 2012
Ec2AMI: ami-0000012b
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
ProcEnviron:
PATH=(custom, user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: lxc
UpgradeStatus: No upgrade log present (probably fresh install)
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/918946
Title:
cannot run libvirt in an 'lxc create -t ubuntu' container
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/918946/+subscriptions
More information about the Ubuntu-server-bugs
mailing list