PDA

Просмотр полной версии : VirtualBox


Marley
27.11.2010, 20:41
Описание VBoxManage
http://mirspo.narod.ru/vbox/ch08.html


Virtual networking
http://www.virtualbox.org/manual/ch06.html


Команды:

// Клонирование диска
VBoxManage clonevdi "123.vdi" "webServerDisk3.vdi"

======================

Ошибка:

Failed to open the hard disk ....
Cannot register the hard disk '...' with UUID {'...'} because a hard disk '...' with UUID {...} already exists in the media registry ('.../.VirtualBox/VirtualBox.xml').

Решение: Сменить идентификатор


В linux

VBoxManage internalcommands setvdiuuid '.../imageDisk.vdi'

VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

UUID changed to: c150b9ba-d64e-40da-9798-3ca439be74c3


В Windows (для 4 версии):

CMD>cd C:\Program Files\Oracle\VirtualBox\
CMD>VBoxManage internalcommands sethduuid ".../imageDisk.vdi"
UUID changed to: d6ec288a-0c60-4a5b-94ad-6615e4a07a6a


В Linux (для 4.0.2 версии):

VBoxManage internalcommands sethduuid '.../imageDisk.vdi'
UUID changed to: b644adc3-66be-48d2-a2d7-ec65b2442218

Marley
27.11.2010, 20:43
VirtualBox Command Line Management Interface

VirtualBox 3.0.6



VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Usage:

VBoxManage [-v|--version] print version number and exit
VBoxManage [-q|--nologo] ... suppress the logo

VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|
bridgedifs|hostonlyifs|dhcpservers|hostinfo|
hddbackends|hdds|dvds|floppies|
usbhost|usbfilters|systemproperties

VBoxManage showvminfo <uuid>|<name> [--details] [--statistics]
[--machinereadable]

VBoxManage registervm <filename>

VBoxManage unregistervm <uuid>|<name> [--delete]

VBoxManage createvm --name <name>
[--ostype <ostype>]
[--register]
[--basefolder <path> | --settingsfile <path>]
[--uuid <uuid>]

VBoxManage modifyvm <uuid|name>
[--name <name>]
[--ostype <ostype>]
[--memory <memorysize in MB>]
[--vram <vramsize in MB>]
[--acpi on|off]
[--ioapic on|off]
[--pae on|off]
[--hwvirtex on|off]
[--nestedpaging on|off]
[--vtxvpid on|off]
[--cpus <number>]
[--monitorcount <number>]
[--accelerate3d <on|off>]
[--bioslogofadein on|off]
[--bioslogofadeout on|off]
[--bioslogodisplaytime <msec>]
[--bioslogoimagepath <imagepath>]
[--biosbootmenu disabled|menuonly|messageandmenu]
[--biossystemtimeoffset <msec>]
[--biospxedebug on|off]
[--boot<1-4> none|floppy|dvd|disk|net>]
[--hd<a|b|d> none|<uuid>|<filename>]
[--idecontroller PIIX3|PIIX4]
[--sata on|off]
[--sataportcount <1-30>]
[--sataport<1-30> none|<uuid>|<filename>]
[--sataideemulation<1-4> <1-30>]
[--scsi on|off]
[--scsiport<1-16> none|<uuid>|<filename>]
[--scsitype LsiLogic|BusLogic]
[--dvd none|<uuid>|<filename>|host:<drive>]
[--dvdpassthrough on|off]
[--floppy disabled|empty|<uuid>|
<filename>|host:<drive>]
[--nic<1-N> none|null|nat|bridged|intnet|hostonly]
[--nictype<1-N> Am79C970A|Am79C973|
82540EM|82543GC|82545EM]
[--cableconnected<1-N> on|off]
[--nictrace<1-N> on|off]
[--nictracefile<1-N> <filename>]
[--nicspeed<1-N> <kbps>]
[--bridgeadapter<1-N> none|<devicename>]
[--hostonlyadapter<1-N> none|<devicename>]
[--intnet<1-N> <network name>]
[--natnet<1-N> <network>|default]
[--macaddress<1-N> auto|<mac>]
[--uart<1-N> off|<I/O base> <IRQ>]
[--uartmode<1-N> disconnected|
server <pipe>|
client <pipe>|
file <file>|
<devicename>]
[--gueststatisticsinterval <seconds>]
[--audio none|null|oss|alsa|pulse]
[--audiocontroller ac97|sb16]
[--clipboard disabled|hosttoguest|guesttohost|
bidirectional]
[--usb on|off]
[--usbehci on|off]
[--snapshotfolder default|<path>]

VBoxManage import <ovf> [--dry-run|-n] [more options]
(run with -n to have options displayed for a particular OVF)

VBoxManage export <machines> --output|-o <ovf>
[--legacy09]
[--vsys <number of virtual system>]
[--product <product name>]
[--producturl <product url>]
[--vendor <vendor name>]
[--vendorurl <vendor url>]
[--version <version info>]
[--eula <license text>]
[--eulafile <filename>]

VBoxManage startvm <uuid>|<name>
[--type gui|sdl|headless]

VBoxManage controlvm <uuid>|<name>
pause|resume|reset|poweroff|savestate|
acpipowerbutton|acpisleepbutton|
keyboardputscancode <hex> [<hex> ...]|
injectnmi|
setlinkstate<1-N> on|off |
usbattach <uuid>|<address> |
usbdetach <uuid>|<address> |
dvdattach none|<uuid>|<filename>|host:<drive> |
floppyattach none|<uuid>|<filename>|host:<drive> |
setvideomodehint <xres> <yres> <bpp> [display]|
setcredentials <username> <password> <domain>
[--allowlocallogon <yes|no>]

VBoxManage discardstate <uuid>|<name>

VBoxManage adoptstate <uuid>|<name> <state_file>

VBoxManage snapshot <uuid>|<name>
take <name> [--description <desc>] |
discard <uuid>|<name> |
discardcurrent --state|--all |
edit <uuid>|<name>|--current
[--name <name>]
[--description <desc>] |
showvminfo <uuid>|<name>

VBoxManage openmedium disk|dvd|floppy <filename>
[--type normal|immutable|writethrough] (disk only)

VBoxManage closemedium disk|dvd|floppy <uuid>|<filename>

VBoxManage showhdinfo <uuid>|<filename>

VBoxManage createhd --filename <filename>
--size <megabytes>
[--format VDI|VMDK|VHD] (default: VDI)
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--type normal|writethrough] (default: normal)
[--comment <comment>]
[--remember]

VBoxManage modifyhd <uuid>|<filename>
[--type normal|writethrough|immutable]
[--autoreset on|off]
[--compact]

VBoxManage clonehd <uuid>|<filename> <outputfile>
[--format VDI|VMDK|VHD|RAW|<other>]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--type normal|writethrough|immutable]
[--remember] [--existing]

VBoxManage convertfromraw <filename> <outputfile>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
VBoxManage convertfromraw stdin <outputfile> <bytes>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]

VBoxManage addiscsidisk --server <name>|<ip>
--target <target>
[--port <port>]
[--lun <lun>]
[--encodedlun <lun>]
[--username <username>]
[--password <password>]
[--type normal|writethrough|immutable]
[--comment <comment>]
[--intnet]

VBoxManage getextradata global|<uuid>|<name>
<key>|enumerate

VBoxManage setextradata global|<uuid>|<name>
<key>
[<value>] (no value deletes key)

VBoxManage setproperty hdfolder default|<folder> |
machinefolder default|<folder> |
vrdpauthlibrary default|<library> |
websrvauthlibrary default|null|<library> |
loghistorycount <value>

VBoxManage usbfilter add <index,0-N>
--target <uuid>|<name>|global
--name <string>
--action ignore|hold (global filters only)
[--active yes|no] (yes)
[--vendorid <XXXX>] (null)
[--productid <XXXX>] (null)
[--revision <IIFF>] (null)
[--manufacturer <string>] (null)
[--product <string>] (null)
[--remote yes|no] (null, VM filters only)
[--serialnumber <string>] (null)
[--maskedinterfaces <XXXXXXXX>]

VBoxManage usbfilter modify <index,0-N>
--target <uuid>|<name>|global
[--name <string>]
[--action ignore|hold] (global filters only)
[--active yes|no]
[--vendorid <XXXX>|""]
[--productid <XXXX>|""]
[--revision <IIFF>|""]
[--manufacturer <string>|""]
[--product <string>|""]
[--remote yes|no] (null, VM filters only)
[--serialnumber <string>|""]
[--maskedinterfaces <XXXXXXXX>]

VBoxManage usbfilter remove <index,0-N>
--target <uuid>|<name>|global

VBoxManage sharedfolder add <vmname>|<uuid>
--name <name> --hostpath <hostpath>
[--transient] [--readonly]

VBoxManage sharedfolder remove <vmname>|<uuid>
--name <name> [--transient]

