VBoxManageHelp.cpp revision b0e4c86da01d9a0941097b9576925ee5bafae0b4
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync/* $Id$ */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync/** @file
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * VBoxManage - help and other message output.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync/*
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * Copyright (C) 2006-2009 Sun Microsystems, Inc.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync *
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * available from http://www.virtualbox.org. This file is free software;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * you can redistribute it and/or modify it under the terms of the GNU
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * General Public License (GPL) as published by the Free Software
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync *
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * additional information or have any questions.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#include <iprt/stream.h>
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#include <iprt/getopt.h>
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#include "VBoxManage.h"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsyncvoid printUsage(USAGECATEGORY u64Cmd)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync{
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef RT_OS_LINUX
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fLinux = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fLinux = false;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef RT_OS_WINDOWS
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fWin = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fWin = false;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef RT_OS_SOLARIS
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fSolaris = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fSolaris = false;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef RT_OS_DARWIN
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fDarwin = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fDarwin = false;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_VRDP
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fVRDP = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync bool fVRDP = false;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd == USAGE_DUMPOPTS)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync fLinux = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync fWin = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync fSolaris = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync fDarwin = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync fVRDP = true;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync u64Cmd = USAGE_ALL;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("Usage:\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd == USAGE_ALL)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage [-v|-version] print version number and exit\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "VBoxManage -nologo ... suppress the logo\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_LIST)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|\n"
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync#if (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT))
d1fcf24d24368926be13484524a9e378070a9157vboxsync " bridgedifs|hostonlyifs|dhcpservers|hostinfo|hddbackends|hdds|dvds|floppies|\n"
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync#else
d1fcf24d24368926be13484524a9e378070a9157vboxsync " bridgedifs|hostinfo|dhcpservers|hddbackends|hdds|dvds|floppies|\n"
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync#endif
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " usbhost|usbfilters|systemproperties\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_SHOWVMINFO)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage showvminfo <uuid>|<name> [-details] [-statistics]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-machinereadable]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_REGISTERVM)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage registervm <filename>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_UNREGISTERVM)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage unregistervm <uuid>|<name> [-delete]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_CREATEVM)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage createvm -name <name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-ostype <ostype>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-register]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-basefolder <path> | -settingsfile <path>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-uuid <uuid>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_IMPORTAPPLIANCE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage import <ovf>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n"); // @todo
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_EXPORTAPPLIANCE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage export <machines> [--output|-o] <ovf>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_MODIFYVM)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage modifyvm <uuid|name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-name <name>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-ostype <ostype>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-memory <memorysize in MB>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vram <vramsize in MB>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-acpi on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-ioapic on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-pae on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-hwvirtex on|off|default]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-nestedpaging on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vtxvpid on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-monitorcount <number>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-accelerate3d <on|off>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-bioslogofadein on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-bioslogofadeout on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-bioslogodisplaytime <msec>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-bioslogoimagepath <imagepath>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-biosbootmenu disabled|menuonly|messageandmenu]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-biossystemtimeoffset <msec>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-biospxedebug on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-boot<1-4> none|floppy|dvd|disk|net>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-hd<a|b|d> none|<uuid>|<filename>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-idecontroller PIIX3|PIIX4]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_AHCI
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-sata on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-sataportcount <1-30>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-sataport<1-30> none|<uuid>|<filename>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-sataideemulation<1-4> <1-30>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
a59528c40bbfdcee2e315756333f8c66f35b5accvboxsync#ifdef VBOX_WITH_SCSI
a59528c40bbfdcee2e315756333f8c66f35b5accvboxsync " [-scsi on|off]\n"
a59528c40bbfdcee2e315756333f8c66f35b5accvboxsync " [-scsiport<1-16> none|<uuid>|<filename>]\n"
a59528c40bbfdcee2e315756333f8c66f35b5accvboxsync " [-scsitype LsiLogic|BusLogic]\n"
e214bb78026c1d64078b34ca9504d3f5abbc52efvboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-dvd none|<uuid>|<filename>|host:<drive>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-dvdpassthrough on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-floppy disabled|empty|<uuid>|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " <filename>|host:<drive>]\n"
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync#if defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || (defined(RT_OS_WINDOWS) && defined(VBOX_WITH_NETFLT))
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync " [-nic<1-N> none|null|nat|bridged|intnet|hostonly]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#else /* !RT_OS_LINUX && !RT_OS_DARWIN */
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync " [-nic<1-N> none|null|nat|bridged|intnet]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif /* !RT_OS_LINUX && !RT_OS_DARWIN */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-nictype<1-N> Am79C970A|Am79C973"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_E1000
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "|82540EM|82543GC"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-cableconnected<1-N> on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-nictrace<1-N> on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-nictracefile<1-N> <filename>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-nicspeed<1-N> <kbps>]\n"
08de270f07378125f9601f9b35acc0b46a13174fvboxsync " [-bridgeadapter<1-N> none|<devicename>]\n"
629e8f58c569e4c51a98284c41754fd9f0b973f8vboxsync#if defined(VBOX_WITH_NETFLT)
08de270f07378125f9601f9b35acc0b46a13174fvboxsync " [-hostonlyadapter<1-N> none|<devicename>]\n"
7c1f498692cd2393f8ba68cb62be482495106f93vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-intnet<1-N> <network name>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-natnet<1-N> <network>|default]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-macaddress<1-N> auto|<mac>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-uart<1-N> off|<I/O base> <IRQ>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-uartmode<1-N> disconnected|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " server <pipe>|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " client <pipe>|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " <devicename>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_MEM_BALLOONING
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-guestmemoryballoon <balloonsize in MB>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-gueststatisticsinterval <seconds>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync );
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf(" [-audio none|null");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fWin)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_WINMM
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf( "|winmm|dsound");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf( "|dsound");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fSolaris)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf( "|solaudio");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fLinux)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf( "|oss"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_ALSA
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "|alsa"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_PULSE
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "|pulse"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync );
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fDarwin)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf( "|coreaudio");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf( "]\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf(" [-audiocontroller ac97|sb16]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-clipboard disabled|hosttoguest|guesttohost|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " bidirectional]\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fVRDP)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf(" [-vrdp on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vrdpport default|<port>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vrdpaddress <host>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vrdpauthtype null|external|guest]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vrdpmulticon on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vrdpreusecon on|off]\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf(" [-usb on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-usbehci on|off]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-snapshotfolder default|<path>]\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_STARTVM)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage startvm <uuid>|<name>\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fVRDP)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf(" [-type gui|vrdp]\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_CONTROLVM)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage controlvm <uuid>|<name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " pause|resume|reset|poweroff|savestate|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " acpipowerbutton|acpisleepbutton|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " keyboardputscancode <hex> [<hex> ...]|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " injectnmi|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " setlinkstate<1-4> on|off |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " usbattach <uuid>|<address> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " usbdetach <uuid>|<address> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " dvdattach none|<uuid>|<filename>|host:<drive> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " floppyattach none|<uuid>|<filename>|host:<drive> |\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fVRDP)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf(" vrdp on|off] |\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf(" setvideomodehint <xres> <yres> <bpp> [display]|\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " setcredentials <username> <password> <domain>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-allowlocallogon <yes|no>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_DISCARDSTATE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage discardstate <uuid>|<name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_ADOPTSTATE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage adoptstate <uuid>|<name> <state_file>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_SNAPSHOT)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage snapshot <uuid>|<name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " take <name> [-desc <desc>] |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " discard <uuid>|<name> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " discardcurrent -state|-all |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " edit <uuid>|<name>|-current\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-newname <name>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-newdesc <desc>] |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " showvminfo <uuid>|<name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_REGISTERIMAGE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage openmedium disk|dvd|floppy <filename>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-type normal|immutable|writethrough] (disk only)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_UNREGISTERIMAGE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage closemedium disk|dvd|floppy <uuid>|<filename>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_SHOWHDINFO)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage showhdinfo <uuid>|<filename>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_CREATEHD)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync RTPrintf("VBoxManage createhd --filename <filename>\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " --size <megabytes>\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--format VDI|VMDK|VHD] (default: VDI)\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--variant Standard|Fixed|Diff|Split2G|Stream]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--type normal|writethrough] (default: normal)\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--comment <comment>]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--remember]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_MODIFYHD)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage modifyhd <uuid>|<filename>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " settype normal|writethrough|immutable |\n"
46fcc16fd8ee95bb4e5c4e662aebcc86248c8ef0vboxsync " autoreset on|off |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " compact\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_CLONEHD)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage clonehd <uuid>|<filename> <outputfile>\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--format VDI|VMDK|VHD|RAW|<other>]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--variant Standard|Fixed|Diff|Split2G|Stream]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--type normal|writethrough|immutable]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--remember]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_CONVERTFROMRAW)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync RTPrintf("VBoxManage convertfromraw <filename> <outputfile>\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--format VDI|VMDK|VHD]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--variant Standard|Fixed|Diff|Split2G|Stream]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync "VBoxManage convertfromraw stdin <outputfile> <bytes>\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--format VDI|VMDK|VHD]\n"
47699a0c42ead32866009e0d91bfb349490feaf9vboxsync " [--variant Standard|Fixed|Diff|Split2G|Stream]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_ADDISCSIDISK)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage addiscsidisk -server <name>|<ip>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -target <target>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-port <port>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-lun <lun>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-encodedlun <lun>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-username <username>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-password <password>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-comment <comment>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-intnet]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_GETEXTRADATA)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage getextradata global|<uuid>|<name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " <key>|enumerate\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_SETEXTRADATA)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage setextradata global|<uuid>|<name>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " <key>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [<value>] (no value deletes key)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_SETPROPERTY)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage setproperty hdfolder default|<folder> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " machinefolder default|<folder> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " vrdpauthlibrary default|<library> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " websrvauthlibrary default|null|<library> |\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " hwvirtexenabled yes|no\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " loghistorycount <value>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_USBFILTER_ADD)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage usbfilter add <index,0-N>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -target <uuid>|<name>|global\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -name <string>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -action ignore|hold (global filters only)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-active yes|no] (yes)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vendorid <XXXX>] (null)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-productid <XXXX>] (null)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-revision <IIFF>] (null)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-manufacturer <string>] (null)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-product <string>] (null)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-remote yes|no] (null, VM filters only)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-serialnumber <string>] (null)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-maskedinterfaces <XXXXXXXX>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_USBFILTER_MODIFY)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage usbfilter modify <index,0-N>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -target <uuid>|<name>|global\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-name <string>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-action ignore|hold] (global filters only)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-active yes|no]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-vendorid <XXXX>|\"\"]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-productid <XXXX>|\"\"]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-revision <IIFF>|\"\"]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-manufacturer <string>|\"\"]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-product <string>|\"\"]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-remote yes|no] (null, VM filters only)\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-serialnumber <string>|\"\"]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-maskedinterfaces <XXXXXXXX>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_USBFILTER_REMOVE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage usbfilter remove <index,0-N>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -target <uuid>|<name>|global\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_SHAREDFOLDER_ADD)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage sharedfolder add <vmname>|<uuid>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -name <name> -hostpath <hostpath>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-transient] [-readonly]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_SHAREDFOLDER_REMOVE)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage sharedfolder remove <vmname>|<uuid>\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " -name <name> [-transient]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_VM_STATISTICS)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage vmstatistics <vmname>|<uuid> [-reset]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-pattern <pattern>] [-descriptions]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifdef VBOX_WITH_GUEST_PROPS
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_GUESTPROPERTY)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync usageGuestProperty();
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif /* VBOX_WITH_GUEST_PROPS defined */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (u64Cmd & USAGE_METRICS)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("VBoxManage metrics list [*|host|<vmname> [<metric_list>]] (comma-separated)\n\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "VBoxManage metrics setup\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-period <seconds>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-samples <count>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-list]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [*|host|<vmname> [<metric_list>]]\n\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "VBoxManage metrics query [*|host|<vmname> [<metric_list>]]\n\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "VBoxManage metrics collect\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-period <seconds>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-samples <count>]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-list]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [-detach]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync " [*|host|<vmname> [<metric_list>]]\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync#if !defined(RT_OS_WINDOWS) || defined(VBOX_WITH_NETFLT)
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync if (u64Cmd & USAGE_HOSTONLYIFS)
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync {
d1fcf24d24368926be13484524a9e378070a9157vboxsync RTPrintf("VBoxManage hostonlyif ipconfig <name> \n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " [-dhcp| \n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " -ip<ipv4> [-netmask<ipv4> (default is 255.255.255.0)]| \n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " -ipv6<ipv6> [-netmasklengthv6<length> (default is 64)]]\n"
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync# if defined(RT_OS_WINDOWS)
410216171f7f7033678589acb6e342303978c918vboxsync " create |\n"
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync " remove <name>\n"
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync# endif
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync "\n");
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync }
ec9dc23c50665e8603e1be5a9b6b6fd4c4d949d4vboxsync#endif
d1fcf24d24368926be13484524a9e378070a9157vboxsync
d1fcf24d24368926be13484524a9e378070a9157vboxsync#if !defined(RT_OS_WINDOWS) || defined(VBOX_WITH_NETFLT)
d1fcf24d24368926be13484524a9e378070a9157vboxsync if (u64Cmd & USAGE_DHCPSERVER)
d1fcf24d24368926be13484524a9e378070a9157vboxsync {
b0e4c86da01d9a0941097b9576925ee5bafae0b4vboxsync RTPrintf("VBoxManage dhcpserver [add | modify] [-netname <network_name> | -ifname <hostonly_if_name>]\n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " [-ip <ip_address>\n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " -netmask <network_mask>\n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " -lowerip <lower_ip>\n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " -upperip <upper_ip>]\n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " [-enable | -disable]\n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync " remove [-netname <network_name> | -ifname <hostonly_if_name>]\n"
d1fcf24d24368926be13484524a9e378070a9157vboxsync "\n");
d1fcf24d24368926be13484524a9e378070a9157vboxsync }
d1fcf24d24368926be13484524a9e378070a9157vboxsync#endif
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync}
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync/**
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * Print a usage synopsis and the syntax error message.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsyncint errorSyntax(USAGECATEGORY u64Cmd, const char *pszFormat, ...)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync{
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync va_list args;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync showLogo(); // show logo even if suppressed
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifndef VBOX_ONLY_DOCS
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (g_fInternalMode)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync printUsageInternal(u64Cmd);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync printUsage(u64Cmd);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif /* !VBOX_ONLY_DOCS */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync va_start(args, pszFormat);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("\n"
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync "Syntax error: %N\n", pszFormat, &args);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync va_end(args);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync return 1;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync}
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync/**
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * Print an error message without the syntax stuff.
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsyncint errorArgument(const char *pszFormat, ...)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync{
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync va_list args;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync va_start(args, pszFormat);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("error: %N\n", pszFormat, &args);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync va_end(args);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync return 1;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync}
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#ifndef VBOX_ONLY_DOCS
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync/**
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync * Print out progress on the console
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsyncvoid showProgress(ComPtr<IProgress> progress)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync{
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync BOOL fCompleted;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync LONG currentPercent;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync LONG lastPercent = 0;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("0%%...");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTStrmFlush(g_pStdOut);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync while (SUCCEEDED(progress->COMGETTER(Completed(&fCompleted))))
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync progress->COMGETTER(Percent(&currentPercent));
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync /* did we cross a 10% mark? */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (((currentPercent / 10) > (lastPercent / 10)))
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync /* make sure to also print out missed steps */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync for (LONG curVal = (lastPercent / 10) * 10 + 10; curVal <= (currentPercent / 10) * 10; curVal += 10)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (curVal < 100)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("%ld%%...", curVal);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTStrmFlush(g_pStdOut);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync lastPercent = (currentPercent / 10) * 10;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (fCompleted)
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync break;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync /* make sure the loop is not too tight */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync progress->WaitForCompletion(100);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync /* complete the line. */
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync HRESULT rc;
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (SUCCEEDED(progress->COMGETTER(ResultCode)(&rc)))
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync {
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync if (SUCCEEDED(rc))
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("100%%\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("FAILED\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync }
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync else
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTPrintf("\n");
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync RTStrmFlush(g_pStdOut);
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync}
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync
2711c80499bbd95e3da4a6cd2dffd9f81a5dce98vboxsync#endif /* !VBOX_ONLY_DOCS */