[Libvir] Initial OpenVZ Support Patches

Shuveb Hussain shuveb at binarykarma.com
Mon Jul 16 08:28:41 UTC 2007


Hi,
Here are the OpenVZ support patches. The .c and .h files go into src/
This is being released in the spirit of releasing early. Only the basic
stuff is done and development is continuing.

What works:

* Getting number of active/inactive domains
* Listing active/inactive domains
* Creating a domain that has been already defined (using OpenVZ tools)
* Shutdown, start, reboot
* configure.in has a new switch --with-openvz(on by default), use
--without-openvz to switch it off.

After I get feedback, I will work on it and add other features later on.
There is no need for any OpenVZ tools code. Just the OpenVZ kernel and
tools need to be installed. This code depends on the OpenVZ tool
binaries.

Differences from QEMU/Xen:

* ID and name are same
* Not possible to create temporary domains and do away with them.
Creating a domain will involve untarring a template cache and bringing
it up.
* No readonly access. OpenVZ tools need root access.

There are other design issues to be discussed. These issues spring from
the fact that OpenVZ is very different from Xen/QEMU. I will discuss
these issues in further mails.

Here is a sample session transcript:

shuveb at debian-openvz:~/libvirt$ sudo src/virsh -c openvz:///system
Welcome to lt-virsh, the virtualization interactive terminal.

Type:  'help' for help with commands
       'quit' to quit

virsh # list
 Id Name                 State
----------------------------------
101 101                  running
102 102                  running
103 103                  running

virsh # shutdown 101
Domain 101 is being shutdown

virsh # list
 Id Name                 State
----------------------------------
102 102                  running
103 103                  running

virsh # list --all
 Id Name                 State
----------------------------------
102 102                  running
103 103                  running
  - 101                  shut off

virsh # start 101
Domain 101 started

virsh # list 
 Id Name                 State
----------------------------------
101 101                  running
102 102                  running
103 103                  running

virsh #

Thanks and Regards,

-- 
Shuveb Hussain

Unix is very user friendly. It is just a 
little choosy about who its friends are
http://www.binarykarma.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-openvz.patch
Type: text/x-patch
Size: 2567 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070716/7852b624/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openvz_conf.c
Type: text/x-csrc
Size: 13387 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070716/7852b624/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openvz_conf.h
Type: text/x-chdr
Size: 3402 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070716/7852b624/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openvz_driver.c
Type: text/x-csrc
Size: 14364 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070716/7852b624/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openvz_driver.h
Type: text/x-chdr
Size: 1384 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070716/7852b624/attachment-0009.bin>


More information about the libvir-list mailing list