[virt-tools-list] Openvz guests

Guido Günther agx at sigxcpu.org
Wed Dec 1 15:07:23 UTC 2010


On Wed, Nov 24, 2010 at 03:17:41PM -0500, Cleber Rosa wrote:
> Rich, 
> 
> Are you sure there's GUI code for this on virt-manager? 
> 
> I remember that not long ago there wasn't even code on virt-install to support this kind of thing... 

With the attached patch you can at least start/stop OpenVZ containers.
The wizard needs more work since it doesn't allow for numeric vm names
and we need an option to not require a disk image. 
Cheers
 -- Guido

-------------- next part --------------
# HG changeset patch
# Parent dedbf8d0d5a34399a2baa8422b0f154a1c243bb0
# User Guido G?nther <agx at sigxcpu.org>
Allow to select OpenVZ connections in connection dialog.

This allows to start/stop local/remote OpenVZ containers.


diff --git a/src/virtManager/connect.py b/src/virtManager/connect.py
--- a/src/virtManager/connect.py
+++ b/src/virtManager/connect.py
@@ -29,6 +29,7 @@
 
 HV_XEN = 0
 HV_QEMU = 1
+HV_OPENVZ = 2
 
 CONN_SSH = 0
 CONN_TCP = 1
@@ -290,6 +291,8 @@
         hvstr = ""
         if hv == HV_XEN:
             hvstr = "xen"
+        elif hv == HV_OPENVZ:
+            hvstr = "openvz"
         else:
             hvstr = "qemu"
 
@@ -311,7 +314,7 @@
             hoststr += addrstr + "/"
 
         uri = hvstr + hoststr
-        if hv == HV_QEMU:
+        if hv in [ HV_QEMU, HV_OPENVZ]:
             uri += "system"
 
         return uri
diff --git a/src/vmm-open-connection.glade b/src/vmm-open-connection.glade
--- a/src/vmm-open-connection.glade
+++ b/src/vmm-open-connection.glade
@@ -24,7 +24,8 @@
               <widget class="GtkComboBox" id="hypervisor">
                 <property name="visible">True</property>
                 <property name="items" translatable="yes">Xen
-QEMU/KVM</property>
+QEMU/KVM
+OpenVZ</property>
                 <accessibility>
                   <atkproperty name="AtkObject::accessible-name" translatable="yes">Hypervisor Select</atkproperty>
                 </accessibility>


More information about the virt-tools-list mailing list