VBoxManage.cpp revision de87cd4df4a71d5c7bb5605884f1cc0ddb98c4e8
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * VBoxManage - VirtualBox's command-line interface.
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * Copyright (C) 2006-2009 Sun Microsystems, Inc.
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * available from http://www.virtualbox.org. This file is free software;
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * you can redistribute it and/or modify it under the terms of the GNU
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * General Public License (GPL) as published by the Free Software
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
1da87472ec03169be13f2a1af5d8f577f1e988f7vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
#ifndef VBOX_ONLY_DOCS
#include <vector>
#include <list>
#include "VBoxManage.h"
#ifndef VBOX_ONLY_DOCS
using namespace com;
void showLogo(void)
if (!fShown)
fShown = true;
#ifndef VBOX_ONLY_DOCS
if (machine)
bool fRegister = false;
for (int i = 0; i < a->argc; i++)
fRegister = true;
if (!name)
if (!settingsFile)
if (fRegister)
char *pszNext;
return (unsigned)u32;
#if defined(_MSC_VER)
if (machine)
#ifdef RT_OS_LINUX
if (display)
errorArgument("Missing argument to '%s'. Expected IBM PC AT set 2 keyboard scancode(s) as hex byte(s).", a->argv[1]);
int cScancodes = 0;
&& i < a->argc)
for (i = 0; i < cScancodes; i++)
if (adapter)
#ifdef VBOX_WITH_VRDP
if (vrdpServer)
if (attach)
if (attach)
bool fAllowLocalLogon = true;
fAllowLocalLogon = false;
CHECK_ERROR_BREAK(guest, SetCredentials(Bstr(a->argv[2]), Bstr(a->argv[3]), Bstr(a->argv[4]), fAllowLocalLogon));
if (!hostDVDDrive)
if (!dvdImage)
if (!dvdImage)
if (!hostFloppyDrive)
if (!floppyImage)
if (!floppyImage)
#ifdef VBOX_WITH_MEM_BALLOONING
int vrc;
int vrc;
if (machine)
if (machine)
} while (extraDataKey);
if (value)
if (machine)
} while (extraDataKey);
if (value)
if (machine)
int vrc;
if (!machine)
bool fTransient = false;
bool fWritable = true;
fWritable = false;
fTransient = true;
if (fTransient)
if (console)
bool fTransient = false;
fTransient = true;
if (!name)
if (fTransient)
if (console)
bool fReset = false;
bool fWithDescriptions = false;
if (pszPattern)
fWithDescriptions = true;
fReset = true;
if (fReset)
enum ConvertSettings
ConvertSettings_No = 0,
#ifndef VBOX_ONLY_DOCS
bool isGlobalConverted = false;
if (!accessible)
isGlobalConverted = true;
switch (fConvertSettings)
case ConvertSettings_No:
RTPrintf (
RTPrintf (
case ConvertSettings_Yes:
case ConvertSettings_Backup:
AssertFailedReturn (false);
if (isGlobalConverted)
RTR3Init();
bool fShowLogo = true;
int iCmdArg;
showLogo();
fShowLogo = false;
iCmd++;
iCmd++;
iCmd++;
iCmd++;
if (fShowLogo)
showLogo();
#ifdef VBOX_ONLY_DOCS
int rc = 0;
return rc;
char *converted;
#ifdef USE_XPCOM_QUEUE
#ifdef USE_XPCOM_QUEUE
const char *command;
} commandHandlers[] =
#ifdef VBOX_WITH_GUEST_PROPS
int commandIndex;
#ifdef USE_XPCOM_QUEUE
return rc != 0;