Changeset 27847 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 30, 2010 11:46:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r27713 r27847 818 818 if mach == None: 819 819 return 0 820 cmdExistingVm(ctx, mach, 'plugcpu', args[2]) 820 if str(mach.sessionState) != str(ctx['ifaces'].SessionState_Open): 821 if mach.CPUHotPlugEnabled: 822 session = ctx['global'].openMachineSession(mach.id) 823 mach1 = session.machine 824 cpu = int(args[2]) 825 print "Adding CPU %d..." %(cpu) 826 mach1.hotPlugCPU(cpu) 827 mach1.saveSettings() 828 session.close() 829 else: 830 cmdExistingVm(ctx, mach, 'plugcpu', args[2]) 821 831 return 0 822 832 … … 828 838 if mach == None: 829 839 return 0 830 cmdExistingVm(ctx, mach, 'unplugcpu', args[2]) 840 if str(mach.sessionState) != str(ctx['ifaces'].SessionState_Open): 841 if mach.CPUHotPlugEnabled: 842 session = ctx['global'].openMachineSession(mach.id) 843 mach1 = session.machine 844 cpu = int(args[2]) 845 print "Removing CPU %d..." %(cpu) 846 mach1.hotUnplugCPU(cpu) 847 mach1.saveSettings() 848 session.close() 849 else: 850 cmdExistingVm(ctx, mach, 'unplugcpu', args[2]) 831 851 return 0 832 852
Note:
See TracChangeset
for help on using the changeset viewer.