Changeset 26623 in vbox
- Timestamp:
- Feb 17, 2010 4:53:27 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r26584 r26623 407 407 pass 408 408 409 def plugCpu(ctx,machine,session,args): 410 cpu = int(args) 411 print "Adding CPU %d..." %(cpu) 412 machine.HotPlugCPU(cpu) 413 414 def unplugCpu(ctx,machine,session,args): 415 cpu = int(args) 416 print "Removing CPU %d..." %(cpu) 417 machine.HotUnplugCPU(cpu) 418 409 419 def cmdExistingVm(ctx,mach,cmd,args): 410 420 mgr=ctx['mgr'] … … 439 449 'teleport': lambda: teleport(ctx,session,console,args), 440 450 'gueststats': lambda: guestStats(ctx, console, args), 451 'plugcpu': lambda: plugCpu(ctx, session.machine, session, args), 452 'unplugcpu': lambda: unplugCpu(ctx, session.machine, session, args), 441 453 } 442 454 try: … … 783 795 return 0 784 796 797 def plugcpuCmd(ctx, args): 798 if (len(args) < 2): 799 print "usage: plugcpu name cpuid" 800 return 0 801 mach = argsToMach(ctx,args) 802 if mach == None: 803 return 0 804 cmdExistingVm(ctx, mach, 'plugcpu', args[2]) 805 return 0 806 807 def unplugcpuCmd(ctx, args): 808 if (len(args) < 2): 809 print "usage: unplugcpu name cpuid" 810 return 0 811 mach = argsToMach(ctx,args) 812 if mach == None: 813 return 0 814 cmdExistingVm(ctx, mach, 'unplugcpu', args[2]) 815 return 0 785 816 786 817 def setvarCmd(ctx, args): … … 1199 1230 'setextra':['Set extra data, empty value removes key: setextra <vm|global> <key> <value>', setExtraDataCmd, 0], 1200 1231 'gueststats':['Print available guest stats (only Windows guests with additions so far): gueststats Win32', gueststatsCmd, 0], 1232 'plugcpu':['Add a CPU to a running VM: plugcpu Win 1', plugcpuCmd, 0], 1233 'unplugcpu':['Remove a CPU from a running VM: plugcpu Win 1', unplugcpuCmd, 0], 1201 1234 } 1202 1235
Note:
See TracChangeset
for help on using the changeset viewer.

