[Lxc-users] libvirt-lxc and fedora

Gao feng gaofeng at cn.fujitsu.com
Tue Jan 15 01:06:37 UTC 2013


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.




More information about the lxc-users mailing list