Re: [libvirt] xml format for openvz driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 23, 2008 at 01:33:25PM +0400, Evgeniy Sokolov wrote:
> >On Tue, Jul 22, 2008 at 08:41:36PM +0400, Evgeniy Sokolov wrote:
> >>>>For tag domain/devices/interface:
> >>>>How to describe, if want to add ip addresses for routing network?
> >>>We'll probably want todo something based on <interface type='ethernet'
> >>>which is a generic catch all config.
> >>>
> >>>Does OpenVZ support bridging, or NAT for containers ?
> >>bridging is supported.
> >>NAT can be configured via iptables.
> >
> >If it supports bridging that is sufficient. The libvirt networking
> >APIs, allow us to implement NAT for any VM in terms of the generic
> >bridge support. Basically libvirt creates a bridge device 'virbr0'
> >and sets up NAT rules for that device. A guest VM simply needs to
> >be connected to virbr0, and then NAT automagically works for it.
> 
> Do I correctly undertand? For NAT we shoud use tag "interface" with type
> "bridge" and
> <target dev="virbr0" />

No, you'd have something like


   <target type='network'>
      <source network='default'/>
   </target>

And inside your driver you will call  virNetworkLookupByName(...)
and then virNetworkGetBridge() to find the actual bridge device name.
Take a look at the QEMU driver 's qemudNetworkIfaceConnect() method
and how it deals with VIR_DOMAIN_NET_TYPE_NETWORK vs the alternative
VIR_DOMAIN_NET_TYPE_BRIDGE

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]