VBoxManageImport.cpp revision 43e9355f77c0463e7ace350984bb5a09fb8c50a1
/* $Id$ */
/** @file
* VBoxManage - The appliance-related commands.
*/
/*
* Copyright (C) 2009 Sun Microsystems, Inc.
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
#ifndef VBOX_ONLY_DOCS
/*******************************************************************************
* Header Files *
*******************************************************************************/
#ifndef VBOX_ONLY_DOCS
#include <list>
#endif /* !VBOX_ONLY_DOCS */
#include "VBoxManage.h"
using namespace com;
// funcs
///////////////////////////////////////////////////////////////////////////////
int handleImportAppliance(HandlerArg *a)
{
for (int i = 0; i < a->argc; i++)
{
if (!strOvfFilename)
strOvfFilename = a->argv[i];
else
}
if (!strOvfFilename)
do
{
RTPrintf("Interpreting...\n");
RTPrintf("OK.\n");
// fetch all disks
{
RTPrintf("Disks:");
RTPrintf("\n");
}
// fetch virtual system descriptions
if (aVirtualSystemDescriptions.size() > 0)
{
for (unsigned i = 0; i < aVirtualSystemDescriptions.size(); ++i)
{
RTPrintf("Virtual system %i:\n", i);
{
bool fUSB = false;
switch (t)
{
bstrVMname = aConfigValues[a];
RTPrintf("%2d: Suggested VM name \"%ls\""
"\n (change with \"-vsys %d -vmname <name>\")\n",
a, bstrVMname.raw(), i);
break;
bstrOstype = aConfigValues[a];
RTPrintf("%2d: Suggested OS type: \"%ls\""
"\n (change with \"-vsys %d -ostype <type>\"; use \"list ostypes\" to list all)\n",
a, bstrOstype.raw(), i);
break;
RTPrintf("%2d: Number of CPUs (ignored): %ls\n",
a, aConfigValues[a]);
break;
RTPrintf("%2d: Guest memory: %u MB\n (change with \"-vsys %d -memory <MB>\")\n",
a, ulMemMB, i);
break;
RTPrintf("%2d: IDE controller: reference ID %d"
"\n (disable with \"-vsys %d -ignore %d\")\n",
a,
aRefs[a],
i, a);
break;
RTPrintf("%2d: SATA controller: reference ID %d"
"\n (disable with \"-vsys %d -ignore %d\")\n",
a,
aRefs[a],
i, a);
break;
RTPrintf("%2d: SCSI controller: reference ID %d, type %ls"
"\n (change with \"-vsys %d -scsitype%d={BusLogic|LsiLogic}\";"
"\n disable with \"-vsys %d -ignore %d\")\n",
a,
aRefs[a],
aConfigValues[a],
i, a, i, a);
break;
RTPrintf("%2d: Hard disk image: controller %d, source image \"%ls\", target image \"%ls\""
"\n (change controller with \"-vsys %d -controller%d=<id>\";"
"\n disable with \"-vsys %d -ignore %d\")\n",
a,
aRefs[a],
aOrigValues[a],
aConfigValues[a],
i, a, i, a);
break;
RTPrintf("%2d: CD-ROM"
"\n (disable with \"-vsys %d -ignore %d\")\n",
a, i, a);
break;
RTPrintf("%2d: Floppy"
"\n (disable with \"-vsys %d -ignore %d\")\n",
a, i, a);
break;
RTPrintf("%2d: Network adapter: orig %ls, auto %ls, conf %ls\n",
a,
aOrigValues[a],
aConfigValues[a],
aExtraConfigValues[a]);
break;
RTPrintf("%2d: USB controller"
"\n (disable with \"-vsys %d -ignore %d\")\n",
a, i, a);
break;
RTPrintf("%2d: Sound card (appliance expects \"%ls\", can change on import)"
"\n (disable with \"-vsys %d -ignore %d\")\n",
a,
aOrigValues[a],
i,
a);
break;
}
}
}
RTPrintf("\n");
}
} while (0);
}
#endif /* !VBOX_ONLY_DOCS */