VBoxManageInfo.cpp revision e54f1cd29256052c0e0b9224268ba3408ec55754
2956ea0ec4de894b7f8d43f9f79b3cbbbc022ac7Satyen Desai * VBoxManage - The 'showvminfo' command and helper routines.
2956ea0ec4de894b7f8d43f9f79b3cbbbc022ac7Satyen Desai * Copyright (C) 2006-2011 Oracle Corporation
* available from http://www.virtualbox.org. This file is free software;
#ifndef VBOX_ONLY_DOCS
#ifdef VBOX_WITH_PCI_PASSTHROUGH
#include "VBoxManage.h"
using namespace com;
if (snapshot)
return hrc;
RTTIME t;
switch (machineState)
case MachineState_PoweredOff:
case MachineState_Saved:
case MachineState_Aborted:
case MachineState_Teleported:
case MachineState_Running:
case MachineState_Paused:
case MachineState_Stuck:
case MachineState_Teleporting:
case MachineState_Starting:
case MachineState_Stopping:
case MachineState_Saving:
case MachineState_Restoring:
case MachineState_SettingUp:
switch (faStatus)
if (!pszNext)
#if defined(_MSC_VER)
BOOL f; \
BOOL f; \
if (!fAccessible)
return S_OK;
return S_OK;
const char *pszChipsetType;
switch (chipsetType)
const char *pszFirmwareType;
switch (firmwareType)
SHOW_BOOLEAN_METHOD( machine, GetCPUProperty(CPUPropertyType_Synthetic, &f), "synthcpu", "Synthetic Cpu");
if (!cFound)
cFound++;
const char *pszBootMenu;
switch (bootMenuMode)
SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_Enabled, &f), "hwvirtex", "Hardw. virt.ext");
SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_Exclusive, &f), "hwvirtexexcl", "Hardw. virt.ext exclusive");
SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_NestedPaging, &f),"nestedpaging", "Nested Paging");
SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_LargePages, &f), "largepages", "Large Pages");
SHOW_BOOLEAN_METHOD(machine, GetHWVirtExProperty(HWVirtExPropertyType_VPID, &f), "vtxvpid", "VT-x VPID");
const char *pszState = machineStateToName(machineState, details == VMINFO_MACHINEREADABLE /*=fShort*/);
#ifdef VBOX_WITH_VIDEOHWACCEL
SHOW_BOOLEAN_PROP( machine, Accelerate2DVideoEnabled, "accelerate2dvideo", "2D Video Acceleration");
SHOW_BOOLEAN_PROP( machine, AllowTracingToAccessVM, "tracing-allow-vm-access", "Allow Tracing to Access VM");
switch (enmCtlType)
if (mediumAttach)
if (mediumAttach)
if (fPassthrough)
if (fPassthrough)
if (fTempEject)
if (fIsEjected)
if (fTempEject)
if (fIsEjected)
if (!fEnabled)
switch (attachment)
bool fSkip = false;
fSkip = true; \
if (fSkip) continue;
if (fSkip) continue;
if (fSkip) continue;
if (fSkip) continue;
if (fSkip) continue;
case NATProtocol_TCP:
case NATProtocol_UDP:
RTPrintf("natnet%d=\"%ls\"\n", currentNIC + 1, strNetwork.length() ? strNetwork.raw(): Bstr("nat").raw());
strNatSettings = Utf8StrFmt("mtu=\"%d\"\nsockSnd=\"%d\"\nsockRcv=\"%d\"\ntcpWndSnd=\"%d\"\ntcpWndRcv=\"%d\"\n",
strNatSettings = Utf8StrFmt("NIC %d Settings: MTU: %d, Socket (send: %d, receive: %d), TCP Window (send:%d, receive: %d)\n",
currentNIC + 1, mtu, sockSnd ? sockSnd : 64, sockRcv ? sockRcv : 64 , tcpSnd ? tcpSnd : 64, tcpRcv ? tcpRcv : 64);
const char *pszPromiscuousGuestPolicy;
switch (enmPromiscModePolicy)
const char *pszNICType;
switch (NICType)
#ifdef VBOX_WITH_E1000
#ifdef VBOX_WITH_VIRTIO
RTPrintf("NIC %u: MAC: %ls, Attachment: %s, Cable connected: %s, Trace: %s (file: %ls), Type: %s, Reported speed: %d Mbps, Boot priority: %d, Promisc Policy: %s\n",
(int)ulBootPriority,
switch (aPointingHid)
case PointingHidType_None:
case PointingHidType_PS2Mouse:
case PointingHidType_USBMouse:
switch (aKeyboardHid)
case KeyboardHidType_None:
if (!fEnabled)
switch (HostMode)
case PortMode_Disconnected:
case PortMode_RawFile:
case PortMode_HostPipe:
case PortMode_HostDevice:
switch (enmDrvType)
case AudioDriverType_Null:
case AudioDriverType_WinMM:
case AudioDriverType_OSS:
case AudioDriverType_ALSA:
case AudioDriverType_Pulse:
case AudioDriverType_SolAudio:
switch (enmCtrlType)
case AudioControllerType_AC97:
case AudioControllerType_SB16:
case AudioControllerType_HDA:
if (fEnabled)
if (fEnabled)
switch (enmMode)
case ClipboardMode_Disabled:
if (console)
com::GlueHandleComError(console, "COMGETTER(Display)(display.asOutParam())", rc, __FILE__, __LINE__);
return rc;
return rc;
if (fEnabled)
const char *strAuthType;
switch (authType)
case AuthType_Null:
case AuthType_External:
case AuthType_Guest:
if (console)
return rc;
if (fVideoChannel)
RTPrintf("VRDE: enabled (Address %ls, Ports %ls, MultiConn: %s, ReuseSingleConn: %s, Authentication type: %s)\n", address.raw(), ports.raw(), fMultiCon ? "on" : "off", fReuseCon ? "on" : "off", strAuthType);
if (fVideoChannel)
fEnabled = false;
fEhciEnabled = false;
if (fMaskedIfs)
if (console)
#ifdef VBOX_WITH_PCI_PASSTHROUGH
RTPrintf(" Host device %ls at %s attached as %s\n", DevName.raw(), szHostPciAddress, szGuestPciAddress);
if (console)
if (console)
if (NumberOfClients > 0)
if (Active)
if (Active)
if (console)
AdditionsRunLevelType_T guestRunLevel; /** @todo Add a runlevel-to-string (e.g. 0 = "None") method? */
uRevision = 0;
if (fac)
return S_OK;
#if defined(_MSC_VER)
bool fLog = false;
bool fDetails = false;
bool fMachinereadable = false;
fDetails = true;
fMachinereadable = true;
fLog = true;
case VINF_GETOPT_NOT_OPTION:
if (!VMNameOrUuid)
if (RT_C_IS_PRINT(c))
else if (c == VERR_GETOPT_UNKNOWN_OPTION)
if (!VMNameOrUuid)
if (fLog)
if (cbLogData == 0)
if (fMachinereadable)
else if (fDetails)
if (console)