help='use virtio disks and network'
)
p.add_argument (
+ '--no-start', action='store_const', const=True,
+ help='do not start the guest after building'
+ )
+ p.add_argument (
'--size', required=True,
help='size of disk'
)
fp.write (xml)
fp.close ()
- # Start the guest.
- lib.start_guest (c, node_name, vm_name)
- print "guest built and started on node %s" % node_name
+ if not args.no_start:
+ # Start the guest.
+ lib.start_guest (c, node_name, vm_name)
+ print "guest started on node %s" % node_name
help='use virtio disks and network'
)
p.add_argument (
+ '--no-start', action='store_const', const=True,
+ help='do not start the guest after importing'
+ )
+ p.add_argument (
'name',
help='name of the new VM (or use "vm:name")'
)
fp.write (xml)
fp.close ()
- # Start the guest.
- lib.start_guest (c, node_name, vm_name)
- print "guest imported and started on node %s" % node_name
+ if not args.no_start:
+ # Start the guest.
+ lib.start_guest (c, node_name, vm_name)
+ print "guest started on node %s" % node_name