WANG Cheng D
2014-May-07 08:34 UTC
[libvirt-users] Can I assign a dedicated NIC to a container?
Dear all, There are two containers hosted by my host machine. And the host machine has two same 1G NICs. I want to assign a dedicated NIC to one container. The host and the other container share the second NIC. How can I achieve this? Any comments will be highly appreciated. Cheng
Daniel P. Berrange
2014-May-07 09:26 UTC
Re: [libvirt-users] Can I assign a dedicated NIC to a container?
On Wed, May 07, 2014 at 08:34:59AM +0000, WANG Cheng D wrote:> Dear all, > There are two containers hosted by my host machine. And the host > machine has two same 1G NICs. I want to assign a dedicated NIC to > one container. The host and the other container share the second > NIC. How can I achieve this?There are several options for the dedicated NIC - Use <hostdev mode="capabilities" type="net"> http://libvirt.org/formatdomain.html#elementsHostDevCaps This simply moves the host NIC into the container's network namespace, making it invisible to the host, and only usable by that one container - Use <interface type="direct"> http://libvirt.org/formatdomain.html#elementsNICSDirect This connects the host NIC to a container via macvlan device. This can also be used for the shared NICs. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
Apparently Analagous Threads
- Re: LXC + USB passthrough = Operation not permitted
- LXC guest to have/make a device node (FUSE)
- Re: LXC + USB passthrough = Operation not permitted
- How automatically set group.devices.allow for libvirt-lxc container after start ?
- Re: If it's possible for a third-party PCIe card to be shared by multiple containers