[PATCH 04 of 11] virt-convert: Fix PV install

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



# HG changeset patch
# User john.levon@xxxxxxx
# Date 1215697436 25200
# Node ID af294fad5bde2b91640c55b8f279cbe8f9a41b37
# Parent  a4920bf6af2fa78e7797d971f92e416fd78af0ca
virt-convert: Fix PV install

Need to fix a test that was triggering as VM_TYPE_PV was zero.

Signed-off-by: John Levon <john.levon@xxxxxxx>

diff --git a/virtconv/vmcfg.py b/virtconv/vmcfg.py
--- a/virtconv/vmcfg.py
+++ b/virtconv/vmcfg.py
@@ -18,8 +18,9 @@
 # MA 02110-1301 USA.
 #
 
-VM_TYPE_PV = 0
-VM_TYPE_HVM = 1
+VM_TYPE_UNKNOWN = 0
+VM_TYPE_PV = 1
+VM_TYPE_HVM = 2
 
 class vm(object):
     """
@@ -62,7 +63,7 @@
             self.description = ""
         if not self.nr_vcpus:
             self.nr_vcpus = 1
-        if not self.type:
+        if self.type == VM_TYPE_UNKNOWN:
             raise ValueError("VM type is not set")
         if not self.arch:
             raise ValueError("VM arch is not set")

_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux