~ubuntu-branches/ubuntu/raring/virtinst/raring-proposed

« back to all changes in this revision

Viewing changes to virt-install

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Léonard
  • Date: 2011-03-25 09:30:58 UTC
  • mto: (1.6.3 sid)
  • mto: This revision was merged to the branch mainline in revision 33.
  • Revision ID: james.westby@ubuntu.com-20110325093058-169j06a5ux3k6571
Tags: upstream-0.500.6
Import upstream version 0.500.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
198
198
        if key in opts:
199
199
            del(opts[key])
200
200
 
201
 
        return host, port
 
201
        return host or None, port or None
202
202
 
203
203
    host, port = parse_host("host")
204
204
    bind_host, bind_port = parse_host("bind_host")
317
317
    shared = False
318
318
    sparse = True
319
319
    option_whitelist = ["perms", "cache", "bus", "device", "size", "sparse",
320
 
                        "format", "driver_name", "driver_type"]
 
320
                        "format", "driver_name", "driver_type", "io"]
321
321
 
322
322
    # Strip media type
323
323
    path, ignore, optstr = cli.partition(path, ",")
370
370
    fmt     = opts.get("format")
371
371
    drvname = opts.get("driver_name")
372
372
    drvtype = opts.get("driver_type")
 
373
    drvio   = opts.get("io")
373
374
 
374
375
    # We return (path, (poolname, volname), volinst, device, bus, readonly,
375
376
    #            shared)
429
430
               'driverCache': cache,
430
431
               'format': fmt,
431
432
               'driverName': drvname,
432
 
               'driverType': drvtype}
 
433
               'driverType': drvtype,
 
434
               'driverIO' : drvio}
433
435
 
434
436
    logging.debug("parse_disk: returning %s" % str(kwargs))
435
437
    return kwargs
643
645
        else:
644
646
            validate_install_media(guest, location, cdpath, cdinstall)
645
647
    except ValueError, e:
646
 
        fail(_("Error creating cdrom disk: %s" % str(e)))
 
648
        fail(_("Error validating install location: %s" % str(e)))
647
649
 
648
650
def media_prompt(guest, ishvm):
649
651
 
1211
1213
        print_stdout(_("Dry run completed successfully"))
1212
1214
        return
1213
1215
 
1214
 
    # --xml-only
 
1216
    # --print-xml
1215
1217
    if xmlonly and not xmlstep:
1216
1218
        if second_xml or final_xml:
1217
 
            fail(_("--xml-only can only be used with guests that do not have "
 
1219
            fail(_("--print-xml can only be used with guests that do not have "
1218
1220
                   "an installation phase (--import, --boot, etc.). To see all"
1219
 
                   "all generated XML, please use --xml-step all."))
 
1221
                   " generated XML, please use --print-step all."))
1220
1222
        return start_xml
1221
1223
 
1222
 
    # --xml-step
 
1224
    # --print-step
1223
1225
    if xmlstep == "1":
1224
1226
        return start_xml
1225
1227
    if xmlstep == "2":