Changeset 37245 in vbox for trunk/src/VBox/Frontends/VBoxShell
- Timestamp:
- May 30, 2011 8:32:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r37200 r37245 1 1 #!/usr/bin/python 2 2 # 3 # Copyright (C) 2009-201 0Oracle Corporation3 # Copyright (C) 2009-2011 Oracle Corporation 4 4 # 5 5 # This file is part of VirtualBox Open Source Edition (OSE), as … … 216 216 return colored(str(m)+'M', 'red') 217 217 218 def createVm(ctx,name,kind ,base):218 def createVm(ctx,name,kind): 219 219 mgr = ctx['mgr'] 220 220 vb = ctx['vb'] 221 mach = vb.createMachine( name, kind, base, "", False)221 mach = vb.createMachine("", name, kind, "", False) 222 222 mach.saveSettings() 223 223 print "created machine with UUID",mach.id … … 1043 1043 1044 1044 def createVmCmd(ctx, args): 1045 if (len(args) < 3 or len(args) > 4):1046 print "usage: createvm name ostype <basefolder>"1045 if (len(args) != 3): 1046 print "usage: createvm name ostype" 1047 1047 return 0 1048 1048 name = args[1] 1049 1049 oskind = args[2] 1050 if len(args) == 4:1051 base = args[3]1052 else:1053 base = ''1054 1050 try: 1055 1051 ctx['vb'].getGuestOSType(oskind) … … 1057 1053 print 'Unknown OS type:',oskind 1058 1054 return 0 1059 createVm(ctx, name, oskind , base)1055 createVm(ctx, name, oskind) 1060 1056 return 0 1061 1057
Note:
See TracChangeset
for help on using the changeset viewer.