[PATCH] virt: Fix libvirt vm incompatibility with RHEL 5

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

 



There's no vnclisten param in the virt-install command
shipped in RHEL 5, so let's add it to the command line
only if does support this option.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@xxxxxxxxxx>
---
 client/virt/libvirt_vm.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/client/virt/libvirt_vm.py b/client/virt/libvirt_vm.py
index c825661..73894c6 100644
--- a/client/virt/libvirt_vm.py
+++ b/client/virt/libvirt_vm.py
@@ -536,7 +536,10 @@ class VM(virt_vm.BaseVM):
             return " --vnc --vncport=%d" % (vnc_port)
 
         def add_vnclisten(help, vnclisten):
-            return " --vnclisten=%s " % (vnclisten)
+            if has_option(help, "vnclisten"):
+                return " --vnclisten=%s" % (vnclisten)
+            else:
+                return ""
 
         def add_sdl(help):
             if has_option(help, "sdl"):
-- 
1.7.7.5

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux