cannot run libvirt in an 'lxc create -t ubuntu' container
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxc (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
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://
% qemu-img convert disk.zimg -O qcow2 /tmp/disk.img
% wget https:/
% virsh define libvirt.xml
% virsh start mytest
from a working qemu guest, I see:
# cat /sys/fs/
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
ProcVersionSign
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
Ec2Availability
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)
Related branches
- Martin Pitt: Approve
-
Diff: 58 lines (+17/-6)3 files modifieddebian/changelog (+6/-0)
debian/patches/0021-add-dev-full-to-whitelist.patch (+9/-6)
templates/lxc-ubuntu.in (+2/-0)
Changed in lxc (Ubuntu): | |
status: | New → Confirmed |
importance: | Undecided → Low |
description: | updated |
description: | updated |
Thanks, Scott. All the other devices you list are already being granted, so I'll add 1:7 (/dev/full) to the whitelist.