From ce4914ba1d2bb2697710c895eddb69aaff6901da Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Mon, 14 Aug 2006 13:34:06 -0400 Subject: [PATCH 1/7] Add validation for system name: must be nonblank, less than 50 chars, no spaces --- src/virt-manager.glade | 2 +- src/virtManager/create.py | 25 ++++++++++++++++++++++--- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/src/virt-manager.glade b/src/virt-manager.glade index 43a21374..f598e526 100644 --- a/src/virt-manager.glade +++ b/src/virt-manager.glade @@ -5749,7 +5749,7 @@ TB True True True - 31 + 50 True diff --git a/src/virtManager/create.py b/src/virtManager/create.py index 870bc6c3..ea68d204 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -125,8 +125,9 @@ class vmmCreate(gobject.GObject): def forward(self, ignore=None): notebook = self.window.get_widget("create-pages") - # do this always, since there's no "leaving a notebook page" event. - self.window.get_widget("create-back").set_sensitive(True) + if(self.validate(notebook.get_current_page()) != True): + return + if (notebook.get_current_page() == 2 and self.virt_method == VM_PARAVIRT): notebook.set_current_page(4) elif (notebook.get_current_page() == 3 and self.virt_method == VM_FULLY_VIRT): @@ -236,7 +237,7 @@ class vmmCreate(gobject.GObject): # XXX the validation doesn't really go here if self.vm_name == None: self.vm_name = "No Name" - congrats.set_text(_("Congratulations, you have successfully created a new virtual system, \"%s\". \n\nYou'll now be able to view and work with \"%s\" in the virtual machine manager.") % (self.vm_name, self.vm_name) ) + congrats.set_text(_("Congratulations, you have successfully created a new virtual system, \"%s\". \n\You'll now be able to view and work with \"%s\" in the virtual machine manager.") % (self.vm_name, self.vm_name) ) congrats.set_use_markup(True) self.window.get_widget("create-forward").hide() self.window.get_widget("create-finish").show() @@ -376,3 +377,21 @@ class vmmCreate(gobject.GObject): def set_vcpus(self, src): self.vcpus = src.get_adjustment().value + + def validate(self, page_num): + if page_num == 1: + name = self.window.get_widget("create-vm-name").get_text() + if len(name) > 50 or " " in name or len(name) == 0: + message_box = gtk.MessageDialog(self.window.get_widget("vmm-create"), \ + 0, \ + gtk.MESSAGE_ERROR, \ + gtk.BUTTONS_OK, \ + _("Invalid system name") ) + message_box.format_secondary_text(_("System name must be non-blank, less than 50 characters, and contain no spaces")) + message_box.run() + message_box.destroy() + return False + + # do this always, since there's no "leaving a notebook page" event. + self.window.get_widget("create-back").set_sensitive(True) + return True From 1409beace4c2d5ffb0c053c1baa187e6befc7f93 Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Tue, 15 Aug 2006 11:32:02 -0400 Subject: [PATCH 2/7] first pass at making it actually do something --- src/virtManager/create.py | 105 ++++++++++++++++++++++++++++++++------ 1 file changed, 90 insertions(+), 15 deletions(-) diff --git a/src/virtManager/create.py b/src/virtManager/create.py index ea68d204..04300464 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -21,6 +21,8 @@ import gobject import gtk import gtk.gdk import gtk.glade +import xeninst +import sys from rhpl.exception import installExceptionHandler from rhpl.translate import _, N_, textdomain, utf8 @@ -89,7 +91,7 @@ class vmmCreate(gobject.GObject): self.install_media_address = None self.storage_method = VM_STORAGE_PARTITION self.storage_address = None - self.storage_file_size = 0 + self.storage_file_size = None self.max_memory = 0 self.startup_memory = 0 self.vcpus = 1 @@ -247,9 +249,6 @@ class vmmCreate(gobject.GObject): return 1 def finish(self, ignore=None): - # Validation? - if self.vm_name == None: self.vm_name = "None specified" - if self.install_media_address == None: self.install_media_address = "None specified" if self.storage_address == None: self.storage_address = "None specified" #Action? @@ -264,6 +263,50 @@ class vmmCreate(gobject.GObject): "\n Install max kernel memory: " + `self.max_memory` + \ "\n Install startup kernel memory: " + `self.startup_memory` + \ "\n Install vcpus: " + `self.vcpus` + + # first things first, are we trying to create a fully virt guest? + + if self.virt_method == VM_FULLY_VIRT: + guest = xeninst.FullVirtGuest() + else: + guest = xeninst.ParaVirtGuest() + + # set the name + try: + guest.name = self.vm_name + except ValueError, e: + self._validation_error_box(e) + self.vm_name = None + return + + # set the memory + try: + guest.memory = self.max_memory + except ValueError: + self._validation_error_box(e) + self.max_memory = None + return + + # disks + try: + d = xeninst.XenDisk(self.storage_address, self.storage_file_size) + except ValueError, e: + self._validation_error_box(e) + self.storage_address = self.storage_file_size = None + return + guest.disks.append(d) + + # network + n = xeninst.XenNetworkInterface(None) + guest.nics.append(n) + + try: + print "\n\nStarting install..." + r = guest.start_install(True) + print r + except RuntimeError, e: + print >> sys.stderr, "ERROR: ", e + return self.close() @@ -299,7 +342,7 @@ class vmmCreate(gobject.GObject): if self.install_media_address != None: self.window.get_widget("fv-iso-location").set_text(self.install_media_address) - def _browse_file(self, dialog_name): + def _browse_file(self, dialog_name, folder=None): # user wants to browse for an ISO fcdialog = gtk.FileChooserDialog(dialog_name, self.window.get_widget("vmm-create"), @@ -307,6 +350,8 @@ class vmmCreate(gobject.GObject): (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT), None) + if folder != None: + fcdialog.set_current_folder(folder) response = fcdialog.run() fcdialog.hide() if(response == gtk.RESPONSE_ACCEPT): @@ -324,7 +369,7 @@ class vmmCreate(gobject.GObject): self.storage_address = src.get_text() def browse_storage_partition_address(self, src, ignore=None): - self.storage_address = self._browse_file(_("Locate Storage Partition")) + self.storage_address = self._browse_file(_("Locate Storage Partition"), "/dev") if self.storage_address != None: self.window.get_widget("storage-partition-address").set_text(self.storage_address) @@ -379,19 +424,49 @@ class vmmCreate(gobject.GObject): self.vcpus = src.get_adjustment().value def validate(self, page_num): - if page_num == 1: + if page_num == 1: # the system name page name = self.window.get_widget("create-vm-name").get_text() if len(name) > 50 or " " in name or len(name) == 0: - message_box = gtk.MessageDialog(self.window.get_widget("vmm-create"), \ - 0, \ - gtk.MESSAGE_ERROR, \ - gtk.BUTTONS_OK, \ - _("Invalid system name") ) - message_box.format_secondary_text(_("System name must be non-blank, less than 50 characters, and contain no spaces")) - message_box.run() - message_box.destroy() + self._validation_error_box(_("Invalid System Name"), \ + _("System name must be non-blank, less than 50 characters, and contain no spaces")) + return False + + elif page_num == 2: # the virt method page + if self.virt_method == VM_FULLY_VIRT and not xeninst.util.is_hvm_capable(): + self._validation_error_box(_("Hardware Support Required"), \ + _("Your hardware does not appear to support full virtualization. Only paravirtualized guests will be available on this hardware.")) + return False + + elif page_num == 3: # the fully virt media page + if self.install_fv_media_type == VM_INSTALL_FROM_ISO and \ + (self.install_media_address == None or len(self.install_media_address) == 0): + self._validation_error_box(_("ISO Location Required"), \ + _("You must specify an ISO location for the guest install image")) + return False + + elif page_num == 4: # the paravirt media page + if self.install_media_address == None or len(self.install_media_address) == 0: + self._validation_error_box(_("URL or Kickstart Location Required"), \ + _("You must specify a URL or a kickstart address for the guest install")) + return False + + elif page_num == 5: # the storage page + if self.storage_address == None or len(self.storage_address) == 0: + self._validation_error_box(_("Storage Address Required"), \ + _("You must specify a partition or a file for storage for the guest install")) return False # do this always, since there's no "leaving a notebook page" event. self.window.get_widget("create-back").set_sensitive(True) return True + + def _validation_error_box(self, text1, text2=None): + message_box = gtk.MessageDialog(self.window.get_widget("vmm-create"), \ + 0, \ + gtk.MESSAGE_ERROR, \ + gtk.BUTTONS_OK, \ + text1) + if text2 != None: + message_box.format_secondary_text(text2) + message_box.run() + message_box.destroy() From be44d48b29e1f9a1e7ae885f011ce52e172ac5bb Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Tue, 15 Aug 2006 13:36:03 -0400 Subject: [PATCH 3/7] Oops better set the install location too --- src/virtManager/create.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/virtManager/create.py b/src/virtManager/create.py index 04300464..36ab7acb 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -268,8 +268,23 @@ class vmmCreate(gobject.GObject): if self.virt_method == VM_FULLY_VIRT: guest = xeninst.FullVirtGuest() + #XXX use HAL to get the local path for an install image + if self.install_fv_media_type == VM_INSTALL_FROM_CD: + self._validation_error_box(_("Installs from local CD are not yet supported")) + return + try: + guest.cdrom = self.install_media_address + except ValueError, e: + self._validation_error_box(e) + self.install_media_address = None else: guest = xeninst.ParaVirtGuest() + try: + guest.location = self.install_media_address + except ValueError, e: + self._validation_error_box(e) + self.install_media_address = None + return # set the name try: @@ -300,6 +315,7 @@ class vmmCreate(gobject.GObject): n = xeninst.XenNetworkInterface(None) guest.nics.append(n) + try: print "\n\nStarting install..." r = guest.start_install(True) From abc4ff63548b0acb1ba324c52ed82b19c630c5e0 Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Tue, 15 Aug 2006 14:22:52 -0400 Subject: [PATCH 4/7] Try for better error handling --- src/virtManager/create.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/virtManager/create.py b/src/virtManager/create.py index 36ab7acb..98912027 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -249,9 +249,6 @@ class vmmCreate(gobject.GObject): return 1 def finish(self, ignore=None): - if self.storage_address == None: self.storage_address = "None specified" - - #Action? print "your vm properties: \n Name=" + self.vm_name + \ "\n Virt method: " + `self.virt_method` + \ "\n Install media type (fv): " + `self.install_fv_media_type` + \ @@ -259,7 +256,7 @@ class vmmCreate(gobject.GObject): "\n Install media address: " + self.install_media_address + \ "\n Install storage type: " + `self.storage_method` + \ "\n Install storage address: " + self.storage_address + \ - "\n Install storage file size: " + `self.storage_file_size` + \ + "\n Install storage file size: " + `self.storage_file_size/1024` + \ "\n Install max kernel memory: " + `self.max_memory` + \ "\n Install startup kernel memory: " + `self.startup_memory` + \ "\n Install vcpus: " + `self.vcpus` @@ -282,7 +279,7 @@ class vmmCreate(gobject.GObject): try: guest.location = self.install_media_address except ValueError, e: - self._validation_error_box(e) + self._validation_error_box(`e`) self.install_media_address = None return @@ -290,7 +287,7 @@ class vmmCreate(gobject.GObject): try: guest.name = self.vm_name except ValueError, e: - self._validation_error_box(e) + self._validation_error_box(`e`) self.vm_name = None return @@ -298,15 +295,18 @@ class vmmCreate(gobject.GObject): try: guest.memory = self.max_memory except ValueError: - self._validation_error_box(e) + self._validation_error_box(`e`) self.max_memory = None return # disks + filesize = None + if self.storage_file_size != None: + filesize = int(self.storage_file_size/1024) try: - d = xeninst.XenDisk(self.storage_address, self.storage_file_size) + d = xeninst.XenDisk(self.storage_address, filesize) except ValueError, e: - self._validation_error_box(e) + self._validation_error_box(`e`) self.storage_address = self.storage_file_size = None return guest.disks.append(d) From 87748285a1b25a89d10cd92804d0369ed17d2b52 Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Tue, 15 Aug 2006 15:27:13 -0400 Subject: [PATCH 5/7] Try for better error handling again --- src/virtManager/create.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/virtManager/create.py b/src/virtManager/create.py index 98912027..cc983a0d 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -272,14 +272,16 @@ class vmmCreate(gobject.GObject): try: guest.cdrom = self.install_media_address except ValueError, e: - self._validation_error_box(e) + self._validation_error_box(_("Invalid FV media address"),e.args[0]) self.install_media_address = None else: guest = xeninst.ParaVirtGuest() + if self.install_pv_media_type == VM_INSTALL_FROM_KS_URL: + guest.extraargs = "ks=%s" % self.install_pv_media_type try: guest.location = self.install_media_address except ValueError, e: - self._validation_error_box(`e`) + self._validation_error_box(_("Invalid PV media address"), e.args[0]) self.install_media_address = None return @@ -287,7 +289,7 @@ class vmmCreate(gobject.GObject): try: guest.name = self.vm_name except ValueError, e: - self._validation_error_box(`e`) + self._validation_error_box(_("Invalid system name"), e.args[0]) self.vm_name = None return @@ -295,7 +297,7 @@ class vmmCreate(gobject.GObject): try: guest.memory = self.max_memory except ValueError: - self._validation_error_box(`e`) + self._validation_error_box(_("Invalid memory setting"), e.args[0]) self.max_memory = None return @@ -306,7 +308,7 @@ class vmmCreate(gobject.GObject): try: d = xeninst.XenDisk(self.storage_address, filesize) except ValueError, e: - self._validation_error_box(`e`) + self._validation_error_box(_("Invalid storage address"), e.args[0]) self.storage_address = self.storage_file_size = None return guest.disks.append(d) @@ -315,13 +317,13 @@ class vmmCreate(gobject.GObject): n = xeninst.XenNetworkInterface(None) guest.nics.append(n) - + # let's go try: print "\n\nStarting install..." r = guest.start_install(True) print r except RuntimeError, e: - print >> sys.stderr, "ERROR: ", e + print >> sys.stderr, "ERROR: ", e.args[0] return self.close() From 842329aa88aa5b8bdd2273e321059d2b1023e03d Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Tue, 15 Aug 2006 15:59:04 -0400 Subject: [PATCH 6/7] Kickstart arg is optional, URL is required -- it's not either/or like we thought. --- src/virt-manager.glade | 208 ++++++++++++-------------------------- src/virtManager/create.py | 64 ++++++------ 2 files changed, 98 insertions(+), 174 deletions(-) diff --git a/src/virt-manager.glade b/src/virt-manager.glade index f598e526..aae48cd4 100644 --- a/src/virt-manager.glade +++ b/src/virt-manager.glade @@ -6530,7 +6530,7 @@ TB True - Please indicate where installation media is available for the operating system you would like to install on this <b>paravirtualized</b> virtual system: + Please indicate where installation media is available for the operating system you would like to install on this <b>paravirtualized</b> virtual system. Optionally you can provide the URL for a kickstart file that describes your system: False True GTK_JUSTIFY_LEFT @@ -6567,8 +6567,8 @@ TB True - 7 - 4 + 5 + 3 False 2 0 @@ -6592,8 +6592,8 @@ TB 0 1 - 1 - 2 + 0 + 1 fill fill @@ -6619,10 +6619,10 @@ TB 0 - 2 - 3 - 1 - 2 + 1 + 2 + 0 + 1 fill @@ -6677,10 +6677,10 @@ TB - 3 - 4 - 2 - 3 + 2 + 3 + 1 + 2 fill @@ -6705,10 +6705,10 @@ TB 0 - 2 - 3 - 5 - 6 + 1 + 2 + 3 + 4 fill @@ -6762,77 +6762,12 @@ TB - - 3 - 4 - 6 - 7 - fill - - - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - 2 3 - 3 - 4 + 4 + 5 fill - - - - - - - True - 0.5 - 0 - 1 - 0 - 0 - 0 - 0 - 0 - - - - True - True - _Install Media URL (http/ftp/nfs): - True - GTK_RELIEF_NORMAL - True - True - False - True - - - - - - 0 - 4 - 0 - 1 - fill - fill @@ -6849,74 +6784,25 @@ TB 0 - - True - True - _Kickstart URL (http/ftp/nsf): - True - GTK_RELIEF_NORMAL - True - True - False - True - media-url-tree - - + 0 - 4 - 4 - 5 + 3 + 2 + 3 fill fill - - - True - 0 - 0.5 - 0 - 1 - 0 - 0 - 0 - 0 - - - - True - True - True - True - 0 - - True - - False - - - - - - 3 - 4 - 1 - 2 - fill - - - - True 0 0.5 - 0 + 1 1 0 0 @@ -6939,10 +6825,48 @@ TB - 3 - 4 - 5 - 6 + 2 + 3 + 3 + 4 + fill + + + + + + + True + 0 + 0.5 + 1 + 1 + 0 + 0 + 0 + 0 + + + + True + True + True + True + True + 0 + + True + + False + + + + + + 2 + 3 + 0 + 1 fill diff --git a/src/virtManager/create.py b/src/virtManager/create.py index cc983a0d..05e1455d 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -33,9 +33,6 @@ VM_FULLY_VIRT = 2 VM_INSTALL_FROM_ISO = 1 VM_INSTALL_FROM_CD = 2 -VM_INSTALL_FROM_URL = 1 -VM_INSTALL_FROM_KS_URL = 2 - VM_STORAGE_PARTITION = 1 VM_STORAGE_FILE = 2 @@ -61,7 +58,7 @@ class vmmCreate(gobject.GObject): "on_fv_iso_location_browse_clicked" : self.browse_iso_location, "on_fv_iso_location_focus_out_event" : self.set_media_address, "on_pv_media_url_focus_out_event" : self.set_media_address, - "on_pv_ks_url_focus_out_event" : self.set_media_address, + "on_pv_ks_url_focus_out_event" : self.set_kickstart_address, "on_storage_partition_address_focus_out_event" : self.set_storage_address, "on_storage_file_address_focus_out_event" : self.set_storage_address, "on_storage_partition_address_browse_clicked" : self.browse_storage_partition_address, @@ -82,13 +79,9 @@ class vmmCreate(gobject.GObject): #the dahta self.vm_name = None self.virt_method = VM_PARAVIRT - - # having two install-media fields is strange, but eliminates - # some spaghetti in the UI self.install_fv_media_type = VM_INSTALL_FROM_ISO - self.install_pv_media_type = VM_INSTALL_FROM_URL - self.install_media_address = None + self.install_kickstart_address = None self.storage_method = VM_STORAGE_PARTITION self.storage_address = None self.storage_file_size = None @@ -159,10 +152,12 @@ class vmmCreate(gobject.GObject): elif page_number == 1: #set up the system-name page + name_widget = self.window.get_widget("create-vm-name") if self.vm_name != None: - self.window.get_widget("create-vm-name").set_text(self.vm_name) + name_widget.set_text(self.vm_name) else: - self.window.get_widget("create-vm-name").set_text("") + name_widget.set_text("") + name_widget.grab_focus() elif page_number == 2: #set up the virt method page @@ -186,14 +181,17 @@ class vmmCreate(gobject.GObject): elif page_number == 4: #set up the pv install media page - if self.install_pv_media_type == VM_INSTALL_FROM_URL: - self.window.get_widget("media-url-tree").set_active(True) - self.window.get_widget("pv-media-url").set_sensitive(True) - self.window.get_widget("pv-ks-url").set_sensitive(False) + url_widget = self.window.get_widget("pv-media-url") + ks_widget = self.window.get_widget("pv-ks-url") + if self.install_media_address != None: + url_widget.set_text(self.install_media_address) else: - self.window.get_widget("media-url-ks").set_active(True) - self.window.get_widget("pv-media-url").set_sensitive(False) - self.window.get_widget("pv-ks-url").set_sensitive(True) + url_widget.set_text("") + if self.install_kickstart_address != None: + ks_widget.set_text(self.install_kickstart_address) + else: + ks_widget.set_text("") + url_widget.grab_focus() elif page_number == 5: #set up the storage space page @@ -239,7 +237,7 @@ class vmmCreate(gobject.GObject): # XXX the validation doesn't really go here if self.vm_name == None: self.vm_name = "No Name" - congrats.set_text(_("Congratulations, you have successfully created a new virtual system, \"%s\". \n\You'll now be able to view and work with \"%s\" in the virtual machine manager.") % (self.vm_name, self.vm_name) ) + congrats.set_text(_("Congratulations, you have successfully created a new virtual system, \"%s\". \nYou'll now be able to view and work with \"%s\" in the virtual machine manager.") % (self.vm_name, self.vm_name) ) congrats.set_use_markup(True) self.window.get_widget("create-forward").hide() self.window.get_widget("create-finish").show() @@ -249,11 +247,18 @@ class vmmCreate(gobject.GObject): return 1 def finish(self, ignore=None): + #for debugging + if self.install_kickstart_address == None: + ks = "None" + else: + ks = self.install_kickstart_address + + print "your vm properties: \n Name=" + self.vm_name + \ "\n Virt method: " + `self.virt_method` + \ "\n Install media type (fv): " + `self.install_fv_media_type` + \ - "\n Install media type (pv): " + `self.install_pv_media_type` + \ "\n Install media address: " + self.install_media_address + \ + "\n Install kickstart address: " + ks + \ "\n Install storage type: " + `self.storage_method` + \ "\n Install storage address: " + self.storage_address + \ "\n Install storage file size: " + `self.storage_file_size/1024` + \ @@ -276,8 +281,8 @@ class vmmCreate(gobject.GObject): self.install_media_address = None else: guest = xeninst.ParaVirtGuest() - if self.install_pv_media_type == VM_INSTALL_FROM_KS_URL: - guest.extraargs = "ks=%s" % self.install_pv_media_type + if self.install_kickstart_address != None: + guest.extraargs = "ks=%s" % self.install_kickstart_address try: guest.location = self.install_media_address except ValueError, e: @@ -346,14 +351,6 @@ class vmmCreate(gobject.GObject): elif button.name == "media-physical": self.install_fv_media_type = VM_INSTALL_FROM_CD self.window.get_widget("fv-iso-location-box").set_sensitive(False) - elif button.name == "media-url-tree": - self.install_pv_media_type = VM_INSTALL_FROM_URL - self.window.get_widget("pv-media-url").set_sensitive(True) - self.window.get_widget("pv-ks-url").set_sensitive(False) - else: - self.install_pv_media_type = VM_INSTALL_FROM_KS_URL - self.window.get_widget("pv-media-url").set_sensitive(False) - self.window.get_widget("pv-ks-url").set_sensitive(True) def browse_iso_location(self, ignore1=None, ignore2=None): self.install_media_address = self._browse_file(_("Locate ISO Image")) @@ -383,6 +380,9 @@ class vmmCreate(gobject.GObject): def set_media_address(self, src, ignore=None): self.install_media_address = src.get_text() + def set_kickstart_address(self, src, ignore=None): + self.install_kickstart_address = src.get_text() + def set_storage_address(self, src, ignore=None): self.storage_address = src.get_text() @@ -464,8 +464,8 @@ class vmmCreate(gobject.GObject): elif page_num == 4: # the paravirt media page if self.install_media_address == None or len(self.install_media_address) == 0: - self._validation_error_box(_("URL or Kickstart Location Required"), \ - _("You must specify a URL or a kickstart address for the guest install")) + self._validation_error_box(_("URL Required"), \ + _("You must specify a URL for the install image for the guest install")) return False elif page_num == 5: # the storage page From 7e9841b6a5d58608c0a1aa6b11fd82dfb6f56a90 Mon Sep 17 00:00:00 2001 From: "Hugh O. Brock" Date: Tue, 15 Aug 2006 16:41:09 -0400 Subject: [PATCH 7/7] create works *if* xeninst is present -- waiting on packaging --- src/virtManager/create.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/virtManager/create.py b/src/virtManager/create.py index 05e1455d..2ab9963e 100644 --- a/src/virtManager/create.py +++ b/src/virtManager/create.py @@ -247,13 +247,11 @@ class vmmCreate(gobject.GObject): return 1 def finish(self, ignore=None): - #for debugging + #begin DEBUG STUFF if self.install_kickstart_address == None: ks = "None" else: ks = self.install_kickstart_address - - print "your vm properties: \n Name=" + self.vm_name + \ "\n Virt method: " + `self.virt_method` + \ "\n Install media type (fv): " + `self.install_fv_media_type` + \ @@ -265,9 +263,9 @@ class vmmCreate(gobject.GObject): "\n Install max kernel memory: " + `self.max_memory` + \ "\n Install startup kernel memory: " + `self.startup_memory` + \ "\n Install vcpus: " + `self.vcpus` + # end DEBUG STUFF # first things first, are we trying to create a fully virt guest? - if self.virt_method == VM_FULLY_VIRT: guest = xeninst.FullVirtGuest() #XXX use HAL to get the local path for an install image