VBoxManageHelp.cpp revision b0ad0bbadf3a5b5258acda1bfe16f0ad8bee5ff0
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste/* $Id$ */
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste/** @file
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * VBoxManage - help and other message output.
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste */
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste/*
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * Copyright (C) 2006-2009 Sun Microsystems, Inc.
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste *
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * This file is part of VirtualBox Open Source Edition (OSE), as
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * available from http://www.virtualbox.org. This file is free software;
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * you can redistribute it and/or modify it under the terms of the GNU
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * General Public License (GPL) as published by the Free Software
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * Foundation, in version 2 as it comes in the "COPYING" file of the
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste *
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts * Clara, CA 95054 USA or visit http://www.sun.com if you need
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts * additional information or have any questions.
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts/*******************************************************************************
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts* Header Files *
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts*******************************************************************************/
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#include <VBox/version.h>
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#include <iprt/ctype.h>
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#include <iprt/err.h>
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#include <iprt/getopt.h>
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#include <iprt/stream.h>
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#include "VBoxManage.h"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpottsvoid showLogo(void)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts{
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts static bool s_fShown; /* show only once */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (!s_fShown)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VirtualBox Command Line Management Interface Version "
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts VBOX_VERSION_STRING "\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste "(C) 2005-2009 Sun Microsystems, Inc.\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste "All rights reserved.\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste s_fShown = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts}
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpottsvoid printUsage(USAGECATEGORY u64Cmd)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts{
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef RT_OS_LINUX
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fLinux = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fLinux = false;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef RT_OS_WINDOWS
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fWin = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fWin = false;
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste#endif
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste#ifdef RT_OS_SOLARIS
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fSolaris = true;
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste#else
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste bool fSolaris = false;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef RT_OS_DARWIN
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fDarwin = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fDarwin = false;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_VRDP
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fVRDP = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fVRDP = false;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_VBOXSDL
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fVBoxSDL = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts bool fVBoxSDL = false;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste if (u64Cmd == USAGE_DUMPOPTS)
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste {
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste fLinux = true;
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste fWin = true;
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste fSolaris = true;
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste fDarwin = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts fVRDP = true;
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste fVBoxSDL = true;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts u64Cmd = USAGE_ALL;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf("Usage:\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd == USAGE_ALL)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage [-v|--version] print version number and exit\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "VBoxManage [-q|--nologo] ... suppress the logo\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste }
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste if (u64Cmd & USAGE_LIST)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#if defined(VBOX_WITH_NETFLT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " bridgedifs|hostonlyifs|dhcpservers|hostinfo|\n"
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste#else
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " bridgedifs|dhcpservers|hostinfo|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " hostcpuids|hddbackends|hdds|dvds|floppies|\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " usbhost|usbfilters|systemproperties\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_SHOWVMINFO)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage showvminfo <uuid>|<name> [--details] [--statistics]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--machinereadable]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_REGISTERVM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage registervm <filename>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_UNREGISTERVM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage unregistervm <uuid>|<name> [--delete]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_CREATEVM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage createvm --name <name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--ostype <ostype>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--register]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--basefolder <path> | --settingsfile <path>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--uuid <uuid>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_MODIFYVM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage modifyvm <uuid|name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--name <name>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--ostype <ostype>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--memory <memorysize in MB>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--vram <vramsize in MB>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--acpi on|off]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--ioapic on|off]\n"
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste " [--pae on|off]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--hwvirtex on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--nestedpaging on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--vtxvpid on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--cpuidset <leaf> <eax> <ebx> <ecx> <edx>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--cpuidremove <leaf>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--cpuidremoveall]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--cpus <number>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--monitorcount <number>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--accelerate3d <on|off>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_VIDEOHWACCEL
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--accelerate2dvideo <on|off>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--firmware bios|efi|efi32|efi64]\n"
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste " [--bioslogofadein on|off]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--bioslogofadeout on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--bioslogodisplaytime <msec>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--bioslogoimagepath <imagepath>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--biosbootmenu disabled|menuonly|messageandmenu]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--biossystemtimeoffset <msec>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--biospxedebug on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--boot<1-4> none|floppy|dvd|disk|net>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#if defined(VBOX_WITH_NETFLT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--nic<1-N> none|null|nat|bridged|intnet|hostonly]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else /* !RT_OS_LINUX && !RT_OS_DARWIN */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--nic<1-N> none|null|nat|bridged|intnet]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif /* !RT_OS_LINUX && !RT_OS_DARWIN */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--nictype<1-N> Am79C970A|Am79C973"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_E1000
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste "|\n 82540EM|82543GC|82545EM"
b9e697e180c323785bf1cb8a29f5ec6288da8ec4Jaco Jooste#endif
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste#ifdef VBOX_WITH_VIRTIO
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "|\n virtio"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif /* VBOX_WITH_VIRTIO */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--cableconnected<1-N> on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--nictrace<1-N> on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--nictracefile<1-N> <filename>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--nicspeed<1-N> <kbps>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--bridgeadapter<1-N> none|<devicename>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#if defined(VBOX_WITH_NETFLT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--hostonlyadapter<1-N> none|<devicename>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--intnet<1-N> <network name>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--natnet<1-N> <network>|default]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--macaddress<1-N> auto|<mac>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--uart<1-N> off|<I/O base> <IRQ>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--uartmode<1-N> disconnected|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " server <pipe>|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " client <pipe>|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " file <file>|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " <devicename>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_MEM_BALLOONING
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--guestmemoryballoon <balloonsize in MB>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--gueststatisticsinterval <seconds>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts );
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf(" [--audio none|null");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (fWin)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_WINMM
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf( "|winmm|dsound");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf( "|dsound");
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste#endif
74b502cf428d057e78572e9fd66fb2f1861887b0Jaco Jooste }
63ee0c9f26b85deae17137a3965738153e0b2d20Gabor Melkvi if (fSolaris)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf( "|solaudio"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_SOLARIS_OSS
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "|oss"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts );
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (fLinux)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
74b502cf428d057e78572e9fd66fb2f1861887b0Jaco Jooste RTPrintf( "|oss"
74b502cf428d057e78572e9fd66fb2f1861887b0Jaco Jooste#ifdef VBOX_WITH_ALSA
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste "|alsa"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_PULSE
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "|pulse"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts );
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (fDarwin)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf( "|coreaudio");
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste }
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf( "]\n");
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf(" [--audiocontroller ac97|sb16]\n"
63ee0c9f26b85deae17137a3965738153e0b2d20Gabor Melkvi " [--clipboard disabled|hosttoguest|guesttohost|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " bidirectional]\n");
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste if (fVRDP)
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste {
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf(" [--vrdp on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--vrdpport default|<ports>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--vrdpaddress <host>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--vrdpauthtype null|external|guest]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--vrdpmulticon on|off]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--vrdpreusecon on|off]\n");
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf(" [--usb on|off]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--usbehci on|off]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--snapshotfolder default|<path>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--teleporter on|off]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--teleporterport <port>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--teleporteraddress <address|empty>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--teleporterpassword <password>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--hardwareuuid <uuid>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste );
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf("\n");
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ccf9d4a5c6453fa9f8b839baeee25147865fbb7dJames Phillpotts if (u64Cmd & USAGE_IMPORTAPPLIANCE)
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste {
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf("VBoxManage import <ovf> [--dry-run|-n] [more options]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " (run with -n to have options displayed\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " for a particular OVF)\n\n");
74b502cf428d057e78572e9fd66fb2f1861887b0Jaco Jooste }
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste if (u64Cmd & USAGE_EXPORTAPPLIANCE)
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste {
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste RTPrintf("VBoxManage export <machines> --output|-o <ovf>\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--legacy09]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--vsys <number of virtual system>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--product <product name>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--producturl <product url>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--vendor <vendor name>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--vendorurl <vendor url>]\n"
7197110fbdb6deb7868581c455516161cbcf7e0fJaco Jooste " [--version <version info>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--eula <license text>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--eulafile <filename>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_STARTVM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage startvm <uuid>|<name>\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf(" [--type gui");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (fVBoxSDL)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf( "|sdl");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (fVRDP)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf( "|vrdp");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf( "|headless]\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_CONTROLVM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage controlvm <uuid>|<name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " pause|resume|reset|poweroff|savestate|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " acpipowerbutton|acpisleepbutton|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " keyboardputscancode <hex> [<hex> ...]|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " injectnmi|\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " setlinkstate<1-N> on|off |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_DYNAMIC_NET_ATTACH
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#if defined(VBOX_WITH_NETFLT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " nic<1-N> null|nat|bridged|intnet|hostonly\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [<devicename>] |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#else /* !RT_OS_LINUX && !RT_OS_DARWIN */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " nic<1-N> null|nat|bridged|intnet\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [<devicename>] |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif /* !RT_OS_LINUX && !RT_OS_DARWIN */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " nictrace<1-N> on|off\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " nictracefile<1-N> <filename>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif /* VBOX_DYNAMIC_NET_ATTACH */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " usbattach <uuid>|<address> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " usbdetach <uuid>|<address> |\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (fVRDP)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf(" vrdp on|off |\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf(" vrdpport default|<ports> |\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf(" setvideomodehint <xres> <yres> <bpp> [display] |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " setcredentials <username> <password> <domain>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--allowlocallogon <yes|no>] |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " teleport --host <name> --port <port>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--maxdowntime <msec>] [--password password]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_DISCARDSTATE)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage discardstate <uuid>|<name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_ADOPTSTATE)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage adoptstate <uuid>|<name> <state_file>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_SNAPSHOT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage snapshot <uuid>|<name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " take <name> [--description <desc>] [--pause] |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " delete <uuid>|<name> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " restore <uuid>|<name> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " edit <uuid>|<name>|--current\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--name <name>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--description <desc>] |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " showvminfo <uuid>|<name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_OPENMEDIUM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage openmedium disk|dvd|floppy <filename>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--type normal|immutable|writethrough] (disk only)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--uuid <uuid>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--parentuuid <uuid>] (disk only)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_CLOSEMEDIUM)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage closemedium disk|dvd|floppy <uuid>|<filename>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--delete]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_STORAGEATTACH)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage storageattach <uuid|vmname>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --storagectl <name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --port <number>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --device <number>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--type <dvddrive|hdd|fdd>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --medium <none|emptydrive|uuid|filename|host:<drive>>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--passthrough <on|off>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--forceunmount]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_STORAGECONTROLLER)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage storagectl <uuid|vmname>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --name <name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--add <ide/sata/scsi/floppy>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--controller <LsiLogic/BusLogic/IntelAhci/PIIX3/PIIX4/ICH6/I82078>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--sataideemulation<1-4> <1-30>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--sataportcount <1-30>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--remove]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_SHOWHDINFO)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage showhdinfo <uuid>|<filename>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_CREATEHD)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage createhd --filename <filename>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --size <megabytes>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--format VDI|VMDK|VHD] (default: VDI)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--variant Standard,Fixed,Split2G,Stream,ESX]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--type normal|writethrough] (default: normal)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--comment <comment>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--remember]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_MODIFYHD)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage modifyhd <uuid>|<filename>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--type normal|writethrough|immutable]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--autoreset on|off]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--compact]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_CLONEHD)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage clonehd <uuid>|<filename> <outputfile>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--format VDI|VMDK|VHD|RAW|<other>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--variant Standard,Fixed,Split2G,Stream,ESX]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--type normal|writethrough|immutable]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--remember] [--existing]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_CONVERTFROMRAW)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage convertfromraw <filename> <outputfile>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--format VDI|VMDK|VHD]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--variant Standard,Fixed,Split2G,Stream,ESX]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "VBoxManage convertfromraw stdin <outputfile> <bytes>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--format VDI|VMDK|VHD]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--variant Standard,Fixed,Split2G,Stream,ESX]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_ADDISCSIDISK)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage addiscsidisk --server <name>|<ip>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --target <target>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--port <port>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--lun <lun>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--encodedlun <lun>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--username <username>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--password <password>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--type normal|writethrough|immutable]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--comment <comment>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--intnet]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_GETEXTRADATA)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage getextradata global|<uuid>|<name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " <key>|enumerate\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_SETEXTRADATA)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage setextradata global|<uuid>|<name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " <key>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [<value>] (no value deletes key)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_SETPROPERTY)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage setproperty hdfolder default|<folder> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " machinefolder default|<folder> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " vrdpauthlibrary default|<library> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " websrvauthlibrary default|null|<library> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " loghistorycount <value>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_USBFILTER_ADD)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage usbfilter add <index,0-N>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --target <uuid>|<name>|global\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --name <string>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --action ignore|hold (global filters only)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--active yes|no] (yes)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--vendorid <XXXX>] (null)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--productid <XXXX>] (null)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--revision <IIFF>] (null)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--manufacturer <string>] (null)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--product <string>] (null)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--remote yes|no] (null, VM filters only)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--serialnumber <string>] (null)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--maskedinterfaces <XXXXXXXX>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_USBFILTER_MODIFY)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage usbfilter modify <index,0-N>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --target <uuid>|<name>|global\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--name <string>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--action ignore|hold] (global filters only)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--active yes|no]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--vendorid <XXXX>|\"\"]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--productid <XXXX>|\"\"]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--revision <IIFF>|\"\"]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--manufacturer <string>|\"\"]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--product <string>|\"\"]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--remote yes|no] (null, VM filters only)\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--serialnumber <string>|\"\"]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--maskedinterfaces <XXXXXXXX>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_USBFILTER_REMOVE)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage usbfilter remove <index,0-N>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --target <uuid>|<name>|global\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_SHAREDFOLDER_ADD)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage sharedfolder add <vmname>|<uuid>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --name <name> --hostpath <hostpath>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--transient] [--readonly]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_SHAREDFOLDER_REMOVE)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage sharedfolder remove <vmname>|<uuid>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --name <name> [--transient]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_VM_STATISTICS)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage vmstatistics <vmname>|<uuid> [--reset]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--pattern <pattern>] [--descriptions]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifdef VBOX_WITH_GUEST_PROPS
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_GUESTPROPERTY)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts usageGuestProperty();
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif /* VBOX_WITH_GUEST_PROPS defined */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_METRICS)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage metrics list [*|host|<vmname> [<metric_list>]]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " (comma-separated)\n\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "VBoxManage metrics setup\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--period <seconds>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--samples <count>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--list]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [*|host|<vmname> [<metric_list>]]\n\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "VBoxManage metrics query [*|host|<vmname> [<metric_list>]]\n\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "VBoxManage metrics collect\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--period <seconds>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--samples <count>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--list]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--detach]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [*|host|<vmname> [<metric_list>]]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#if defined(VBOX_WITH_NETFLT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_HOSTONLYIFS)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage hostonlyif ipconfig <name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--dhcp |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts# if defined(RT_OS_WINDOWS)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " create |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " remove <name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts# endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (u64Cmd & USAGE_DHCPSERVER)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts {
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("VBoxManage dhcpserver add|modify --netname <network_name> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#if defined(VBOX_WITH_NETFLT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --ifname <hostonly_if_name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--ip <ip_address>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --netmask <network_mask>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --lowerip <lower_ip>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --upperip <upper_ip>]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " [--enable | --disable]\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "VBoxManage dhcpserver remove --netname <network_name> |\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#if defined(VBOX_WITH_NETFLT)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts " --ifname <hostonly_if_name>\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "\n");
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts }
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts}
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts/**
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts * Print a usage synopsis and the syntax error message.
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpottsint errorSyntax(USAGECATEGORY u64Cmd, const char *pszFormat, ...)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts{
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts va_list args;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts showLogo(); // show logo even if suppressed
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#ifndef VBOX_ONLY_DOCS
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts if (g_fInternalMode)
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts printUsageInternal(u64Cmd);
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts else
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts printUsage(u64Cmd);
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts#endif /* !VBOX_ONLY_DOCS */
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts va_start(args, pszFormat);
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts RTPrintf("\n"
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts "Syntax error: %N\n", pszFormat, &args);
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts va_end(args);
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts return 1;
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts}
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts/**
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts * errorSyntax for RTGetOpt users.
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts *
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts * @returns 1.
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts *
ca7a323358dc50374d5f281355842fb7edb3983eJames Phillpotts * @param fUsageCategory The usage category of the command.
* @param rc The RTGetOpt return code.
* @param pValueUnion The value union.
*/
int errorGetOpt(USAGECATEGORY fUsageCategory, int rc, union RTGETOPTUNION const *pValueUnion)
{
showLogo(); // show logo even if suppressed
#ifndef VBOX_ONLY_DOCS
if (g_fInternalMode)
printUsageInternal(fUsageCategory);
else
printUsage(fUsageCategory);
#endif /* !VBOX_ONLY_DOCS */
if (rc == VINF_GETOPT_NOT_OPTION)
return RTPrintf("error: Invalid parameter '%s'\n", pValueUnion->psz);
if (rc > 0)
{
if (RT_C_IS_PRINT(rc))
return RTPrintf("error: Invalid option -%c\n", rc);
return RTPrintf("error: Invalid option case %i\n", rc);
}
if (rc == VERR_GETOPT_UNKNOWN_OPTION)
return RTPrintf("error: unknown option: %s\n", pValueUnion->psz);
if (pValueUnion->pDef)
return RTPrintf("error: %s: %Rrs\n", pValueUnion->pDef->pszLong, rc);
return RTPrintf("error: %Rrs\n", rc);
}
/**
* Print an error message without the syntax stuff.
*/
int errorArgument(const char *pszFormat, ...)
{
va_list args;
va_start(args, pszFormat);
RTPrintf("error: %N\n", pszFormat, &args);
va_end(args);
return 1;
}