VBoxManage vmstatistics <vmname>|<uuid> [--reset]
[--pattern <pattern>] [--descriptions]

VBoxManage guestproperty get <vmname>|<uuid>
<property> [--verbose]

VBoxManage guestproperty set <vmname>|<uuid>
<property> [<value> [--flags <flags>]]

VBoxManage guestproperty enumerate <vmname>|<uuid>
[--patterns <patterns>]

VBoxManage guestproperty wait <vmname>|<uuid> <patterns>
[--timeout <milliseconds>] [--fail-on-timeout]

VBoxManage metrics list [*|host|<vmname> [<metric_list>]]
(comma-separated)

VBoxManage metrics setup
[--period <seconds>]
[--samples <count>]
[--list]
[*|host|<vmname> [<metric_list>]]

VBoxManage metrics query [*|host|<vmname> [<metric_list>]]

VBoxManage metrics collect
[--period <seconds>]
[--samples <count>]
[--list]
[--detach]
[*|host|<vmname> [<metric_list>]]

VBoxManage hostonlyif ipconfig <name>
[--dhcp |
--ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |
--ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]

VBoxManage dhcpserver add|modify --netname <network_name> |
--ifname <hostonly_if_name>
[--ip <ip_address>
--netmask <network_mask>
--lowerip <lower_ip>
--upperip <upper_ip>]
[--enable | --disable]
VBoxManage dhcpserver remove --netname <network_name> |
--ifname <hostonly_if_name>






VirtualBox 4.0.2



Oracle VM VirtualBox Command Line Management Interface Version 4.0.2
(C) 2005-2011 Oracle Corporation
All rights reserved.

Usage:

VBoxManage [-v|--version] print version number and exit
VBoxManage [-q|--nologo] ... suppress the logo

VBoxManage list [--long|-l] vms|runningvms|ostypes|hostdvds|hostfloppies|
bridgedifs|hostonlyifs|dhcpservers|hostinfo|
hostcpuids|hddbackends|hdds|dvds|floppies|
usbhost|usbfilters|systemproperties|extpacks

VBoxManage showvminfo <uuid>|<name> [--details] [--statistics]
[--machinereadable]
VBoxManage showvminfo <uuid>|<name> --log <idx>

VBoxManage registervm <filename>

VBoxManage unregistervm <uuid>|<name> [--delete]

VBoxManage createvm --name <name>
[--ostype <ostype>]
[--register]
[--basefolder <path> | --settingsfile <path>]
[--uuid <uuid>]

