Check-in [32b7960ce4]
Not logged in
Overview
Comment:Fix handling of relative path in --install option of create command
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 32b7960ce4de766112775abdd170fb3f56ef57bb
User & Date: vitus on 2016-02-22 10:10:52
Other Links: manifest | tags
Context
2016-03-24
07:34
Added sendkey command check-in: 50904ddda0 user: vitus tags: trunk
2016-02-22
10:10
Fix handling of relative path in --install option of create command check-in: 32b7960ce4 user: vitus tags: trunk
2016-02-10
15:57
Fix typo in the find_vm check-in: 6438e10b80 user: vitus tags: trunk
Changes

Modified vws from [aef2c0a5d5] to [2dc71bb74e].

568
569
570
571
572
573
574



575
576
577
578
579
580
581
        else:
            print >> sys.stderr, ("Cannot create VW directory, " +
                                  "something on the way")
        sys.exit(1)
    #  Creating directory for VM
    os.makedirs(machinedir, dirmode)
    driveopts = {"interface":parsed_args.diskif, "image":drivename}



    if parsed_args.image:
        # Copying image file
        print >>sys.stderr, ("Copying %s to %s" %
                             (parsed_args.image,
                              os.path.join(machinedir, drivename)))
        os.system("qemu-img convert -O qcow2 -p %s %s" %
                  (parsed_args.image,







>
>
>







568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
        else:
            print >> sys.stderr, ("Cannot create VW directory, " +
                                  "something on the way")
        sys.exit(1)
    #  Creating directory for VM
    os.makedirs(machinedir, dirmode)
    driveopts = {"interface":parsed_args.diskif, "image":drivename}
    if parsed_args.install:
        install_image = os.path.abspath(parsed_args.install)
    
    if parsed_args.image:
        # Copying image file
        print >>sys.stderr, ("Copying %s to %s" %
                             (parsed_args.image,
                              os.path.join(machinedir, drivename)))
        os.system("qemu-img convert -O qcow2 -p %s %s" %
                  (parsed_args.image,
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
        print repr(options)
    with open("start", "w") as script:
        script.write(TEMPLATE.format(**options))
    os.chmod('start', dirmode)
    # If installation media is specified vws start for new vm
    if parsed_args.install:
        start_opts = Namespace(machine=parsed_args.machine,
                               command='start', cdrom=[parsed_args.install],
                               dir=machinedir, stopped=True, snapshot=False,
                               args="", gui=True)
        try:
            cmd_start(start_opts)
        finally:
            # pylint: disable=no-member
            start_opts.sock.shutdown(socket.SHUT_RDWR)







|







597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
        print repr(options)
    with open("start", "w") as script:
        script.write(TEMPLATE.format(**options))
    os.chmod('start', dirmode)
    # If installation media is specified vws start for new vm
    if parsed_args.install:
        start_opts = Namespace(machine=parsed_args.machine,
                               command='start', cdrom=[install_image],
                               dir=machinedir, stopped=True, snapshot=False,
                               args="", gui=True)
        try:
            cmd_start(start_opts)
        finally:
            # pylint: disable=no-member
            start_opts.sock.shutdown(socket.SHUT_RDWR)