[et-mgmt-tools] [PATCH 04 of 11] virt-convert: Fix PV install
john.levon at sun.com
john.levon at sun.com
Thu Jul 10 13:48:34 UTC 2008
# HG changeset patch
# User john.levon at sun.com
# 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 at sun.com>
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")
More information about the et-mgmt-tools
mailing list