[Lxc-users] libvirt-lxc and fedora
Cristian Falcas
cristi.falcas at gmail.com
Tue Jan 15 12:52:11 UTC 2013
On Tue, Jan 15, 2013 at 3:06 AM, Gao feng <gaofeng at cn.fujitsu.com> wrote:
> On 2013/01/14 19:25, Cristian Falcas wrote:
>> Hello,
>>
>> Does anybody have any experience with running lxc using libvrt with a
>> fedora host?
>>
>> In the guest (fedora or ubuntu) I try to create a tun node, but I'm
>> getting "Operation not permitted":
>>
>
> It's what we expected,devices cgroup deny this operation.
>
>> [root at wikitiki vpn_itne]# mkdir /dev/net
>> [root at wikitiki vpn_itne]# mknod /dev/net/tun c 10 200
>> mknod: `/dev/net/tun': Operation not permitted
>>
>> This is only inside the virtual machine, because in the host I can
>> create the device anywhere. SElinux is in permissive mode.
>>
>> Also, can someone explain me from where are the dev nodes created under libvirt?
>>
>
> The last libvirt support device hotplug,you can use it to add devices for
> container on host.
>
> Here is an example
> cat device.xml
> <hostdev mode='capabilities' type='misc'>
> <source>
> <char>/dev/fuse</char>
> </source>
> </hostdev>
>
> You can use virsh cmd "attach-device domainname device.xml" to hot plug
> this fuse device to the container.
>
> You can add the xml into configure file too.
>
> ------------------------------------------------------------------------------
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
Thank you for the answers.
I had this for the device:
cat /etc/cgconfig.conf
group libvirt {
cpuset {
cpuset.cpus = 0;
cpuset.mems = 0;
}
}
group libvirt/lxc {
cpuset {
cpuset.cpus = 0;
cpuset.mems = 0;
} devices {
devices.allow = "c 10:200 rwm
c 4:* rwm";
}
}
i managed to make it work with latest git sources from lxc. I will try
latter to check the method to hot plug devies. How are the nodes
created? With the same minor, major numbers as the host?
More information about the lxc-users
mailing list