Index: vws ================================================================== --- vws +++ vws @@ -661,11 +661,11 @@ umask 002 {qemubinary} -name $NAME {accel} \\ -m {memory} \\ {drive} \\ {cdrom}$CDROM \\ -{net} \\ +{rtc}{net} \\ {usb} \\ {sound} \\ -chardev socket,server,nowait,path=monitor,id=monitor \\ -mon chardev=monitor,mode=readline \\ -vga {vga} \\ @@ -698,11 +698,12 @@ "vga":'qxl', "drive":"-drive media=disk,index=0,if={interface},file={image}", "cdrom":"-drive media=cdrom,index=2,if=ide", "sound":"-soundhw hda", "group":config.get("permissions","vm_group"), - "usb":"-usb"} + "usb":"-usb", + "rtc":""} macaddr = ":".join(["%02x" % ord(x) for x in chr(0x52) + os.urandom(5)]) if parsed_args.shared: machinedir = os.path.join(config.get("directories", "SharedVMs"), parsed_args.machine) dirmode = 0775 @@ -738,10 +739,12 @@ options["sound"] = '' else: options["sound"] = '-soundhw ' + parsed_args.sound options["memory"] = parsed_args.mem + if parsed_args.localtime: + options["rtc"] = "-rtc base=localtime,clock=host \\\n" if os.path.exists(machinedir): if os.path.exists(os.path.join(machinedir, "start")): print >> sys.stderr, ("Virtual Worstation %s already exists" % parsed_args.machine) @@ -924,10 +927,13 @@ p.add_argument("--arch", metavar='cputype', help="Emulated architecture", dest="arch", default=config.get('create options', 'arch')) p.add_argument("--no-sound", help="Disable sound card", action='store_const', const=None, default=config.get('create options', 'sound'), dest="sound") +p.add_argument('--localtime', action='store_const',const=True,default=False, + help="Show system clock as local time, not UTC to guest OS", + dest='localtime') p.add_argument("--sound", metavar='cardtype', help="Specify sound card type", dest='sound', default=config.get('create options', 'sound')) p.add_argument("--vga", metavar='cardtype', help="specify video card type (cirrus,std,vmware,qxl) default " + config.get('create options', 'vga',), dest="vga",