Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 158326 Details for
Bug 246441
can not specify the type of driver device
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
added the option
drvtype_option.patch (text/plain), 4.41 KB, created by
Saori Fukuta
on 2007-07-02 09:15:05 UTC
(
hide
)
Description:
added the option
Filename:
MIME Type:
Creator:
Saori Fukuta
Created:
2007-07-02 09:15:05 UTC
Size:
4.41 KB
patch
obsolete
>diff -r 65ea24a40b29 virt-install >--- a/virt-install Fri Jun 22 13:03:53 2007 -0400 >+++ b/virt-install Mon Jul 02 16:24:10 2007 +0900 >@@ -130,7 +130,7 @@ def get_vcpus(vcpus, check_cpu, guest, c > print "ERROR: ", e > > >-def get_disk(disk, size, sparse, guest, hvm, conn): >+def get_disk(disk, size, sparse, drvtype, guest, hvm, conn): > # FIXME: need to handle a list of disks at some point > while 1: > msg = "What would you like to use as the disk (path)?" >@@ -169,6 +169,15 @@ def get_disk(disk, size, sparse, guest, > continue > if d.type == virtinst.VirtualDisk.TYPE_FILE and not(hvm) and virtinst.util.is_blktap_capable(): > d.driver_name = virtinst.VirtualDisk.DRIVER_TAP >+ if drvtype is not None: >+ while 1: >+ drvtype = prompt_for_input("What is the type of driver?", drvtype) >+ try: >+ d.set_driver_type(drvtype) >+ break >+ except ValueError, e: >+ print "ERROR: ", e >+ drvtype = None > except ValueError, e: > print "ERROR: ", e > disk = size = None >@@ -177,10 +186,13 @@ def get_disk(disk, size, sparse, guest, > guest.disks.append(d) > break > >-def get_disks(disk, size, sparse, nodisks, guest, hvm, conn): >+def get_disks(disk, size, sparse, drvtype, nodisks, guest, hvm, conn): > if nodisks: > if disk or size: > raise ValueError, "Cannot use --file with --nodisks" >+ return >+ if hvm and drvtype: >+ raise ValueError, "Cannot use --hvm with --drvtype" > return > # ensure we have equal length lists > if (type(disk) == type(size) == list): >@@ -193,13 +205,13 @@ def get_disks(disk, size, sparse, nodisk > disk = [ None ] * len(size) > > if (type(disk) == list): >- map(lambda d, s: get_disk(d, s, sparse, guest, hvm, conn), >+ map(lambda d, s: get_disk(d, s, sparse, drvtype, guest, hvm, conn), > disk, size) > elif (type(size) == list): >- map(lambda d, s: get_disk(d, s, sparse, guest, hvm, conn), >+ map(lambda d, s: get_disk(d, s, sparse, drvtype, guest, hvm, conn), > disk, size) > else: >- get_disk(disk, size, sparse, guest, hvm, conn) >+ get_disk(disk, size, sparse, drvtype, guest, hvm, conn) > > def get_network(mac, network, guest): > if mac == "RANDOM": >@@ -352,6 +364,9 @@ def parse_args(): > help="Don't use sparse files for disks. Note that this will be significantly slower for guest creation") > parser.add_option("", "--nodisks", action="store_true", > help="Don't set up any disks for the guest.") >+ parser.add_option("", "--drvtype", type="string", >+ dest="drvtype", action="callback", callback=check_before_store, >+ help="Type of driver device, e.g. 'aio', 'qcow', 'vmdk', 'sync'") > > # network options > parser.add_option("-m", "--mac", type="string", >@@ -568,8 +583,8 @@ def main(): > get_vcpus(options.vcpus, options.check_cpu, guest, conn) > > # set up disks >- get_disks(options.diskfile, options.disksize, options.sparse, options.nodisks, >- guest, hvm, conn) >+ get_disks(options.diskfile, options.disksize, options.sparse, >+ options.drvtype, options.nodisks, guest, hvm, conn) > > # set up network information > get_networks(options.mac, options.bridge, options.network, guest) >diff -r 65ea24a40b29 virtinst/Guest.py >--- a/virtinst/Guest.py Fri Jun 22 13:03:53 2007 -0400 >+++ b/virtinst/Guest.py Mon Jul 02 16:02:32 2007 +0900 >@@ -32,6 +32,7 @@ class VirtualDisk: > DRIVER_TAP_RAW = "aio" > DRIVER_TAP_QCOW = "qcow" > DRIVER_TAP_VMDK = "vmdk" >+ DRIVER_TAP_SYNC = "sync" > > DEVICE_DISK = "disk" > DEVICE_CDROM = "cdrom" >@@ -107,6 +108,11 @@ class VirtualDisk: > def get_driver_type(self): > return self._driverType > driver_type = property(get_driver_type) >+ >+ def set_driver_type(self, drvtype): >+ if drvtype != self.DRIVER_TAP_RAW and drvtype != self.DRIVER_TAP_QCOW and drvtype != self.DRIVER_TAP_VMDK and drvtype != self.DRIVER_TAP_SYNC: >+ raise ValueError, "Type of driver device %s is not supported." %(drvtype,) >+ self._driverType = drvtype > > def get_read_only(self): > return self._readOnly
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 246441
: 158326