# HG changeset patch
# User [EMAIL PROTECTED]
# 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 <[EMAIL PROTECTED]>
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
[email protected]
https://www.redhat.com/mailman/listinfo/et-mgmt-tools