VBoxManageInfo.cpp revision 318b3aa721f5b18ee622a6fd6e0bf3a18b685283
/* $Id$ */
/** @file
* VBoxManage - The 'showvminfo' command and helper routines.
*/
/*
* Copyright (C) 2006-2009 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#ifndef VBOX_ONLY_DOCS
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "VBoxManage.h"
using namespace com;
// funcs
///////////////////////////////////////////////////////////////////////////////
void showSnapshots(ComPtr<ISnapshot> rootSnapshot, VMINFO_DETAILS details, const Bstr &prefix /* = ""*/, int level /*= 0*/)
{
/* start with the root */
if (details == VMINFO_MACHINEREADABLE)
{
/* print with hierarchical numbering */
}
else
{
/* print with indentation */
}
/* get the children */
{
{
if (snapshot)
{
if (details == VMINFO_MACHINEREADABLE)
else
/* recursive call */
}
}
}
}
{
RTTIME t;
RTTimeExplode (&t, &ts);
}
/* Disable global optimizations for MSC 8.0/64 to make it compile in reasonable
time. MSC 7.1/32 doesn't have quite as much trouble with it, but still
sufficient to qualify for this hack as well since this code isn't performance
critical and probably won't gain much from the extra optimizing in real life. */
#if defined(_MSC_VER)
#endif
{
/*
* The rules for output in -argdump format:
* 1) the key part (the [0-9a-zA-Z_]+ string before the '=' delimiter)
* is all lowercase for "VBoxManage modifyvm" parameters. Any
* other values printed are in CamelCase.
* 2) strings (anything non-decimal) are printed surrounded by
* double quotes '"'. If the strings themselves contain double
* quotes, these characters are escaped by '\'. Any '\' character
* in the original string is also escaped by '\'.
* 3) numbers (containing just [0-9\-]) are written out unchanged.
*/
/** @todo the quoting is not yet implemented! */
/** @todo error checking! */
if (!accessible)
{
if (details == VMINFO_COMPACT)
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("name=\"<inaccessible>\"\n");
else
RTPrintf ("Name: <inaccessible!>\n");
if (details == VMINFO_MACHINEREADABLE)
else
if (details != VMINFO_MACHINEREADABLE)
{
RTPrintf ("Access error details:\n");
RTPrintf ("\n");
}
}
return S_OK;
}
if (details == VMINFO_COMPACT)
{
return S_OK;
}
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
const char *pszBootMenu = NULL;
switch (bootMenuMode)
{
pszBootMenu = "disabled";
break;
if (details == VMINFO_MACHINEREADABLE)
pszBootMenu = "menuonly";
else
pszBootMenu = "menu only";
break;
default:
if (details == VMINFO_MACHINEREADABLE)
pszBootMenu = "messageandmenu";
else
pszBootMenu = "message and menu";
}
if (details == VMINFO_MACHINEREADABLE)
else
ULONG maxBootPosition = 0;
{
if (bootOrder == DeviceType_Floppy)
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("boot%d=\"floppy\"\n", i);
else
RTPrintf("Boot Device (%d): Floppy\n", i);
}
else if (bootOrder == DeviceType_DVD)
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("boot%d=\"dvd\"\n", i);
else
RTPrintf("Boot Device (%d): DVD\n", i);
}
else if (bootOrder == DeviceType_HardDisk)
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("boot%d=\"disk\"\n", i);
else
RTPrintf("Boot Device (%d): HardDisk\n", i);
}
else if (bootOrder == DeviceType_Network)
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("boot%d=\"net\"\n", i);
else
RTPrintf("Boot Device (%d): Network\n", i);
}
else if (bootOrder == DeviceType_USB)
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("boot%d=\"usb\"\n", i);
else
RTPrintf("Boot Device (%d): USB\n", i);
}
else if (bootOrder == DeviceType_SharedFolder)
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("boot%d=\"sharedfolder\"\n", i);
else
RTPrintf("Boot Device (%d): Shared Folder\n", i);
}
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("boot%d=\"none\"\n", i);
else
RTPrintf("Boot Device (%d): Not Assigned\n", i);
}
}
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (hwVirtExEnabled == TSBool_Default)
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("hwvirtex=\"default\"\n");
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
else
}
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
switch (machineState)
{
case MachineState_PoweredOff:
if (details == VMINFO_MACHINEREADABLE)
pszState = "poweroff";
else
pszState = "powered off";
break;
case MachineState_Saved:
pszState = "saved";
break;
case MachineState_Aborted:
pszState = "aborted";
break;
case MachineState_Running:
pszState = "running";
break;
case MachineState_Paused:
pszState = "paused";
break;
case MachineState_Starting:
pszState = "starting";
break;
case MachineState_Stopping:
pszState = "stopping";
break;
case MachineState_Saving:
pszState = "saving";
break;
case MachineState_Restoring:
pszState = "restoring";
break;
default:
pszState = "unknown";
break;
}
char pszTime[30] = {0};
if (details == VMINFO_MACHINEREADABLE)
{
}
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
{
if (fFloppyEnabled)
{
switch (floppyState)
{
case DriveState_ImageMounted:
{
{
if (details == VMINFO_MACHINEREADABLE)
{
}
else
}
break;
}
{
{
if (details == VMINFO_MACHINEREADABLE)
else
}
break;
}
case DriveState_NotMounted:
{
pszFloppy = "empty";
break;
}
}
}
else
{
pszFloppy = "disabled";
}
if (details == VMINFO_MACHINEREADABLE)
else
}
/*
* SATA.
*
* Contributed by: James Lucas
*/
#ifdef VBOX_WITH_AHCI
bool fSataEnabled = false;
fSataEnabled = true;
if (details == VMINFO_MACHINEREADABLE)
else
/*
* SATA Hard disks
*/
if (fSataEnabled)
{
for (ULONG i = 0; i < cSataPorts; ++ i)
{
{
if (details == VMINFO_MACHINEREADABLE)
{
}
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("sata%d=\"none\"\n",i);
}
}
}
#endif
/*
* IDE Hard disks
*/
{
const char *pszIdeController = NULL;
switch (enmIdeController)
{
pszIdeController = "PIIX3";
break;
pszIdeController = "PIIX4";
break;
pszIdeController = "ICH6";
break;
default:
pszIdeController = "unknown";
}
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
{
}
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("hda=\"none\"\n");
}
{
if (details == VMINFO_MACHINEREADABLE)
{
}
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("hdb=\"none\"\n");
}
{
if (details == VMINFO_MACHINEREADABLE)
{
}
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("hdd=\"none\"\n");
}
{
{
{
if (details == VMINFO_MACHINEREADABLE)
{
}
else
}
}
else
{
{
if (details == VMINFO_MACHINEREADABLE)
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("dvd=\"none\"\n");
else
RTPrintf("DVD: empty");
}
if (details == VMINFO_MACHINEREADABLE)
{
}
else
{
if (fPassthrough)
RTPrintf(" (passthrough enabled)");
RTPrintf("\n");
}
}
}
/* get the maximum amount of NICS */
{
{
if (!fEnabled)
{
if (details == VMINFO_MACHINEREADABLE)
else
}
else
{
switch (attachment)
{
if (details == VMINFO_MACHINEREADABLE)
strAttachment = "null";
else
strAttachment = "none";
break;
{
if (details == VMINFO_MACHINEREADABLE)
{
strAttachment = "nat";
}
else if (!strNetwork.isEmpty())
else
strAttachment = "NAT";
break;
}
{
if (details == VMINFO_MACHINEREADABLE)
{
strAttachment = "bridged";
}
else
break;
}
{
if (details == VMINFO_MACHINEREADABLE)
{
strAttachment = "intnet";
}
else
break;
}
#if defined(VBOX_WITH_NETFLT)
{
if (details == VMINFO_MACHINEREADABLE)
{
strAttachment = "hostonly";
}
else
break;
}
#endif
default:
strAttachment = "unknown";
break;
}
/* cable connected */
/* trace stuff */
/* NIC type */
switch (NICType) {
strNICType = "Am79C970A";
break;
strNICType = "Am79C973";
break;
#ifdef VBOX_WITH_E1000
strNICType = "82540EM";
break;
strNICType = "82543GC";
break;
strNICType = "82545EM";
break;
#endif
default:
strNICType = "unknown";
break;
}
/* reported line speed */
if (details == VMINFO_MACHINEREADABLE)
{
}
else
RTPrintf("NIC %d: MAC: %lS, Attachment: %s, Cable connected: %s, Trace: %s (file: %lS), Type: %s, Reported speed: %d Mbps\n",
strNICType.raw(),
ulLineSpeed / 1000);
}
}
}
/* get the maximum amount of UARTs */
{
{
if (!fEnabled)
{
if (details == VMINFO_MACHINEREADABLE)
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
else
RTPrintf("UART %d: I/O base: 0x%04x, IRQ: %d",
switch (HostMode)
{
default:
case PortMode_Disconnected:
if (details == VMINFO_MACHINEREADABLE)
else
RTPrintf(", disconnected\n");
break;
case PortMode_RawFile:
if (details == VMINFO_MACHINEREADABLE)
else
RTPrintf(", attached to raw file '%lS'\n",
break;
case PortMode_HostPipe:
if (details == VMINFO_MACHINEREADABLE)
else
RTPrintf(", attached to pipe (%s) '%lS'\n",
break;
case PortMode_HostDevice:
if (details == VMINFO_MACHINEREADABLE)
else
break;
}
}
}
}
{
const char *pszDrv = "Unknown";
const char *pszCtrl = "Unknown";
{
switch (enmDrvType)
{
case AudioDriverType_Null:
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "null";
else
pszDrv = "Null";
break;
case AudioDriverType_WinMM:
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "winmm";
else
pszDrv = "WINMM";
break;
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "dsound";
else
pszDrv = "DSOUND";
break;
case AudioDriverType_OSS:
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "oss";
else
pszDrv = "OSS";
break;
case AudioDriverType_ALSA:
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "alsa";
else
pszDrv = "ALSA";
break;
case AudioDriverType_Pulse:
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "pulse";
else
pszDrv = "PulseAudio";
break;
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "coreaudio";
else
pszDrv = "CoreAudio";
break;
case AudioDriverType_SolAudio:
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "solaudio";
else
pszDrv = "SolAudio";
break;
default:
if (details == VMINFO_MACHINEREADABLE)
pszDrv = "unknown";
break;
}
switch (enmCtrlType)
{
case AudioControllerType_AC97:
if (details == VMINFO_MACHINEREADABLE)
pszCtrl = "ac97";
else
pszCtrl = "AC97";
break;
case AudioControllerType_SB16:
if (details == VMINFO_MACHINEREADABLE)
pszCtrl = "sb16";
else
pszCtrl = "SB16";
break;
}
}
else
if (details == VMINFO_MACHINEREADABLE)
{
if (fEnabled)
else
RTPrintf("audio=\"none\"\n");
}
else
{
RTPrintf("Audio: %s",
if (fEnabled)
RTPrintf(" (Driver: %s, Controller: %s)",
RTPrintf("\n");
}
}
/* Shared clipboard */
{
const char *psz = "Unknown";
switch (enmMode)
{
case ClipboardMode_Disabled:
if (details == VMINFO_MACHINEREADABLE)
psz = "disabled";
else
psz = "disabled";
break;
if (details == VMINFO_MACHINEREADABLE)
psz = "hosttoguest";
else
psz = "HostToGuest";
break;
if (details == VMINFO_MACHINEREADABLE)
psz = "guesttohost";
else
psz = "GuestToHost";
break;
if (details == VMINFO_MACHINEREADABLE)
psz = "bidirectional";
else
psz = "Bidirectional";
break;
default:
if (details == VMINFO_MACHINEREADABLE)
psz = "unknown";
break;
}
if (details == VMINFO_MACHINEREADABLE)
else
}
if (console)
{
do
{
if (rc == E_ACCESSDENIED)
break; /* VM not powered up */
{
return rc;
}
if (rc == E_ACCESSDENIED)
break; /* VM not powered up */
{
return rc;
}
if (rc == E_ACCESSDENIED)
break; /* VM not powered up */
{
return rc;
}
if (details == VMINFO_MACHINEREADABLE)
else
}
while (0);
}
/*
* VRDP
*/
{
if (fEnabled)
{
const char *strAuthType;
switch (vrdpAuthType)
{
case VRDPAuthType_Null:
strAuthType = "null";
break;
case VRDPAuthType_External:
strAuthType = "external";
break;
case VRDPAuthType_Guest:
strAuthType = "guest";
break;
default:
strAuthType = "unknown";
break;
}
if (details == VMINFO_MACHINEREADABLE)
{
RTPrintf("vrdp=\"on\"\n");
}
else
{
address = "0.0.0.0";
RTPrintf("VRDP: enabled (Address %lS, Port %d, MultiConn: %s, ReuseSingleConn: %s, Authentication type: %s)\n", address.raw(), port, fMultiCon ? "on" : "off", fReuseCon ? "on" : "off", strAuthType);
}
}
else
{
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("vrdp=\"off\"\n");
else
RTPrintf("VRDP: disabled\n");
}
}
/*
* USB.
*/
{
fEnabled = false;
if (details == VMINFO_MACHINEREADABLE)
else
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("\nUSB Device Filters:\n\n");
{
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("<none>\n\n");
}
else
{
{
/* Query info. */
if (details != VMINFO_MACHINEREADABLE)
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (details != VMINFO_MACHINEREADABLE)
{
if (fMaskedIfs)
RTPrintf("\n");
}
}
}
if (console)
{
/* scope */
{
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("Available remote USB devices:\n\n");
{
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("<none>\n\n");
}
else
{
{
/* Query info. */
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("USBRemoteUUID%zu=\"%S\"\n"
"USBRemoteVendorId%zu=\"%#06x\"\n"
"USBRemoteProductId%zu=\"%#06x\"\n"
"USBRemoteRevision%zu=\"%#04x%02x\"\n",
else
RTPrintf("UUID: %S\n"
"VendorId: 0x%04x (%04X)\n"
"ProductId: 0x%04x (%04X)\n"
"Revision: %u.%u (%02u%02u)\n",
/* optional stuff. */
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("\n");
}
}
}
/* scope */
{
if (details != VMINFO_MACHINEREADABLE)
RTPrintf ("Currently Attached USB Devices:\n\n");
{
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("<none>\n\n");
}
else
{
{
/* Query info. */
if (details == VMINFO_MACHINEREADABLE)
RTPrintf("USBAttachedUUID%zu=\"%S\"\n"
"USBAttachedVendorId%zu=\"%#06x\"\n"
"USBAttachedProductId%zu=\"%#06x\"\n"
"USBAttachedRevision%zu=\"%#04x%02x\"\n",
else
RTPrintf("UUID: %S\n"
"VendorId: 0x%04x (%04X)\n"
"ProductId: 0x%04x (%04X)\n"
"Revision: %u.%u (%02u%02u)\n",
/* optional stuff. */
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("\n");
}
}
}
}
} /* USB */
/*
* Shared folders
*/
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("Shared folders: ");
uint32_t numSharedFolders = 0;
#if 0 // not yet implemented
/* globally shared folders first */
{
{
}
}
#endif
/* now VM mappings */
{
{
RTPrintf("\n\n");
if (details == VMINFO_MACHINEREADABLE)
{
}
else
RTPrintf("Name: '%lS', Host path: '%lS' (machine mapping), %s\n",
}
}
/* transient mappings */
if (console)
{
{
RTPrintf("\n\n");
if (details == VMINFO_MACHINEREADABLE)
{
}
else
}
}
RTPrintf("<none>\n");
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("\n");
if (console)
{
/*
* Live VRDP info.
*/
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
if (NumberOfClients > 0)
{
char timestr[128];
if (Active)
{
if (details == VMINFO_MACHINEREADABLE)
else
}
else
{
if (details == VMINFO_MACHINEREADABLE)
else
if (details == VMINFO_MACHINEREADABLE)
else
}
uint64_t ThroughputSend = 0;
{
}
if (details == VMINFO_MACHINEREADABLE)
{
}
else
{
}
if (Active)
{
if (details == VMINFO_MACHINEREADABLE)
{
}
else
{
}
}
}
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("\n");
}
if ( details == VMINFO_STANDARD
|| details == VMINFO_FULL
|| details == VMINFO_MACHINEREADABLE)
{
if (!description.isEmpty())
{
if (details == VMINFO_MACHINEREADABLE)
else
}
}
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("Guest:\n\n");
#ifdef VBOX_WITH_MEM_BALLOONING
{
if (details == VMINFO_MACHINEREADABLE)
else
}
#endif
{
if (details == VMINFO_MACHINEREADABLE)
else
{
if (guestVal == 0)
RTPrintf("Statistics update: disabled\n");
else
}
}
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("\n");
if ( console
&& ( details == VMINFO_STATISTICS
|| details == VMINFO_FULL
|| details == VMINFO_MACHINEREADABLE))
{
{
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
#ifdef VBOX_WITH_MEM_BALLOONING
{
if (details == VMINFO_MACHINEREADABLE)
else
}
#endif
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
{
if (details == VMINFO_MACHINEREADABLE)
else
}
RTPrintf("\n");
}
else
{
if (details != VMINFO_MACHINEREADABLE)
{
}
}
}
/*
* snapshots
*/
{
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("Snapshots:\n\n");
}
if (details != VMINFO_MACHINEREADABLE)
RTPrintf("\n");
return S_OK;
}
#if defined(_MSC_VER)
#endif
static const RTGETOPTDEF g_aShowVMInfoOptions[] =
{
};
int handleShowVMInfo(HandlerArg *a)
{
const char *VMNameOrUuid = NULL;
bool fDetails = false;
bool fStatistics = false;
bool fMachinereadable = false;
int c;
// start at 0 because main() has hacked both the argc and argv given to us
RTGetOptInit(&GetState, a->argc, a->argv, g_aShowVMInfoOptions, RT_ELEMENTS(g_aShowVMInfoOptions), 0, 0 /* fFlags */);
{
switch (c)
{
case 'D': // --details
fDetails = true;
break;
case 'S': // --statistics
fStatistics = true;
break;
case 'M': // --machinereadable
fMachinereadable = true;
break;
case VINF_GETOPT_NOT_OPTION:
if (!VMNameOrUuid)
else
break;
default:
if (c > 0)
{
if (RT_C_IS_PRINT(c))
else
}
else if (c == VERR_GETOPT_UNKNOWN_OPTION)
else if (ValueUnion.pDef)
else
}
}
/* check for required options */
if (!VMNameOrUuid)
/* try to find the given machine */
{
}
else
{
}
return 1;
/* 2nd option can be -details, -statistics or -argdump */
if (fMachinereadable)
else
if (fDetails && fStatistics)
else
if (fDetails)
else
if (fStatistics)
/* open an existing session for the VM */
/* get the session machine */
/* get the session console */
if (console)
}
#endif /* !VBOX_ONLY_DOCS */
/* vi: set tabstop=4 shiftwidth=4 expandtab: */