Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
No build reason found for pool:s390x
openSUSE:Evergreen:11.1:kernel-2.6.32
virt-manager
virtman-hardware.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File virtman-hardware.diff of Package virt-manager
diff -Nuar virt-manager-0.5.3.orig/src/virtManager/addhardware.py virt-manager-0.5.3/src/virtManager/addhardware.py --- virt-manager-0.5.3.orig/src/virtManager/addhardware.py 2009-01-23 15:41:15.000000000 -0700 +++ virt-manager-0.5.3/src/virtManager/addhardware.py 2009-01-23 18:37:44.000000000 -0700 @@ -476,17 +476,28 @@ used[dev] = 1 nodes = [] - if self.vm.is_hvm(): - # QEMU, only hdc can be a CDROM - if self.vm.get_connection().get_type().lower() == "qemu" and \ - device == virtinst.VirtualDisk.DEVICE_CDROM: - nodes.append(node + "c") + +# if self.vm.is_hvm(): +# # QEMU, only hdc can be a CDROM +# if self.vm.get_connection().get_type().lower() == "qemu" and \ +# device == virtinst.VirtualDisk.DEVICE_CDROM: +# nodes.append(node + "c") +# else: +# for n in range(maxnode): +# nodes.append("%s%c" % (node, ord('a')+n)) +# else: +# for n in range(maxnode): +# nodes.append("%s%c" % (node, ord('a')+n)) + +# change above code to start cdroms at c and skip c for non cdroms + for n in range(maxnode): + if device != virtinst.VirtualDisk.DEVICE_CDROM: + if n != ord('c') - ord('a'): + nodes.append("%s%c" % (node, ord('a')+n)) else: - for n in range(maxnode): + if n >= ord('c') - ord('a'): nodes.append("%s%c" % (node, ord('a')+n)) - else: - for n in range(maxnode): - nodes.append("%s%c" % (node, ord('a')+n)) +# end cdrom changes node = None for n in nodes: @@ -704,7 +715,7 @@ device=device) if self._disk.type == virtinst.VirtualDisk.TYPE_FILE and \ not self.vm.is_hvm() and virtinst.util.is_blktap_capable(): - disk.driver_name = virtinst.VirtualDisk.DRIVER_TAP + self._disk.driver_name = virtinst.VirtualDisk.DRIVER_TAP except ValueError, e: self._validation_error_box(_("Invalid Storage Parameters"), \ str(e)) @@ -835,11 +846,14 @@ model.append(["hd", 4, virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "IDE disk"]) model.append(["hd", 4, virtinst.VirtualDisk.DEVICE_CDROM, gtk.STOCK_CDROM, "IDE cdrom"]) model.append(["fd", 2, virtinst.VirtualDisk.DEVICE_FLOPPY, gtk.STOCK_FLOPPY, "Floppy disk"]) - model.append(["sd", 7, virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "SCSI disk"]) + # comment out unsupported SCSI disk option + # model.append(["sd", 7, virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "SCSI disk"]) if self.vm.get_connection().get_type().lower() == "xen": model.append(["xvd", 26, virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "Virtual disk"]) #model.append(["usb", virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "USB disk"]) else: + # add read-only option to prevent libvirt exceptions when adding a cdrom as read/write + model.append(["xvd", 26, virtinst.VirtualDisk.DEVICE_CDROM, gtk.STOCK_CDROM, "Virtual disk (read-only)"]) model.append(["xvd", 26, virtinst.VirtualDisk.DEVICE_DISK, gtk.STOCK_HARDDISK, "Virtual disk"]) def populate_input_model(self, model):
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor