Changeset 20926 in vbox
- Timestamp:
- Jun 25, 2009 11:26:57 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49092
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxShell/vboxshell.py
r20897 r20926 374 374 if len(args) == 1: 375 375 print "Help page:" 376 for i in commands: 376 names = commands.keys() 377 names.sort() 378 for i in names: 377 379 print " ",i,":", commands[i][0] 378 380 else: … … 398 400 return 0 399 401 os = ctx['vb'].getGuestOSType(mach.OSTypeId) 400 print " Name: ",mach.name 401 print " ID: ",mach.id 402 print " OS Type: ",os.description 403 print " CPUs: %d" %(mach.CPUCount) 404 print " RAM: %dM" %(mach.memorySize) 405 print " VRAM: %dM" %(mach.VRAMSize) 406 print " Monitors: %d" %(mach.monitorCount) 407 print " Clipboard mode: %d" %(mach.clipboardMode) 408 print " Machine status: " ,mach.sessionState 402 print " One can use setvar <mach> <var> <value> to change variable, using name in []." 403 print " Name [name]: ",mach.name 404 print " ID [id]: ",mach.id 405 print " OS Type [n/a]: ",os.description 406 print " CPUs [CPUCount]: %d" %(mach.CPUCount) 407 print " RAM [memorySize]: %dM" %(mach.memorySize) 408 print " VRAM [VRAMSize]: %dM" %(mach.VRAMSize) 409 print " Monitors [monitorCount]: %d" %(mach.monitorCount) 410 print " Clipboard mode [clipboardMode]: %d" %(mach.clipboardMode) 411 print " Machine status [n/a]: " ,mach.sessionState 409 412 bios = mach.BIOSSettings 410 print " ACPI : %s" %(asState(bios.ACPIEnabled))411 print " APIC : %s" %(asState(bios.IOAPICEnabled))412 print " PAE : %s" %(asState(mach.PAEEnabled))413 print " Hardware virtualization : ",asState(mach.HWVirtExEnabled)414 print " VPID support : ",asState(mach.HWVirtExVPIDEnabled)415 print " Hardware 3d acceleration : ",asState(mach.accelerate3DEnabled)416 print " Nested paging : ",asState(mach.HWVirtExNestedPagingEnabled)417 print " Last changed : ",time.asctime(time.localtime(mach.lastStateChange/1000))413 print " ACPI [BIOSSettings.ACPIEnabled]: %s" %(asState(bios.ACPIEnabled)) 414 print " APIC [BIOSSettings.IOAPICEnabled]: %s" %(asState(bios.IOAPICEnabled)) 415 print " PAE [PAEEnabled]: %s" %(asState(mach.PAEEnabled)) 416 print " Hardware virtualization [HWVirtExEnabled]: ",asState(mach.HWVirtExEnabled) 417 print " VPID support [HWVirtExVPIDEnabled]: ",asState(mach.HWVirtExVPIDEnabled) 418 print " Hardware 3d acceleration[accelerate3DEnabled]: ",asState(mach.accelerate3DEnabled) 419 print " Nested paging [HWVirtExNestedPagingEnabled]: ",asState(mach.HWVirtExNestedPagingEnabled) 420 print " Last changed [n/a]: ",time.asctime(time.localtime(mach.lastStateChange/1000)) 418 421 419 422 return 0 … … 500 503 if mach == None: 501 504 return 0 502 session = ctx['mgr'].getSessionObject(vbox) 503 vbox.openSession(session, mach.id) 505 session = ctx['global'].openMachineSession(mach.id) 504 506 mach = session.machine 505 507 expr = 'mach.'+args[2]+' = '+args[3] … … 607 609 session.close() 608 610 611 return 0 612 613 614 def showLogCmd(ctx, args): 615 if (len(args) < 2): 616 print "usage: showLog <vm> <num>" 617 return 0 618 mach = argsToMach(ctx,args) 619 if mach == None: 620 return 0 621 622 log = "VBox.log" 623 if (len(args) > 2): 624 log += "."+args[2] 625 fileName = os.path.join(mach.logFolder, log) 626 627 try: 628 lf = open(fileName, 'r') 629 except IOError,e: 630 print "cannot open: ",e 631 return 0 632 633 for line in lf: 634 print line, 635 lf.close() 636 609 637 return 0 610 638 … … 647 675 'monitorVbox':['Monitor what happens with Virtual Box for some time: monitorVbox 10', monitorVboxCmd], 648 676 'portForward':['Setup permanent port forwarding for a VM, takes adapter number host port and guest port: portForward Win32 0 8080 80', portForwardCmd], 677 'showLog':['Show log file of the VM, : showLog Win32', showLogCmd], 649 678 } 650 679 -
trunk/src/VBox/Main/glue/vboxapi.py
r20897 r20926 440 440 if hasattr(self, "platform"): 441 441 self.platform.deinit() 442 442 self.platform = None 443 443 444 444 def initPerThread(self):
Note:
See TracChangeset
for help on using the changeset viewer.