Hi,
I'm glad to make available patches for the OpenVZ driver that provide
the following features:
* virDomainDefineXML - Defines an OpenVZ domain and does not start it.
Takes XML description of the domain as input.
* virDomainCreateLinux - Starts a domain based on the provided XML
description. There is no way to start a domain in OpenVZ without
defining it. So, it is defined anyway, as of now. :-( There may be a way
to get around this. We are looking into it. As of now, treat this as
define + start.
* virDomainUndefine - removes domain from OpenVZ management. Since
OpenVZ manages the domain's root file system, it is also lost. This
behaviour is different from Xen.
The XML Format for OpenVZ:
--------------------------
<domain type='openvz'>
<name>108</name>
<uuid>8dea22b31d52d8f32516782e98ab8fa0</uuid>
<container>
<filesystem>
<template>fedora-core-3-i386-minimal</template>
<quota level = 'first'>123</quota>
<quota level = 'second' uid = '500'>534</quota>
</filesystem>
<network>
<ipaddress>192.168.1.108</ipaddress>
<hostname>fedora-minimal</hostname>
<gateway>192.168.1.1</gateway>
<nameserver>192.168.1.1</nameserver>
<netmask>255.255.255.0</netmask>
</network>
<profile>vps.basic</profile>
</container>
</domain>
The name is the VPS "ID". The VPS ID is not temporary in OpenVZ as in
Xen. The "<template>" tag in the "<filesystem>" section
tells libvirt
which OS template cache to use to create the VPS file system. Quota is
not implemented as yet. First and second level quotas are intended to be
supported. The "<profile>" tag must be a valid profile name from which
VPS parameter are inherited. Other things, I guess are self explanatory.
Other issues:
-------------
* Moved some static declarations from the header to the .c files.
* Fixed a small bug that cause libvirtd to crash on remote client exit.
Patches are against CVS head.
Regards,
--
Shuveb Hussain
Unix is very user friendly. It is just a
little choosy about who its friends are
http://www.binarykarma.com