VBoxManage modifyvm <uuid|name>
[--name <name>]
[--ostype <ostype>]
[--memory <memorysize in MB>]
[--pagefusion on|off]
[--vram <vramsize in MB>]
[--acpi on|off]
[--ioapic on|off]
[--pae on|off]
[--hpet on|off]
[--hwvirtex on|off]
[--hwvirtexexcl on|off]
[--nestedpaging on|off]
[--largepages on|off]
[--vtxvpid on|off]
[--synthcpu on|off]
[--cpuidset <leaf> <eax> <ebx> <ecx> <edx>]
[--cpuidremove <leaf>]
[--cpuidremoveall]
[--hardwareuuid <uuid>]
[--cpus <number>]
[--cpuhotplug on|off]
[--plugcpu <id>]
[--unplugcpu <id>]
[--cpuexecutioncap <1-100>]
[--rtcuseutc on|off]
[--monitorcount <number>]
[--accelerate3d on|off]
[--accelerate2dvideo on|off]
[--firmware bios|efi|efi32|efi64]
[--chipset ich9|piix3]
[--bioslogofadein on|off]
[--bioslogofadeout on|off]
[--bioslogodisplaytime <msec>]
[--bioslogoimagepath <imagepath>]
[--biosbootmenu disabled|menuonly|messageandmenu]
[--biossystemtimeoffset <msec>]
[--biospxedebug on|off]
[--boot<1-4> none|floppy|dvd|disk|net>]
[--nic<1-N> none|null|nat|bridged|intnet|hostonly|
vde]
[--nictype<1-N> Am79C970A|Am79C973|
82540EM|82543GC|82545EM|
virtio]
[--cableconnected<1-N> on|off]
[--nictrace<1-N> on|off]
[--nictracefile<1-N> <filename>]
[--nicspeed<1-N> <kbps>]
[--nicbootprio<1-N> <priority>]
[--bridgeadapter<1-N> none|<devicename>]
[--hostonlyadapter<1-N> none|<devicename>]
[--intnet<1-N> <network name>]
[--natnet<1-N> <network>|default]
[--vdenet<1-N> <network>|default]
[--natsettings<1-N> [<mtu>],[<socksnd>],
[<sockrcv>],[<tcpsnd>],
[<tcprcv>]]
[--natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
<hostport>,[<guestip>],<guestport>]
[--natpf<1-N> delete <rulename>]
[--nattftpprefix<1-N> <prefix>]
[--nattftpfile<1-N> <file>]
[--nattftpserver<1-N> <ip>]
[--natdnspassdomain<1-N> on|off]
[--natdnsproxy<1-N> on|off]
[--natdnshostresolver<1-N> on|off]
[--nataliasmode<1-N> default|[log],[proxyonly],
[sameports]]
[--macaddress<1-N> auto|<mac>]
[--mouse ps2|usb|usbtablet
[--keyboard ps2|usb
[--uart<1-N> off|<I/O base> <IRQ>]
[--uartmode<1-N> disconnected|
server <pipe>|
client <pipe>|
file <file>|
<devicename>]
[--guestmemoryballoon <balloonsize in MB>]
[--gueststatisticsinterval <seconds>]
[--audio none|null|oss|alsa|pulse]
[--audiocontroller ac97|hda|sb16]
[--clipboard disabled|hosttoguest|guesttohost|
bidirectional]
[--vrde on|off]
[--vrdeextpack default|<name>
[--vrdeproperty <name=[value]>]
[--vrdeport <hostport>]
[--vrdeaddress <hostip>]
[--vrdeauthtype null|external|guest]
[--vrdeauthlibrary default|<name>
[--vrdemulticon on|off]
[--vrdereusecon on|off]
[--vrdevideochannel on|off]
[--vrdevideochannelquality <percent>]
[--usb on|off]
[--usbehci on|off]
[--snapshotfolder default|<path>]
[--teleporter on|off]
[--teleporterport <port>]
[--teleporteraddress <address|empty>
[--teleporterpassword <password>]

VBoxManage import <ovf/ova> [--dry-run|-n] [more options]
(run with -n to have options displayed
for a particular OVF)

VBoxManage export <machines> --output|-o <ovf/ova>
[--legacy09]
[--manifest]
[--vsys <number of virtual system>]
[--product <product name>]
[--producturl <product url>]
[--vendor <vendor name>]
[--vendorurl <vendor url>]
[--version <version info>]
[--eula <license text>]
[--eulafile <filename>]

VBoxManage startvm <uuid>|<name>
[--type gui|sdl|headless]

VBoxManage controlvm <uuid>|<name>
pause|resume|reset|poweroff|savestate|
acpipowerbutton|acpisleepbutton|
keyboardputscancode <hex> [<hex> ...]|
setlinkstate<1-N> on|off |
nic<1-N> null|nat|bridged|intnet|hostonly
[<devicename>] |
nictrace<1-N> on|off
nictracefile<1-N> <filename>
natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
<hostport>,[<guestip>],<guestport>
natpf<1-N> delete <rulename>
guestmemoryballoon <balloonsize in MB>]
gueststatisticsinterval <seconds>]
usbattach <uuid>|<address> |
usbdetach <uuid>|<address> |
vrde on|off |
vrdeport <port> |
vrdeproperty <name=[value]> |
vrdevideochannelquality <percent>
setvideomodehint <xres> <yres> <bpp> [display] |
setcredentials <username> <password> <domain>
[--allowlocallogon <yes|no>] |
teleport --host <name> --port <port>
[--maxdowntime <msec>] [--password password]
plugcpu <id>
unplugcpu <id>
cpuexecutioncap <1-100>

VBoxManage discardstate <uuid>|<name>

VBoxManage adoptstate <uuid>|<name> <state_file>

VBoxManage snapshot <uuid>|<name>
take <name> [--description <desc>] [--pause] |
delete <uuid>|<name> |
restore <uuid>|<name> |
restorecurrent |
edit <uuid>|<name>|--current
[--name <name>]
[--description <desc>] |
showvminfo <uuid>|<name>

VBoxManage closemedium disk|dvd|floppy <uuid>|<filename>
[--delete]

VBoxManage storageattach <uuid|vmname>
--storagectl <name>
--port <number>
--device <number>
[--type dvddrive|hdd|fdd]
[--medium none|emptydrive|
<uuid>|<filename>|host:<drive>|iscsi]
[--mtype normal|writethrough|immutable|shareable|
readonly|multiattach]
[--comment <text>]
[--passthrough on|off]
[--bandwidthgroup <name>]
[--forceunmount]
[--server <name>|<ip>]
[--target <target>]
[--port <port>]
[--lun <lun>]
[--encodedlun <lun>]
[--username <username>]
[--password <password>]
[--intnet]

VBoxManage storagectl <uuid|vmname>
--name <name>
[--add ide|sata|scsi|floppy|sas]
[--controller LSILogic|LSILogicSAS|BusLogic|
IntelAHCI|PIIX3|PIIX4|ICH6|I82078]
[--sataideemulation<1-4> <1-30>]
[--sataportcount <1-30>]
[--hostiocache on|off]
[--bootable on|off]
[--remove]

VBoxManage bandwidthctl <uuid|vmname>
--name <name>
[--add disk|network]
[--limit <megabytes per second>
[--delete]

VBoxManage showhdinfo <uuid>|<filename>

VBoxManage createhd --filename <filename>
--size <megabytes>|--sizebyte <bytes>
[--format VDI|VMDK|VHD] (default: VDI)
[--variant Standard,Fixed,Split2G,Stream,ESX]

VBoxManage modifyhd <uuid>|<filename>
[--type normal|writethrough|immutable|shareable|
readonly|multiattach]
[--autoreset on|off]
[--compact]
[--resize <megabytes>|--resizebyte <bytes>]

VBoxManage clonehd <uuid>|<filename> <outputfile>
[--format VDI|VMDK|VHD|RAW|<other>]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--existing]

VBoxManage convertfromraw <filename> <outputfile>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]
VBoxManage convertfromraw stdin <outputfile> <bytes>
[--format VDI|VMDK|VHD]
[--variant Standard,Fixed,Split2G,Stream,ESX]

VBoxManage getextradata global|<uuid>|<name>
<key>|enumerate

VBoxManage setextradata global|<uuid>|<name>
<key>
[<value>] (no value deletes key)

VBoxManage setproperty machinefolder default|<folder> |
vrdeauthlibrary default|<library> |
websrvauthlibrary default|null|<library> |
vrdeextpack null|<library> |
loghistorycount <value>

VBoxManage usbfilter add <index,0-N>
--target <uuid>|<name>|global
--name <string>
--action ignore|hold (global filters only)
[--active yes|no] (yes)
[--vendorid <XXXX>] (null)
[--productid <XXXX>] (null)
[--revision <IIFF>] (null)
[--manufacturer <string>] (null)
[--product <string>] (null)
[--remote yes|no] (null, VM filters only)
[--serialnumber <string>] (null)
[--maskedinterfaces <XXXXXXXX>]

VBoxManage usbfilter modify <index,0-N>
--target <uuid>|<name>|global
[--name <string>]
[--action ignore|hold] (global filters only)
[--active yes|no]
[--vendorid <XXXX>|""]
[--productid <XXXX>|""]
[--revision <IIFF>|""]
[--manufacturer <string>|""]
[--product <string>|""]
[--remote yes|no] (null, VM filters only)
[--serialnumber <string>|""]
[--maskedinterfaces <XXXXXXXX>]

VBoxManage usbfilter remove <index,0-N>
--target <uuid>|<name>|global

VBoxManage sharedfolder add <vmname>|<uuid>
--name <name> --hostpath <hostpath>
[--transient] [--readonly] [--automount]

VBoxManage sharedfolder remove <vmname>|<uuid>
--name <name> [--transient]

VBoxManage guestproperty get <vmname>|<uuid>
<property> [--verbose]

VBoxManage guestproperty set <vmname>|<uuid>
<property> [<value> [--flags <flags>]]

VBoxManage guestproperty enumerate <vmname>|<uuid>
[--patterns <patterns>]

VBoxManage guestproperty wait <vmname>|<uuid> <patterns>
[--timeout <msec>] [--fail-on-timeout]

VBoxManage guestcontrol exec[ute] <vmname>|<uuid>
<path to program>
--username <name> --password <password>
[--arguments "<arguments>"]
[--environment "<NAME>=<VALUE> [<NAME>=<VALUE>]"]
[--flags <flags>] [--timeout <msec>]
[--verbose] [--wait-for exit,stdout,stderr||]

copyto|cp <vmname>|<uuid>
<source on host> <destination on guest>
--username <name> --password <password>
[--dryrun] [--follow] [--recursive] [--verbose]

createdir[ectory]|mkdir|md <vmname>|<uuid>
<directory to create on guest>
--username <name> --password <password>
[--parents] [--mode <mode>] [--verbose]

updateadditions <vmname>|<uuid>
[--source <guest additions .ISO>] [--verbose]

VBoxManage debugvm <uuid>|<name>
dumpguestcore --filename <name> |
info <item> [args] |
injectnmi |
osdetect |
osinfo |
getregisters [--cpu <id>] <reg>|all ... |
setregisters [--cpu <id>] <reg>=<value> ... |
statistics [--reset] [--pattern <pattern>]
[--descriptions]

VBoxManage metrics list [*|host|<vmname> [<metric_list>]]
(comma-separated)

VBoxManage metrics setup
[--period <seconds>] (default: 1)
[--samples <count>] (default: 1)
[--list]
[*|host|<vmname> [<metric_list>]]

VBoxManage metrics query [*|host|<vmname> [<metric_list>]]

VBoxManage metrics enable
[--list]
[*|host|<vmname> [<metric_list>]]

VBoxManage metrics disable
[--list]
[*|host|<vmname> [<metric_list>]]

VBoxManage metrics collect
[--period <seconds>] (default: 1)
[--samples <count>] (default: 1)
[--list]
[--detach]
[*|host|<vmname> [<metric_list>]]

VBoxManage hostonlyif ipconfig <name>
[--dhcp |
--ip<ipv4> [--netmask<ipv4> (def: 255.255.255.0)] |
--ipv6<ipv6> [--netmasklengthv6<length> (def: 64)]]
create |
remove <name>

VBoxManage dhcpserver add|modify --netname <network_name> |
--ifname <hostonly_if_name>
[--ip <ip_address>
--netmask <network_mask>
--lowerip <lower_ip>
--upperip <upper_ip>]
[--enable | --disable]

VBoxManage dhcpserver remove --netname <network_name> |
--ifname <hostonly_if_name>

VBoxManage extpack install <tarball> |
uninstall [--force] <name> |
cleanup

Marley
27.11.2010, 20:45
Удаление виртуальной машины VirtualBox (по быстрому)

Snapshotted virtual machine cannot be deleted
http://www.virtualbox.de/ticket/2943


1) Остановил VirtualBox
2) Удалил файлы виртуальных жестких дисков и снапшоты.
3) Удали из $HOME/.VirtualBox/Machines/ Описания машин (отдельные каталоги)

cd $HOME/.VirtualBox/Machines/
ls
rm -rf "VMNAME"

4) Стартовал VirtualBox. Появились сообщения об ошибках.
5) Удал машины из консоли.



================================================== =====

Примеры консольных команд VirtualBox


[email protected]:~/Desktop> VBoxManage list vms

"2k3Web" {781dbca4-16be-442e-b6c6-41194a622683}
"win2k3" {62474eba-6c99-4c1e-ba0e-43fbf46b29c0}
"XP" {79860785-680e-4ec8-8690-172f1ba7101d}
"win2k3_Clean" {ee239dfe-c189-43f9-8396-b27336d83654}
"Win2k3Current" {6913a35b-0e70-4977-b9eb-acccf326033f}
"J2EETrainings" {fdab467e-baab-4f21-88f1-5ddc7c63c018}
"Oracle_Win2k3_11" {84afc885-d089-4849-a75b-1d6225ff282b}
"Oracle_WinXP" {7de5d78a-0f20-41a5-ac78-fed776628352}
"Oracle10gWin2k3" {ce4ae7d3-062f-4dfb-b48c-09abba7d6901}
"Oracle10gWinXP" {5632e8ac-21e1-4041-953c-cc707a7d1012}
"Centos5-5" {d0e23adc-5134-4bbb-99a1-47b2a244d381}
"Win2k3PostgreSQL" {b77d80eb-2a43-4a55-a89c-8c66fbdd2440}
"CENTOS-5.5" {582befd5-1a2d-4b58-835c-3d93a7066307}
"WinXP_JEE" {554ec1fc-cd9f-4dda-b5a0-29d954065df1}
"Solaris" {0e1f0092-cb88-4398-b72e-4b63a3fb99c2}
"XPORACLECLIENT" {b1ce1959-f97f-4ca6-8383-8db9da5caefe}
"videoEdit" {48646673-eaa7-411e-a1b4-89f06b0d0c5b}
"MironchikJEE" {72f016a1-68cc-41bd-a172-4df8d70af402}
"WeblogicWindows" {5d75d36f-000d-43af-8094-a31ccf93e90e}
"Weblogic_Win2k3" {4a020a39-7bc4-4418-b080-95e426e7e7d3}
"WinXP_PERL" {7a7e636d-f8bd-4d8d-83bb-c57ff6d7bc5a}
"tempWin2k3" {c0f7cc7f-23df-49f4-89d8-d265c6d17a6d}
"Eclipse_Web_Tools_Platform" {f3d496f0-0646-47c0-bc66-59ad2286f8f2}
"WinXPECLIPSE" {7acad9d7-cbf6-4169-b129-7d9efc04a109}
"Win2k3ECLIPSE" {894a0620-04ea-4071-8f12-a08f2171d16e}


============


[email protected]:~/Desktop> VBoxManage unregistervm CENTOS-5.5 --delete

ERROR: Cannot unregister the machine 'CENTOS-5.5' because it has 6 snapshots
Details: code VBOX_E_INVALID_OBJECT_STATE (0x80bb0007), component Machine, interface IMachine, callee nsISupports
Context: "UnregisterMachine(uuid, machine.asOutParam())" at line 294 of file VBoxManage.cpp


============


[email protected]:~/Desktop> VBoxManage showvminfo CENTOS-5.5

VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Name: CENTOS-5.5
Guest OS: Red Hat (64 bit)
UUID: 582befd5-1a2d-4b58-835c-3d93a7066307
Config file: /home/marley/.VirtualBox/Machines/CENTOS-5.5/CENTOS-5.5.xml
Memory size: 1500MB
VRAM size: 32MB
Number of CPUs: 1
Boot menu mode: message and menu
Boot Device (1): Floppy
Boot Device (2): DVD
Boot Device (3): HardDisk
Boot Device (4): Not Assigned
ACPI: on
IOAPIC: on
PAE: off
Time offset: 0 ms
Hardw. virt.ext: on
Nested Paging: off
VT-x VPID: off
State: powered off (since 2010-11-27T18:27:15.974000000)
Monitor count: 1
3D Acceleration: off
Floppy: empty
SATA: disabled
IDE Controller: PIIX4
DVD: /home/marley/.VirtualBox/VBoxGuestAdditions_3.0.6.iso (UUID: c0284ccb-4d0b-4db1-908c-a7187e4cd3b2)
NIC 1: MAC: 080027053D5B, Attachment: Bridged Interface 'eth1', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
UART 1: disabled
UART 2: disabled
Audio: disabled
Clipboard Mode: Bidirectional
Shared folders: <none>

VRDP Connection: not active
Clients so far: 0

Guest:

Statistics update: disabled

Snapshots:

Name: Snapshot 1 (UUID: 059f9e22-0f1f-4840-9f28-f5306b1265c2)
Name: Snapshot 2 (UUID: 3e8d93b9-bce2-429f-bb25-a5280373254e)
Name: InstallationCompleted (UUID: 4240fdcd-3ca3-4be7-8555-9c7f77b6e1a3)
Name: Snapshot 3 (UUID: 26257ae2-427d-4e88-b0ec-379915d0c0b3)
Name: Snapshot 4 (UUID: 82ae249e-ba84-49d8-be7c-7ca192f005b5)
Name: Installed_and_Worked (UUID: c748a8bf-6904-41e9-a1e3-1533dea5a292)


=================

[email protected]:~/Desktop> VBoxManage snapshot CENTOS-5.5 discard --all

VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80% ...90%...100%


=================
Выполнял команду, пока не появилось сообщение об ошибке

[email protected]:~/Desktop> VBoxManage snapshot CENTOS-5.5 discard --all

VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%...FAILED
Error: failed to discard snapshot. Error message: Hard disk '/media/e2343bbe-0feb-49d1-9f5e-ce43476c71cd/Sata250G/VBOX/Centos55/Centos55.vdi' has more than one child hard disk (2)


=======================

Marley
27.11.2010, 22:26
EXPORT и IMPORT VirtualBox



Получить список виртуальных машин
-------------

[email protected]:~/Desktop> VBoxManage list vms

VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

"2k3Web" {781dbca4-16be-442e-b6c6-41194a622683}
"Eclipse_Web_Tools_Platform" {f3d496f0-0646-47c0-bc66-59ad2286f8f2}






EXPORT
-------------

[email protected]:~/Desktop> VBoxManage export 2k3Web -o /mnt/dsk3/dsk3/_vBox/Win2k3Web.ovf

VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

0%...10%...20%...30%...40%...50%...60%...70%...80% ...90%...100%
Successfully exported 1 machine(s).

