Hello!

I'm trying to link OpenVZ with LibVirt in my test environment. There are:

[EMAIL PROTECTED] /]# uname -r
2.6.18-ovz-smp-alt23.M40.3

[EMAIL PROTECTED] /]# vzctl --version
vzctl version 3.0.23

[EMAIL PROTECTED] /]# rpm -qa | grep libvirt
libvirt-0.4.6-alt1
libvirt-python-0.4.6-alt1
libvirt-devel-0.4.6-alt1

The task is to create several isolate virtual networks with several domains 
inside, like:
ve-01 --- vzrb0 -- ve-02
               |
               |
            ve-03

ve-11 --- vzbr1 -- ve-12
               |
               |
            ve-13

and so on ...

Here is XML definition for 1st network:
<network>
                <name>Private</name>
                <bridge name="vzbr0" stp='off' forwardDelay='0'/>
</network>

and the following one for 1st domain:

<domain type="openvz" id="3005">
  <name>3005</name>
  <memory>131072</memory>
  <currentMemory>131072</currentMemory>
  <vcpu>1</vcpu>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <os>
    <type>exe</type>
  </os>
  <devices>
      <filesystem type="template">
         <source name="altlinux-4.0"/>
         <target dir="/"/>
         <quota type="size" max="10000"/>
         <quota type="inodes" max="200000"/>
      </filesystem>
      <interface type='bridge'>
         <source bridge='vzbr0'/>
      </interface>
  </devices>
</domain>

I faced with several difficulties / misunderstandings and I hope someone could 
clarify me (at the moment I use 'virsh' for testing).

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?

2) there is a default network "Default" with enabled 'Autostart'. Is there any 
way to remove this network completely?

3) after creating domain via 'virsh # create ovz.xml' i get a new container, 
but it doesn't work as it should do:
- 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:
[EMAIL PROTECTED] ~]# cat /etc/vz/conf/3005.conf | grep NETIF
NETIF="ifname=vzbr0,mac=52:54:00:35:10:6D,host_ifname=veth3005.0,host_mac=52:54:00:35:10:6D"

There is no any info about bridge. So by default veth3005.0 links with vmbr0.

- 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.

Is there any way to point veth interfaces to correct bridge, assign them 
corrects macs and names?

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>'?

5) Is there any way to destroy domain completely like it can be done via 'vzctl 
destroy <ID>'?

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'.

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?

8) Does libvirt use some OpenVZ bindings or simply executes vzctl and other 
stuff?

Thanks in advance!

________________________________
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.
--
Libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to