<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<meta content="MSHTML 6.00.2900.3429" name="GENERATOR">
<style title="owaParaStyle">P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</style>
</head>
<body ocsi="x">
<font face="Tahoma" color="#000000" size="2">
<div dir="ltr">Hello!</div>
<div dir="ltr"><font face="tahoma"></font> </div>
<div dir="ltr">I'm trying to link OpenVZ with LibVirt in my test environment. There are:</div>
<div dir="ltr"> </div>
<div dir="ltr">[root@alt-03 /]# uname -r<br>
2.6.18-ovz-smp-alt23.M40.3</div>
<div dir="ltr"> </div>
<div dir="ltr">[root@alt-03 /]# vzctl --version<br>
vzctl version 3.0.23</div>
<div dir="ltr"> </div>
<div dir="ltr">[root@alt-03 /]# rpm -qa | grep libvirt<br>
libvirt-0.4.6-alt1<br>
libvirt-python-0.4.6-alt1<br>
libvirt-devel-0.4.6-alt1</div>
<div dir="ltr"> </div>
<div dir="ltr">The task is to create several isolate virtual networks with several domains inside, like:</div>
<div dir="ltr">ve-01 --- vzrb0 -- ve-02<br>
               |<br>
               |<br>
            ve-03</div>
<div dir="ltr"> </div>
<div dir="ltr">ve-11 --- vzbr1 -- ve-12<br>
               |<br>
               |<br>
            ve-13<br>
  <br>
and so on ...</div>
<div dir="ltr"><br>
Here is XML definition for 1st network:<br>
<network><br>
                <name>Private</name><br>
                <bridge name="vzbr0" stp='off' forwardDelay='0'/><br>
</network></div>
<div dir="ltr"> </div>
<div dir="ltr">and the following one for 1st domain:</div>
<div dir="ltr"> </div>
<div dir="ltr"><domain type="openvz" id="3005"><br>
  <name>3005</name><br>
  <memory>131072</memory><br>
  <currentMemory>131072</currentMemory><br>
  <vcpu>1</vcpu><br>
  <on_reboot>restart</on_reboot><br>
  <on_crash>restart</on_crash><br>
  <os><br>
    <type>exe</type><br>
  </os><br>
  <devices><br>
      <filesystem type="template"><br>
         <source name="altlinux-4.0"/><br>
         <target dir="/"/><br>
         <quota type="size" max="10000"/><br>
         <quota type="inodes" max="200000"/><br>
      </filesystem><br>
      <interface type='bridge'><br>
         <source bridge='vzbr0'/><br>
      </interface><br>
  </devices><br>
</domain></div>
<div dir="ltr"> </div>
<div dir="ltr">I faced with several difficulties / misunderstandings and I hope someone could clarify me (at the moment I use 'virsh' for testing).</div>
<div dir="ltr"> </div>
<div dir="ltr">1) after creating network via 'virsh # net-create network.xml' i get vzbr0 bridge in down state and have to make ip up manually. Is there any way to automatically make it up?</div>
<div dir="ltr"> </div>
<div dir="ltr">2) there is a default network "Default" with enabled 'Autostart'. Is there any way to remove this network completely?</div>
<div dir="ltr"> </div>
<div dir="ltr">3) after creating domain via 'virsh # create ovz.xml' i get a new container, but it doesn't work as it should do:<br>
- at first, it has 'vzbr0' veth interface inside and its pair on a HW node is added into default bridge vmbr0. I believed tag <source bridge='vzbr0'/> should point to a bridge name on a HW node, but instead it created veth interface with such name. In openvz
 config file for created domain i see this:<br>
</div>
<div dir="ltr">[root@alt-03 ~]# cat /etc/vz/conf/3005.conf | grep NETIF<br>
NETIF="ifname=vzbr0,mac=52:54:00:35:10:6D,host_ifname=veth3005.0,host_mac=52:54:00:35:10:6D"</div>
<div dir="ltr"> </div>
<div dir="ltr">There is no any info about bridge. So by default veth3005.0 links with vmbr0.</div>
<div dir="ltr"> </div>
<div dir="ltr">- secondly, if you look at that NETIF string, you will see, that 'host_mac' is equal to 'mac'. Because of this two domains cannot contact with each other via the same bridge.</div>
<div dir="ltr"> </div>
<div dir="ltr">Is there any way to point veth interfaces to correct bridge, assign them corrects macs and names?</div>
<div dir="ltr"> </div>
<div dir="ltr">4) Is there any way to specify config file for created domain like it can be done via 'vzctl create <ID> --oostemplate <templname> --config <confname>'? </div>
<div dir="ltr"> </div>
<div dir="ltr">5) Is there any way to destroy domain completely like it can be done via 'vzctl destroy <ID>'?</div>
<div dir="ltr"> </div>
<div dir="ltr">6) Where does libvirt store info about already created domains? I can't create a new domain with ID 3005 after I completely destroy previous one via 'vzctl destroy 3005'.</div>
<div dir="ltr"> </div>
<div dir="ltr">7) Is there any way to publish domain's console on a host system so that I can connect via telnet to HW node on some TCP/4567 and get into domain's console?</div>
<div dir="ltr"> </div>
<div dir="ltr">8) Does libvirt use some OpenVZ bindings or simply executes vzctl and other stuff?</div>
<div dir="ltr"> </div>
<div dir="ltr">Thanks in advance!</font></div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">This message (including attachments) is private and confidential. If you have received this message in error, please notify us and remove it from your system.<br>
</font>
</body>
</html>