/* $Id: VBoxManageHelp.cpp 89597 2021-06-10 12:41:30Z vboxsync $ */ /** @file * VBoxManage - help and other message output. */ /* * Copyright (C) 2006-2020 Oracle Corporation * * This file is part of VirtualBox Open Source Edition (OSE), as * available from http://www.virtualbox.org. This file is free software; * you can redistribute it and/or modify it under the terms of the GNU * 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. */ /********************************************************************************************************************************* * Header Files * *********************************************************************************************************************************/ #include #include #include #include #include #include #include #include #include #include "VBoxManage.h" /********************************************************************************************************************************* * Defined Constants And Macros * *********************************************************************************************************************************/ /** If the usage is the given number of length long or longer, the error is * repeated so the user can actually see it. */ #define ERROR_REPEAT_AFTER_USAGE_LENGTH 16 /********************************************************************************************************************************* * Global Variables * *********************************************************************************************************************************/ #ifndef VBOX_ONLY_DOCS static enum HELP_CMD_VBOXMANAGE g_enmCurCommand = HELP_CMD_VBOXMANAGE_INVALID; /** The scope mask for the current subcommand. */ static uint64_t g_fCurSubcommandScope = RTMSGREFENTRYSTR_SCOPE_GLOBAL; /** * Sets the current command. * * This affects future calls to error and help functions. * * @param enmCommand The command. */ void setCurrentCommand(enum HELP_CMD_VBOXMANAGE enmCommand) { Assert(g_enmCurCommand == HELP_CMD_VBOXMANAGE_INVALID); g_enmCurCommand = enmCommand; g_fCurSubcommandScope = RTMSGREFENTRYSTR_SCOPE_GLOBAL; } /** * Sets the current subcommand. * * This affects future calls to error and help functions. * * @param fSubcommandScope The subcommand scope. */ void setCurrentSubcommand(uint64_t fSubcommandScope) { g_fCurSubcommandScope = fSubcommandScope; } /** * Prints brief help for a command or subcommand. * * @returns Number of lines written. * @param enmCommand The command. * @param fSubcommandScope The subcommand scope, REFENTRYSTR_SCOPE_GLOBAL * for all. * @param pStrm The output stream. */ static uint32_t printBriefCommandOrSubcommandHelp(enum HELP_CMD_VBOXMANAGE enmCommand, uint64_t fSubcommandScope, PRTSTREAM pStrm) { uint32_t cLinesWritten = 0; uint32_t cPendingBlankLines = 0; uint32_t cFound = 0; for (uint32_t i = 0; i < g_cHelpEntries; i++) { PCRTMSGREFENTRY pHelp = g_apHelpEntries[i]; if (pHelp->idInternal == (int64_t)enmCommand) { cFound++; if (cFound == 1) { if (fSubcommandScope == RTMSGREFENTRYSTR_SCOPE_GLOBAL) RTStrmPrintf(pStrm, "Usage - %c%s:\n", RT_C_TO_UPPER(pHelp->pszBrief[0]), pHelp->pszBrief + 1); else RTStrmPrintf(pStrm, "Usage:\n"); } RTMsgRefEntryPrintStringTable(pStrm, &pHelp->Synopsis, fSubcommandScope, &cPendingBlankLines, &cLinesWritten); if (!cPendingBlankLines) cPendingBlankLines = 1; } } Assert(cFound > 0); return cLinesWritten; } /** * Prints the brief usage information for the current (sub)command. * * @param pStrm The output stream. */ void printUsage(PRTSTREAM pStrm) { printBriefCommandOrSubcommandHelp(g_enmCurCommand, g_fCurSubcommandScope, pStrm); } /** * Prints full help for a command or subcommand. * * @param enmCommand The command. * @param fSubcommandScope The subcommand scope, REFENTRYSTR_SCOPE_GLOBAL * for all. * @param pStrm The output stream. */ static void printFullCommandOrSubcommandHelp(enum HELP_CMD_VBOXMANAGE enmCommand, uint64_t fSubcommandScope, PRTSTREAM pStrm) { uint32_t cPendingBlankLines = 0; uint32_t cFound = 0; for (uint32_t i = 0; i < g_cHelpEntries; i++) { PCRTMSGREFENTRY pHelp = g_apHelpEntries[i]; if ( pHelp->idInternal == (int64_t)enmCommand || enmCommand == HELP_CMD_VBOXMANAGE_INVALID) { cFound++; RTMsgRefEntryPrintStringTable(pStrm, &pHelp->Help, fSubcommandScope, &cPendingBlankLines, NULL /*pcLinesWritten*/); if (cPendingBlankLines < 2) cPendingBlankLines = 2; } } Assert(cFound > 0); } /** * Prints the full help for the current (sub)command. * * @param pStrm The output stream. */ void printHelp(PRTSTREAM pStrm) { printFullCommandOrSubcommandHelp(g_enmCurCommand, g_fCurSubcommandScope, pStrm); } /** * Display no subcommand error message and current command usage. * * @returns RTEXITCODE_SYNTAX. */ RTEXITCODE errorNoSubcommand(void) { Assert(g_enmCurCommand != HELP_CMD_VBOXMANAGE_INVALID); Assert(g_fCurSubcommandScope == RTMSGREFENTRYSTR_SCOPE_GLOBAL); return errorSyntax("No subcommand specified"); } /** * Display unknown subcommand error message and current command usage. * * May show full command help instead if the subcommand is a common help option. * * @returns RTEXITCODE_SYNTAX, or RTEXITCODE_SUCCESS if common help option. * @param pszSubcommand The name of the alleged subcommand. */ RTEXITCODE errorUnknownSubcommand(const char *pszSubcommand) { Assert(g_enmCurCommand != HELP_CMD_VBOXMANAGE_INVALID); Assert(g_fCurSubcommandScope == RTMSGREFENTRYSTR_SCOPE_GLOBAL); /* check if help was requested. */ if ( strcmp(pszSubcommand, "--help") == 0 || strcmp(pszSubcommand, "-h") == 0 || strcmp(pszSubcommand, "-?") == 0) { printFullCommandOrSubcommandHelp(g_enmCurCommand, g_fCurSubcommandScope, g_pStdOut); return RTEXITCODE_SUCCESS; } return errorSyntax("Unknown subcommand: %s", pszSubcommand); } /** * Display too many parameters error message and current command usage. * * May show full command help instead if the subcommand is a common help option. * * @returns RTEXITCODE_SYNTAX, or RTEXITCODE_SUCCESS if common help option. * @param papszArgs The first unwanted parameter. Terminated by * NULL entry. */ RTEXITCODE errorTooManyParameters(char **papszArgs) { Assert(g_enmCurCommand != HELP_CMD_VBOXMANAGE_INVALID); Assert(g_fCurSubcommandScope != RTMSGREFENTRYSTR_SCOPE_GLOBAL); /* check if help was requested. */ if (papszArgs) { for (uint32_t i = 0; papszArgs[i]; i++) if ( strcmp(papszArgs[i], "--help") == 0 || strcmp(papszArgs[i], "-h") == 0 || strcmp(papszArgs[i], "-?") == 0) { printFullCommandOrSubcommandHelp(g_enmCurCommand, g_fCurSubcommandScope, g_pStdOut); return RTEXITCODE_SUCCESS; } else if (!strcmp(papszArgs[i], "--")) break; } return errorSyntax("Too many parameters"); } /** * Display current (sub)command usage and the custom error message. * * @returns RTEXITCODE_SYNTAX. * @param pszFormat Custom error message format string. * @param ... Format arguments. */ RTEXITCODE errorSyntax(const char *pszFormat, ...) { Assert(g_enmCurCommand != HELP_CMD_VBOXMANAGE_INVALID); showLogo(g_pStdErr); va_list va; va_start(va, pszFormat); RTMsgErrorV(pszFormat, va); va_end(va); RTStrmPutCh(g_pStdErr, '\n'); if ( printBriefCommandOrSubcommandHelp(g_enmCurCommand, g_fCurSubcommandScope, g_pStdErr) >= ERROR_REPEAT_AFTER_USAGE_LENGTH) { /* Usage was very long, repeat the error message. */ RTStrmPutCh(g_pStdErr, '\n'); va_start(va, pszFormat); RTMsgErrorV(pszFormat, va); va_end(va); } return RTEXITCODE_SYNTAX; } /** * Worker for errorGetOpt. * * @param rcGetOpt The RTGetOpt return value. * @param pValueUnion The value union returned by RTGetOpt. */ static void errorGetOptWorker(int rcGetOpt, union RTGETOPTUNION const *pValueUnion) { if (rcGetOpt == VINF_GETOPT_NOT_OPTION) RTMsgError("Invalid parameter '%s'", pValueUnion->psz); else if (rcGetOpt > 0) { if (RT_C_IS_PRINT(rcGetOpt)) RTMsgError("Invalid option -%c", rcGetOpt); else RTMsgError("Invalid option case %i", rcGetOpt); } else if (rcGetOpt == VERR_GETOPT_UNKNOWN_OPTION) RTMsgError("Unknown option: %s", pValueUnion->psz); else if (rcGetOpt == VERR_GETOPT_INVALID_ARGUMENT_FORMAT) RTMsgError("Invalid argument format: %s", pValueUnion->psz); else if (pValueUnion->pDef) RTMsgError("%s: %Rrs", pValueUnion->pDef->pszLong, rcGetOpt); else RTMsgError("%Rrs", rcGetOpt); } /** * For use to deal with RTGetOptFetchValue failures. * * @retval RTEXITCODE_SYNTAX * @param iValueNo The value number being fetched, counting the * RTGetOpt value as zero and the first * RTGetOptFetchValue call as one. * @param pszOption The option being parsed. * @param rcGetOptFetchValue The status returned by RTGetOptFetchValue. * @param pValueUnion The value union returned by the fetch. */ RTEXITCODE errorFetchValue(int iValueNo, const char *pszOption, int rcGetOptFetchValue, union RTGETOPTUNION const *pValueUnion) { Assert(g_enmCurCommand != HELP_CMD_VBOXMANAGE_INVALID); showLogo(g_pStdErr); if (rcGetOptFetchValue == VERR_GETOPT_REQUIRED_ARGUMENT_MISSING) RTMsgError("Missing the %u%s value for option %s", iValueNo, iValueNo == 1 ? "st" : iValueNo == 2 ? "nd" : iValueNo == 3 ? "rd" : "th", pszOption); else errorGetOptWorker(rcGetOptFetchValue, pValueUnion); return RTEXITCODE_SYNTAX; } /** * Handled an RTGetOpt error or common option. * * This implements the 'V' and 'h' cases. It reports appropriate syntax errors * for other @a rcGetOpt values. * * @retval RTEXITCODE_SUCCESS if help or version request. * @retval RTEXITCODE_SYNTAX if not help or version request. * @param rcGetOpt The RTGetOpt return value. * @param pValueUnion The value union returned by RTGetOpt. */ RTEXITCODE errorGetOpt(int rcGetOpt, union RTGETOPTUNION const *pValueUnion) { Assert(g_enmCurCommand != HELP_CMD_VBOXMANAGE_INVALID); /* * Check if it is an unhandled standard option. */ if (rcGetOpt == 'V') { RTPrintf("%sr%d\n", VBOX_VERSION_STRING, RTBldCfgRevision()); return RTEXITCODE_SUCCESS; } if (rcGetOpt == 'h') { printFullCommandOrSubcommandHelp(g_enmCurCommand, g_fCurSubcommandScope, g_pStdOut); return RTEXITCODE_SUCCESS; } /* * We failed. */ showLogo(g_pStdErr); errorGetOptWorker(rcGetOpt, pValueUnion); if ( printBriefCommandOrSubcommandHelp(g_enmCurCommand, g_fCurSubcommandScope, g_pStdErr) >= ERROR_REPEAT_AFTER_USAGE_LENGTH) { /* Usage was very long, repeat the error message. */ RTStrmPutCh(g_pStdErr, '\n'); errorGetOptWorker(rcGetOpt, pValueUnion); } return RTEXITCODE_SYNTAX; } #endif /* !VBOX_ONLY_DOCS */ void showLogo(PRTSTREAM pStrm) { static bool s_fShown; /* show only once */ if (!s_fShown) { RTStrmPrintf(pStrm, VBOX_PRODUCT " Command Line Management Interface Version " VBOX_VERSION_STRING "\n" "(C) 2005-" VBOX_C_YEAR " " VBOX_VENDOR "\n" "All rights reserved.\n" "\n"); s_fShown = true; } } void printUsage(USAGECATEGORY enmCommand, uint64_t fSubcommandScope, PRTSTREAM pStrm) { bool fDumpOpts = false; #ifdef RT_OS_LINUX bool fLinux = true; #else bool fLinux = false; #endif #ifdef RT_OS_WINDOWS bool fWin = true; #else bool fWin = false; #endif #ifdef RT_OS_SOLARIS bool fSolaris = true; #else bool fSolaris = false; #endif #ifdef RT_OS_FREEBSD bool fFreeBSD = true; #else bool fFreeBSD = false; #endif #ifdef RT_OS_DARWIN bool fDarwin = true; #else bool fDarwin = false; #endif #ifdef VBOX_WITH_VBOXSDL bool fVBoxSDL = true; #else bool fVBoxSDL = false; #endif Assert(enmCommand != USAGE_INVALID); Assert(enmCommand != USAGE_S_NEWCMD); if (enmCommand == USAGE_S_DUMPOPTS) { fDumpOpts = true; fLinux = true; fWin = true; fSolaris = true; fFreeBSD = true; fDarwin = true; fVBoxSDL = true; enmCommand = USAGE_S_ALL; } RTStrmPrintf(pStrm, "Usage:\n" "\n"); if (enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, " VBoxManage [] \n" "\n" "\n" "General Options:\n" "\n" " [-V|--version] print version number and exit\n" " [--dump-build-type] print build type and exit\n" " [-q|--nologo] suppress the logo\n" " [--settingspw ] provide the settings password\n" " [--settingspwfile ] provide a file containing the settings password\n" " [@] load arguments from the given response file (bourne style)\n" "\n" "\n" "Commands:\n" "\n"); const char *pcszSep1 = " "; const char *pcszSep2 = " "; if (enmCommand != USAGE_S_ALL) { pcszSep1 = "VBoxManage"; pcszSep2 = ""; } #define SEP pcszSep1, pcszSep2 if (enmCommand == USAGE_LIST || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s list [--long|-l] [--sorted|-s]%s vms|runningvms|ostypes|hostdvds|hostfloppies|\n" #if defined(VBOX_WITH_NETFLT) " intnets|bridgedifs|hostonlyifs|natnets|dhcpservers|\n" #else " intnets|bridgedifs|natnets|dhcpservers|hostinfo|\n" #endif " hostinfo|hostcpuids|hddbackends|hdds|dvds|floppies|\n" " usbhost|usbfilters|systemproperties|extpacks|\n" " groups|webcams|screenshotformats|cloudproviders|\n" #if defined(VBOX_WITH_CLOUD_NET) " cloudprofiles|cloudnets|cpu-profiles|hostdrives\n" #else " cloudprofiles|cpu-profiles|hostdrives\n" #endif "\n", SEP); if (enmCommand == USAGE_SHOWVMINFO || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s showvminfo %s [--details]\n" " [--machinereadable]\n" "%s showvminfo %s --log \n" "\n", SEP, SEP); if (enmCommand == USAGE_REGISTERVM || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s registervm %s \n" "\n", SEP); if (enmCommand == USAGE_UNREGISTERVM || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s unregistervm %s [--delete]\n" "\n", SEP); if (enmCommand == USAGE_CREATEVM || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s createvm %s --name \n" " [--groups , ...]\n" " [--ostype ]\n" " [--register]\n" " [--basefolder ]\n" " [--uuid ]\n" " [--default]\n" "\n", SEP); if (enmCommand == USAGE_MODIFYVM || enmCommand == USAGE_S_ALL) { RTStrmPrintf(pStrm, "%s modifyvm %s \n" " [--name ]\n" " [--groups , ...]\n" " [--description ]\n" " [--ostype ]\n" " [--iconfile ]\n" " [--memory ]\n" " [--pagefusion on|off]\n" " [--vram ]\n" " [--acpi on|off]\n" #ifdef VBOX_WITH_PCI_PASSTHROUGH " [--pciattach 03:04.0]\n" " [--pciattach 03:04.0@02:01.0]\n" " [--pcidetach 03:04.0]\n" #endif " [--ioapic on|off]\n" " [--hpet on|off]\n" " [--triplefaultreset on|off]\n" " [--apic on|off]\n" " [--x2apic on|off]\n" " [--paravirtprovider none|default|legacy|minimal|\n" " hyperv|kvm]\n" " [--paravirtdebug [, ...]]\n" " [--hwvirtex on|off]\n" " [--nestedpaging on|off]\n" " [--largepages on|off]\n" " [--vtxvpid on|off]\n" " [--vtxux on|off]\n" " [--pae on|off]\n" " [--longmode on|off]\n" " [--ibpb-on-vm-exit on|off]\n" " [--ibpb-on-vm-entry on|off]\n" " [--spec-ctrl on|off]\n" " [--l1d-flush-on-sched on|off]\n" " [--l1d-flush-on-vm-entry on|off]\n" " [--mds-clear-on-sched on|off]\n" " [--mds-clear-on-vm-entry on|off]\n" " [--nested-hw-virt on|off]\n" " [--virt-vmsave-vmload on|off]\n" " [--cpu-profile \"host|Intel 80[86|286|386]\"]\n" " [--cpuid-portability-level <0..3>]\n" " [--cpuid-set ]\n" " [--cpuid-remove ]\n" " [--cpuidremoveall]\n" " [--hardwareuuid ]\n" " [--cpus ]\n" " [--cpuhotplug on|off]\n" " [--plugcpu ]\n" " [--unplugcpu ]\n" " [--cpuexecutioncap <1-100>]\n" " [--rtcuseutc on|off]\n" #ifdef VBOX_WITH_VMSVGA " [--graphicscontroller none|vboxvga|vmsvga|vboxsvga]\n" #else " [--graphicscontroller none|vboxvga]\n" #endif " [--monitorcount ]\n" " [--accelerate3d on|off]\n" #ifdef VBOX_WITH_VIDEOHWACCEL " [--accelerate2dvideo on|off]\n" #endif " [--firmware bios|efi|efi32|efi64]\n" " [--chipset ich9|piix3]\n" #if defined(VBOX_WITH_IOMMU_AMD) && defined(VBOX_WITH_IOMMU_INTEL) " [--iommu none|automatic|amd|intel]\n" #elif defined(VBOX_WITH_IOMMU_AMD) " [--iommu none|automatic|amd]\n" #elif defined(VBOX_WITH_IOMMU_INTEL) " [--iommu none|automatic|intel]\n" #endif " [--bioslogofadein on|off]\n" " [--bioslogofadeout on|off]\n" " [--bioslogodisplaytime ]\n" " [--bioslogoimagepath ]\n" " [--biosbootmenu disabled|menuonly|messageandmenu]\n" " [--biosapic disabled|apic|x2apic]\n" " [--biossystemtimeoffset ]\n" " [--biospxedebug on|off]\n" " [--system-uuid-le on|off]\n" " [--boot<1-4> none|floppy|dvd|disk|net>]\n" " [--nic<1-N> none|null|nat|bridged|intnet" #if defined(VBOX_WITH_NETFLT) "|hostonly" #endif "|\n" " generic|natnetwork" "]\n" " [--nictype<1-N> Am79C970A|Am79C973|Am79C960" #ifdef VBOX_WITH_E1000 "|\n 82540EM|82543GC|82545EM" #endif #ifdef VBOX_WITH_VIRTIO "|\n virtio" #endif /* VBOX_WITH_VIRTIO */ "]\n" " [--cableconnected<1-N> on|off]\n" " [--nictrace<1-N> on|off]\n" " [--nictracefile<1-N> ]\n" " [--nicproperty<1-N> name=[value]]\n" " [--nicspeed<1-N> ]\n" " [--nicbootprio<1-N> ]\n" " [--nicpromisc<1-N> deny|allow-vms|allow-all]\n" " [--nicbandwidthgroup<1-N> none|]\n" " [--bridgeadapter<1-N> none|]\n" #if defined(VBOX_WITH_NETFLT) " [--hostonlyadapter<1-N> none|]\n" #endif " [--intnet<1-N> ]\n" " [--nat-network<1-N> ]\n" " [--nicgenericdrv<1-N> ]\n" " [--natnet<1-N> |default]\n" " [--natsettings<1-N> [],[],\n" " [],[],\n" " []]\n" " [--natpf<1-N> [],tcp|udp,[],\n" " ,[],]\n" " [--natpf<1-N> delete ]\n" " [--nattftpprefix<1-N> ]\n" " [--nattftpfile<1-N> ]\n" " [--nattftpserver<1-N> ]\n" " [--natbindip<1-N> ]\n" " [--natdnspassdomain<1-N> on|off]\n" " [--natdnsproxy<1-N> on|off]\n" " [--natdnshostresolver<1-N> on|off]\n" " [--nataliasmode<1-N> default|[log],[proxyonly],\n" " [sameports]]\n" " [--macaddress<1-N> auto|]\n" " [--mouse ps2|usb|usbtablet|usbmultitouch]\n" " [--keyboard ps2|usb]\n" " [--uart<1-N> off| ]\n" " [--uartmode<1-N> disconnected|\n" " server |\n" " client |\n" " tcpserver |\n" " tcpclient |\n" " file |\n" " ]\n" " [--uarttype<1-N> 16450|16550A|16750]\n" #if defined(RT_OS_LINUX) || defined(RT_OS_WINDOWS) " [--lpt<1-N> off| ]\n" " [--lptmode<1-N> ]\n" #endif " [--guestmemoryballoon ]\n" " [--vm-process-priority default|flat|low|normal|high]\n" " [--audio none|null", SEP); if (fWin) { #ifdef VBOX_WITH_WINMM RTStrmPrintf(pStrm, "|winmm|dsound"); #else RTStrmPrintf(pStrm, "|dsound"); #endif } if (fLinux || fSolaris) { RTStrmPrintf(pStrm, "" #ifdef VBOX_WITH_AUDIO_OSS "|oss" #endif #ifdef VBOX_WITH_AUDIO_ALSA "|alsa" #endif #ifdef VBOX_WITH_AUDIO_PULSE "|pulse" #endif ); } if (fFreeBSD) { #ifdef VBOX_WITH_AUDIO_OSS /* Get the line break sorted when dumping all option variants. */ if (fDumpOpts) { RTStrmPrintf(pStrm, "|\n" " oss"); } else RTStrmPrintf(pStrm, "|oss"); #endif #ifdef VBOX_WITH_AUDIO_PULSE RTStrmPrintf(pStrm, "|pulse"); #endif } if (fDarwin) { RTStrmPrintf(pStrm, "|coreaudio"); } RTStrmPrintf(pStrm, "]\n"); RTStrmPrintf(pStrm, " [--audioin on|off]\n" " [--audioout on|off]\n" " [--audiocontroller ac97|hda|sb16]\n" " [--audiocodec stac9700|ad1980|stac9221|sb16]\n" #ifdef VBOX_WITH_SHARED_CLIPBOARD " [--clipboard-mode disabled|hosttoguest|guesttohost|\n" " bidirectional]\n" # ifdef VBOX_WITH_SHARED_CLIPBOARD_TRANSFERS " [--clipboard-file-transfers enabled|disabled]\n" # endif #endif " [--draganddrop disabled|hosttoguest|guesttohost|\n" " bidirectional]\n"); RTStrmPrintf(pStrm, " [--vrde on|off]\n" " [--vrdeextpack default|]\n" " [--vrdeproperty ]\n" " [--vrdeport ]\n" " [--vrdeaddress ]\n" " [--vrdeauthtype null|external|guest]\n" " [--vrdeauthlibrary default|]\n" " [--vrdemulticon on|off]\n" " [--vrdereusecon on|off]\n" " [--vrdevideochannel on|off]\n" " [--vrdevideochannelquality ]\n"); RTStrmPrintf(pStrm, " [--usbohci on|off]\n" " [--usbehci on|off]\n" " [--usbxhci on|off]\n" " [--usbrename ]\n" " [--snapshotfolder default|]\n" " [--teleporter on|off]\n" " [--teleporterport ]\n" " [--teleporteraddress ]\n" " [--teleporterpassword ]\n" " [--teleporterpasswordfile |stdin]\n" " [--tracing-enabled on|off]\n" " [--tracing-config ]\n" " [--tracing-allow-vm-access on|off]\n" #if 0 " [--iocache on|off]\n" " [--iocachesize ]\n" #endif #ifdef VBOX_WITH_USB_CARDREADER " [--usbcardreader on|off]\n" #endif " [--autostart-enabled on|off]\n" " [--autostart-delay ]\n" #if 0 " [--autostop-type disabled|savestate|poweroff|\n" " acpishutdown]\n" #endif #ifdef VBOX_WITH_RECORDING " [--recording on|off]\n" " [--recordingscreens all| [ ...]]\n" " [--recordingfile ]\n" " [--recordingvideores ]\n" " [--recordingvideorate ]\n" " [--recordingvideofps ]\n" " [--recordingmaxtime ]\n" " [--recordingmaxsize ]\n" " [--recordingopts [, ...]]\n" #endif " [--defaultfrontend default|]\n" "\n"); } if (enmCommand == USAGE_MOVEVM || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s movevm %s \n" " --type basic\n" " [--folder ]\n" "\n", SEP); if (enmCommand == USAGE_IMPORTAPPLIANCE || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s import %s \n" " [--dry-run|-n]\n" " [--options keepallmacs|keepnatmacs|importtovdi]\n" " [--vmname ]\n" " [--cloud]\n" " [--cloudprofile ]\n" " [--cloudinstanceid ]\n" " [--cloudbucket ]\n" " [more options]\n" " (run with -n to have options displayed\n" " for a particular OVF. It doesn't work for the Cloud import.)\n\n", SEP); if (enmCommand == USAGE_EXPORTAPPLIANCE || enmCommand == USAGE_S_ALL) RTStrmPrintf(pStrm, "%s export %s --output|-o .\n" " [--legacy09|--ovf09|--ovf10|--ovf20|--opc10]\n" " [--manifest]\n" " [--iso]\n" " [--options manifest|iso|nomacs|nomacsbutnat]\n" " [--vsys ]\n" " [--vmname ]\n" " [--product ]\n" " [--producturl ]\n" " [--vendor ]\n" " [--vendorurl ]\n" " [--version ]\n" " [--description ]\n" " [--eula ]\n" " [--eulafile ]\n" " [--cloud ]\n" " [--vmname ]\n" " [--cloudprofile ]\n" " [--cloudbucket ]\n" " [--cloudkeepobject ]\n" " [--cloudlaunchmode EMULATED|PARAVIRTUALIZED]\n" " [--cloudlaunchinstance ]\n" " [--clouddomain ]\n" " [--cloudshape ]\n" " [--clouddisksize ]\n" " [--cloudocivcn ]\n" " [--cloudocisubnet ]\n" " [--cloudpublicip ]\n" " [--cloudprivateip ]\n" " [--cloudinitscriptpath