=============================




IMPORT
-------------

[email protected]:~/Desktop> VBoxManage import /mnt/dsk3/dsk3/_vBox/Win2k3Web.ovf

VirtualBox Command Line Management Interface Version 3.0.6_OSE
(C) 2005-2009 Sun Microsystems, Inc.
All rights reserved.

Interpreting /mnt/dsk3/dsk3/_vBox/Win2k3Web.ovf...
OK.
Disks: vmdisk1 21474836480 -1 http://www.vmware.com/specifications/vmdk.html#sparse {ccc21fbc-f519-4f5d-abf7-015b0313a95e}.vmdk 1488422912 -1 <NULL> vmdisk2 10737418240 -1 http://www.vmware.com/specifications/vmdk.html#sparse {cd1b6867-16a3-45c7-bf75-2db108b75557}.vmdk 932662272 -1 <NULL>
Virtual system 0:
0: Suggested OS type: "Windows2003"
(change with "--vsys 0 --ostype <type>"; use "list ostypes" to list all possible values)
1: Suggested VM name "2k3Web_1"
(change with "--vsys 0 --vmname <name>")
2: Number of CPUs (ignored): 1
3: Guest memory: 256 MB
(change with "--vsys 0 --memory <MB>")
4: Sound card (appliance expects "ensoniq1371", can change on import)
(disable with "--vsys 0 --unit 4 --ignore")
5: Network adapter: orig Bridged, config 2, extra type=Bridged
6: Floppy
(disable with "--vsys 0 --unit 6 --ignore")
7: IDE controller, type PIIX4
(disable with "--vsys 0 --unit 7 --ignore")
8: Hard disk image: source image={ccc21fbc-f519-4f5d-abf7-015b0313a95e}.vmdk, target path=/home/marley/.VirtualBox/HardDisks/{ccc21fbc-f519-4f5d-abf7-015b0313a95e}.vmdk, controller=7;channel=0
(change controller with "--vsys 0 --unit 8 --controller <id>";
disable with "--vsys 0 --unit 8 --ignore")
9: Hard disk image: source image={cd1b6867-16a3-45c7-bf75-2db108b75557}.vmdk, target path=/home/marley/.VirtualBox/HardDisks/{cd1b6867-16a3-45c7-bf75-2db108b75557}.vmdk, controller=7;channel=1
(change controller with "--vsys 0 --unit 9 --controller <id>";
disable with "--vsys 0 --unit 9 --ignore")
0%...10%...20%...30%...40%...50%...60%...70%...80% ...90%...100%
Successfully imported the appliance.

Marley
17.02.2011, 11:44
Virtual Box: How to delete (unregister | remove) hard disk
=======================

Error Message:

Failed to create the hard disk storage
Could not create the medium storage unit
VDI: cannot create image

=======================

cd C:\Program Files\Oracle\VirtualBox

C:\Program Files\Oracle\VirtualBox>vboxmanage list hdds



UUID: d0ededfd-f5c3-448a-bc4e-454c1c93e3c1
Parent UUID: base
Format: VDI
Location: D:\_VBOX\OEL56\OEL56.vdi
State: inaccessible
Type: normal

UUID: fba59dde-b4d4-4e81-99e5-ca6fb00af79c
Parent UUID: d0ededfd-f5c3-448a-bc4e-454c1c93e3c1
Format: VDI
Location: D:\_VBOX\OEL56\snap\{fba59dde-b4d4-4e81-99e5-ca6fb00af79c}.vdi
State: inaccessible
Type: normal







C:\Program Files\Oracle\VirtualBox>VBoxManage showhdinfo d0ededfd-f5c3-448a-bc4e
-454c1c93e3c1



UUID: d0ededfd-f5c3-448a-bc4e-454c1c93e3c1
Accessible: no
Access Error: UUID {6e91c86f-2c3e-4e33-9a5d-5bea0aca69b0} of the medium
'D:\_VBOX\OEL56\OEL56.vdi' does not match the value {d0ededfd-f5c3-448a-bc4e-454
c1c93e3c1} stored in the media registry (' " ... ".VirtualBox\VirtualBox.xml')
Logical size: 85899345920 MBytes
Current size on disk: 2211 MBytes
Type: normal (base)
Storage format: VDI
Format variant: dynamic default
Location: D:\_VBOX\OEL56\OEL56.vdi






VBoxManage closemedium disk d0ededfd-f5c3-448a-bc4e-454c1c93e3c1 --delete