Opensourcetechブログ

OpensourcetechによるLinux・オープンソース・IT技術などに関するブログです。

Virtualboxをコマンドライン(VBoxManageコマンド)から操作する! 

 

 

こんにちは、オープンソース技術 開発研究所鯨井貴博です音譜

 

今回は、Virtualboxコマンドラインから操作する方法を学ぼうと思います。

 

Virtualboxは、以下のようなGUIを備えているので、

ここから操作されている方が多いのではないかと思います。

f:id:opensourcetech:20180327163849p:plain

 

ですがVirtualbox、ちゃんとCLI(コマンド操作)にも対応しておりまして、

VBoxManageというコマンドが実装されています。

 

以下ヘルプですが、めっちゃ長いです。

※色んなことが出来まっせと、理解すればいいでしょう。

bash-3.2$ VBoxManage help
Oracle VM VirtualBox Command Line Management Interface Version 5.1.30
(C) 2005-2017 Oracle Corporation
All rights reserved.

Usage:

VBoxManage [<general option>] <command>


General Options:

[-v|--version] print version number and exit
[-q|--nologo] suppress the logo
[--settingspw <pw>] provide the settings password
[--settingspwfile <file>] provide a file containing the settings password


Commands:

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

showvminfo <uuid|vmname> [--details]
[--machinereadable]
showvminfo <uuid|vmname> --log <idx>

registervm <filename>

unregistervm <uuid|vmname> [--delete]

createvm --name <name>
[--groups <group>, ...]
[--ostype <ostype>]
[--register]
[--basefolder <path>]
[--uuid <uuid>]

modifyvm <uuid|vmname>
[--name <name>]
[--groups <group>, ...]
[--description <desc>]
[--ostype <ostype>]
[--iconfile <filename>]
[--memory <memorysize in MB>]
[--pagefusion on|off]
[--vram <vramsize in MB>]
[--acpi on|off]
[--pciattach 03:04.0]
[--pciattach 03:04.0@02:01.0]
[--pcidetach 03:04.0]
[--ioapic on|off]
[--hpet on|off]
[--triplefaultreset on|off]
[--apic on|off]
[--x2apic on|off]
[--paravirtprovider none|default|legacy|minimal|
hyperv|kvm]
[--paravirtdebug <key=value> [,<key=value> ...]]
[--hwvirtex on|off]
[--nestedpaging on|off]
[--largepages on|off]
[--vtxvpid on|off]
[--vtxux on|off]
[--pae on|off]
[--longmode on|off]
[--cpu-profile "host|Intel 80[86|286|386]"]
[--cpuid-portability-level <0..3>
[--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]
[--graphicscontroller none|vboxvga|vmsvga]
[--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]
[--biosapic disabled|apic|x2apic]
[--biossystemtimeoffset <msec>]
[--biospxedebug on|off]
[--boot<1-4> none|floppy|dvd|disk|net>]
[--nic<1-N> none|null|nat|bridged|intnet|hostonly|
generic|natnetwork]
[--nictype<1-N> Am79C970A|Am79C973|
82540EM|82543GC|82545EM|
virtio]
[--cableconnected<1-N> on|off]
[--nictrace<1-N> on|off]
[--nictracefile<1-N> <filename>]
[--nicproperty<1-N> name=[value]]
[--nicspeed<1-N> <kbps>]
[--nicbootprio<1-N> <priority>]
[--nicpromisc<1-N> deny|allow-vms|allow-all]
[--nicbandwidthgroup<1-N> none|<name>]
[--bridgeadapter<1-N> none|<devicename>]
[--hostonlyadapter<1-N> none|<devicename>]
[--intnet<1-N> <network name>]
[--nat-network<1-N> <network name>]
[--nicgenericdrv<1-N> <driver>
[--natnet<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>]
[--natbindip<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|usbmultitouch]
[--keyboard ps2|usb
[--uart<1-N> off|<I/O base> <IRQ>]
[--uartmode<1-N> disconnected|
server <pipe>|
client <pipe>|
tcpserver <port>|
tcpclient <hostname:port>|
file <file>|
<devicename>]
[--guestmemoryballoon <balloonsize in MB>]
[--audio none|null|coreaudio]
[--audiocontroller ac97|hda|sb16]
[--audiocodec stac9700|ad1980|stac9221|sb16]
[--clipboard disabled|hosttoguest|guesttohost|
bidirectional]
[--draganddrop disabled|hosttoguest]
[--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]
[--usbxhci on|off]
[--usbrename <oldname> <newname>]
[--snapshotfolder default|<path>]
[--teleporter on|off]
[--teleporterport <port>]
[--teleporteraddress <address|empty>
[--teleporterpassword <password>]
[--teleporterpasswordfile <file>|stdin]
[--tracing-enabled on|off]
[--tracing-config <config-string>]
[--tracing-allow-vm-access on|off]
[--usbcardreader on|off]
[--autostart-enabled on|off]
[--autostart-delay <seconds>]
[--videocap on|off]
[--videocapscreens all|<screen ID> [<screen ID> ...]]
[--videocapfile <filename>]
[--videocapres <width> <height>]
[--videocaprate <rate>]
[--videocapfps <fps>]
[--videocapmaxtime <ms>]
[--videocapmaxsize <MB>]
[--videocapopts <key=value> [,<key=value> ...]]
[--defaultfrontend default|<name>]

clonevm <uuid|vmname>
[--snapshot <uuid>|<name>]
[--mode machine|machineandchildren|all]
[--options link|keepallmacs|keepnatmacs|
keepdisknames]
[--name <name>]
[--groups <group>, ...]
[--basefolder <basefolder>]
[--uuid <uuid>]
[--register]

import <ovfname/ovaname>
[--dry-run|-n]
[--options keepallmacs|keepnatmacs|importtovdi]
[more options]
(run with -n to have options displayed
for a particular OVF)

export <machines> --output|-o <name>.<ovf/ova>
[--legacy09|--ovf09|--ovf10|--ovf20]
[--manifest]
[--iso]
[--options manifest|iso|nomacs|nomacsbutnat]
[--vsys <number of virtual system>]
[--product <product name>]
[--producturl <product url>]
[--vendor <vendor name>]
[--vendorurl <vendor url>]
[--version <version info>]
[--description <description info>]
[--eula <license text>]
[--eulafile <filename>]

startvm <uuid|vmname>...
[--type gui|headless|separate]

controlvm <uuid|vmname>
pause|resume|reset|poweroff|savestate|
acpipowerbutton|acpisleepbutton|
keyboardputscancode <hex> [<hex> ...]|
setlinkstate<1-N> on|off |
nic<1-N> null|nat|bridged|intnet|hostonly|generic|
natnetwork [<devicename>] |
nictrace<1-N> on|off |
nictracefile<1-N> <filename> |
nicproperty<1-N> name=[value] |
nicpromisc<1-N> deny|allow-vms|allow-all |
natpf<1-N> [<rulename>],tcp|udp,[<hostip>],
<hostport>,[<guestip>],<guestport> |
natpf<1-N> delete <rulename> |
guestmemoryballoon <balloonsize in MB> |
usbattach <uuid>|<address>
[--capturefile <filename>] |
usbdetach <uuid>|<address> |
clipboard disabled|hosttoguest|guesttohost|
bidirectional |
draganddrop disabled|hosttoguest |
vrde on|off |
vrdeport <port> |
vrdeproperty <name=[value]> |
vrdevideochannelquality <percent> |
setvideomodehint <xres> <yres> <bpp>
[[<display>] [<enabled:yes|no> |
[<xorigin> <yorigin>]]] |
screenshotpng <file> [display] |
videocap on|off |
videocapscreens all|none|<screen>,[<screen>...] |
videocapfile <file>
videocapres <width>x<height>
videocaprate <rate>
videocapfps <fps>
videocapmaxtime <ms>
videocapmaxsize <MB>
setcredentials <username>
--passwordfile <file> | <password>
<domain>
[--allowlocallogon <yes|no>] |
teleport --host <name> --port <port>
[--maxdowntime <msec>]
[--passwordfile <file> |
--password <password>] |
plugcpu <id> |
unplugcpu <id> |
cpuexecutioncap <1-100>
webcam <attach [path [settings]]> | <detach [path]> | <list>
addencpassword <id>
<password file>|-
[--removeonsuspend <yes|no>]
removeencpassword <id>
removeallencpasswords

discardstate <uuid|vmname>

adoptstate <uuid|vmname> <state_file>

snapshot <uuid|vmname>
take <name> [--description <desc>] [--live]
[--uniquename Number,Timestamp,Space,Force] |
delete <uuid|snapname> |
restore <uuid|snapname> |
restorecurrent |
edit <uuid|snapname>|--current
[--name <name>]
[--description <desc>] |
list [--details|--machinereadable]
showvminfo <uuid|snapname>

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

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

storagectl <uuid|vmname>
--name <name>
[--add ide|sata|scsi|floppy|sas|usb|pcie]
[--controller LSILogic|LSILogicSAS|BusLogic|
IntelAHCI|PIIX3|PIIX4|ICH6|I82078|
[ USB|NVMe]
[--portcount <1-n>]
[--hostiocache on|off]
[--bootable on|off]
[--rename <name>]
[--remove]

bandwidthctl <uuid|vmname>
add <name> --type disk|network
--limit <megabytes per second>[k|m|g|K|M|G] |
set <name>
--limit <megabytes per second>[k|m|g|K|M|G] |
remove <name> |
list [--machinereadable]
(limit units: k=kilobit, m=megabit, g=gigabit,
K=kilobyte, M=megabyte, G=gigabyte)

showmediuminfo [disk|dvd|floppy] <uuid|filename>

createmedium [disk|dvd|floppy] --filename <filename>
[--size <megabytes>|--sizebyte <bytes>]
[--diffparent <uuid>|<filename>
[--format VDI|VMDK|VHD] (default: VDI)
[--variant Standard,Fixed,Split2G,Stream,ESX]

modifymedium [disk|dvd|floppy] <uuid|filename>
[--type normal|writethrough|immutable|shareable|
readonly|multiattach]
[--autoreset on|off]
[--property <name=[value]>]
[--compact]
[--resize <megabytes>|--resizebyte <bytes>]
[--move <path>]
clonemedium [disk|dvd|floppy] <uuid|inputfile> <uuid|outputfile>
[--format VDI|VMDK|VHD|RAW|<other>]
[--variant Standard,Fixed,Split2G,Stream,ESX]
[--existing]

mediumproperty [disk|dvd|floppy] set <uuid|filename>
<property> <value>

[disk|dvd|floppy] get <uuid|filename>
<property>

[disk|dvd|floppy] delete <uuid|filename>
<property>

encryptmedium <uuid|filename>
[--newpassword <file>|-]
[--oldpassword <file>|-]
[--cipher <cipher identifier>]
[--newpasswordid <password identifier>]

checkmediumpwd <uuid|filename>
<pwd file>|-

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

getextradata global|<uuid|vmname>
<key>|enumerate

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

setproperty machinefolder default|<folder> |
hwvirtexclusive on|off |
vrdeauthlibrary default|<library> |
websrvauthlibrary default|null|<library> |
vrdeextpack null|<library> |
autostartdbpath null|<folder> |
loghistorycount <value>
defaultfrontend default|<name>
logginglevel <log setting>

usbfilter add <index,0-N>
--target <uuid|vmname>|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>]

usbfilter modify <index,0-N>
--target <uuid|vmname>|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>]

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

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

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

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

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

guestproperty delete|unset <uuid|vmname>
<property>

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

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

guestcontrol <uuid|vmname> [--verbose|-v] [--quiet|-q]
[--username <name>] [--domain <domain>]
[--passwordfile <file> | --password <password>]

run [common-options]
[--exe <path to executable>] [--timeout <msec>]
[-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]
[--ignore-operhaned-processes] [--profile]
[--no-wait-stdout|--wait-stdout]
[--no-wait-stderr|--wait-stderr]
[--dos2unix] [--unix2dos]
-- <program/arg0> [argument1] ... [argumentN]]

start [common-options]
[--exe <path to executable>] [--timeout <msec>]
[-E|--putenv <NAME>[=<VALUE>]] [--unquoted-args]
[--ignore-operhaned-processes] [--profile]
-- <program/arg0> [argument1] ... [argumentN]]

copyfrom [common-options]
[--dryrun] [--follow] [-R|--recursive]
<guest-src0> [guest-src1 [...]] <host-dst>

copyfrom [common-options]
[--dryrun] [--follow] [-R|--recursive]
[--target-directory <host-dst-dir>]
<guest-src0> [guest-src1 [...]]

copyto [common-options]
[--dryrun] [--follow] [-R|--recursive]
<host-src0> [host-src1 [...]] <guest-dst>

copyto [common-options]
[--dryrun] [--follow] [-R|--recursive]
[--target-directory <guest-dst>]
<host-src0> [host-src1 [...]]

mkdir|createdir[ectory] [common-options]
[--parents] [--mode <mode>]
<guest directory> [...]

rmdir|removedir[ectory] [common-options]
[-R|--recursive]
<guest directory> [...]

removefile|rm [common-options] [-f|--force]
<guest file> [...]

mv|move|ren[ame] [common-options]
<source> [source1 [...]] <dest>

mktemp|createtemp[orary] [common-options]
[--secure] [--mode <mode>] [--tmpdir <directory>]
<template>

stat [common-options]
<file> [...]

guestcontrol <uuid|vmname> [--verbose|-v] [--quiet|-q]

list <all|sessions|processes|files> [common-opts]

closeprocess [common-options]
< --session-id <ID>
| --session-name <name or pattern>
<PID1> [PID1 [...]]

closesession [common-options]
< --all | --session-id <ID>
| --session-name <name or pattern> >

updatega|updateguestadditions|updateadditions
[--source <guest additions .ISO>]
[--wait-start] [common-options]
[-- [<argument1>] ... [<argumentN>]]

watch [common-options]

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

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

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

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

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

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

natnetwork add --netname <name>
--network <network>
[--enable|--disable]
[--dhcp on|off]
[--port-forward-4 <rule>]
[--loopback-4 <rule>]
[--ipv6 on|off]
[--port-forward-6 <rule>]
[--loopback-6 <rule>]

natnetwork remove --netname <name>

natnetwork modify --netname <name>
[--network <network>]
[--enable|--disable]
[--dhcp on|off]
[--port-forward-4 <rule>]
[--loopback-4 <rule>]
[--ipv6 on|off]
[--port-forward-6 <rule>]
[--loopback-6 <rule>]

natnetwork start --netname <name>

natnetwork stop --netname <name>

natnetwork list [<pattern>]

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

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

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

usbdevsource add <source name>
--backend <backend>
--address <address>
usbdevsource remove <source name>

Introspection and guest debugging:
VBoxManage debugvm <uuid|vmname> dumpvmcore [--filename=name]
VBoxManage debugvm <uuid|vmname> info <item> [args...]
VBoxManage debugvm <uuid|vmname> injectnmi
VBoxManage debugvm <uuid|vmname> log [[--release] | [--debug]]
[group-settings...]
VBoxManage debugvm <uuid|vmname> logdest [[--release] | [--debug]]
[destinations...]
VBoxManage debugvm <uuid|vmname> logflags [[--release] | [--debug]] [flags...]
VBoxManage debugvm <uuid|vmname> osdetect
VBoxManage debugvm <uuid|vmname> osinfo
VBoxManage debugvm <uuid|vmname> osdmesg [--lines=lines]
VBoxManage debugvm <uuid|vmname> getregisters [--cpu=id] [reg-set.reg-name...]
VBoxManage debugvm <uuid|vmname> setregisters [--cpu=id]
[reg-set.reg-name=value...]
VBoxManage debugvm <uuid|vmname> show [[--human-readable] | [--sh-export] |
[--sh-eval] | [--cmd-set]] [settings-item...]
VBoxManage debugvm <uuid|vmname> stack [--cpu=id]
VBoxManage debugvm <uuid|vmname> statistics [--reset] [--descriptions]
[--pattern=pattern]

Extension package management:
VBoxManage extpack install [--replace] <tarball>
VBoxManage extpack uninstall [--force] <name>
VBoxManage extpack cleanup

 

 

 

仮想マシン(VM)の一覧確認

bash-3.2$ VBoxManage list vms
"ForLPIC300(Openldap_providerー,ntpd)" {4d61c5d2-0380-45df-9d45-8425dc8551bb}
"ForLPIC300(Samba/Samba4)" {04b4edb3-aff2-4092-848f-731e3d69d547}
"ForLPIC300(Openldap_consumerー,ntpd) " {8ab0036f-4ec9-44e9-8918-add542aa4307}
"centos_forZTP" {a44f483f-6629-4822-9235-293c823a0316}
"CentOS6.9_for_MT" {a58ff1ef-0b60-46db-b7fc-856a077c1bae}
"CentOS7" {54bd9c61-6782-4408-a259-f9ed833b68c7}

 

冒頭に紹介したGUIと比べると、一目瞭然かと思います。

f:id:opensourcetech:20180327163849p:plain

 

 

仮想マシン(VM)の起動

bash-3.2$ VBoxManage startvm CentOS7
Waiting for VM "CentOS7" to power on...
VM "CentOS7" has been successfully started.

以下のように、仮想マシンが起動しました。

f:id:opensourcetech:20180327165134p:plain

 

 

仮想マシン(VM)の状態確認

bash-3.2$ VBoxManage showvminfo CentOS7
Name: CentOS7
Groups: /
Guest OS: Red Hat (64-bit)
UUID: 54bd9c61-6782-4408-a259-f9ed833b68c7
Config file: /Users/*******/VirtualBox VMs/CentOS7/CentOS7.vbox
Snapshot folder: /Users/*******/VirtualBox VMs/CentOS7/Snapshots
Log folder: /Users/*******/VirtualBox VMs/CentOS7/Logs
Hardware UUID: 54bd9c61-6782-4408-a259-f9ed833b68c7
Memory size: 1024MB
Page Fusion: off
VRAM size: 16MB
CPU exec cap: 100%
HPET: off
Chipset: piix3
Firmware: BIOS
Number of CPUs: 1
PAE: on
Long Mode: on
Triple Fault Reset: off
APIC: on
X2APIC: on
CPUID Portability Level: 0
CPUID overrides: None
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
BIOS APIC mode: APIC
Time offset: 0ms
RTC: UTC
Hardw. virt.ext: on
Nested Paging: on
Large Pages: on
VT-x VPID: on
VT-x unr. exec.: on
Paravirt. Provider: KVM
Effective Paravirt. Provider: KVM
State: running (since 2018-03-27T07:49:07.321000000)
Monitor count: 1
3D Acceleration: off
2D Video Acceleration: off
Teleporter Enabled: off
Teleporter Port: 0
Teleporter Address:
Teleporter Password:
Tracing Enabled: off
Allow Tracing to Access VM: off
Tracing Configuration:
Autostart Enabled: off
Autostart Delay: 0
Default Frontend:
Storage Controller Name (0): IDE
Storage Controller Type (0): PIIX4
Storage Controller Instance Number (0): 0
Storage Controller Max Port Count (0): 2
Storage Controller Port Count (0): 2
Storage Controller Bootable (0): on
Storage Controller Name (1): SATA
Storage Controller Type (1): IntelAhci
Storage Controller Instance Number (1): 0
Storage Controller Max Port Count (1): 30
Storage Controller Port Count (1): 1
Storage Controller Bootable (1): on
IDE (1, 0): Empty
SATA (0, 0): /Users/*******/VirtualBox VMs/CentOS7/CentOS7.vdi (UUID: 2ab25e3e-0ad7-4c2e-b61b-68952b760d90)
NIC 1: MAC: 0800275F837C, Attachment: Bridged Interface 'en4: Thunderbolt Ethernet', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0, Promisc Policy: allow-all, Bandwidth group: none
NIC 2: disabled
NIC 3: disabled
NIC 4: disabled
NIC 5: disabled
NIC 6: disabled
NIC 7: disabled
NIC 8: disabled
Pointing Device: PS/2 Mouse
Keyboard Device: PS/2 Keyboard
UART 1: disabled
UART 2: disabled
UART 3: disabled
UART 4: disabled
LPT 1: disabled
LPT 2: disabled
Audio: enabled (Driver: CoreAudio, Controller: AC97, Codec: AD1980)
Audio playback: enabled
Audio capture: enabled
Clipboard Mode: disabled
Drag and drop Mode: disabled
Session name: GUI/Qt
Video mode: 720x400x0 at 0,0 enabled
VRDE: disabled
USB: enabled
EHCI: enabled
XHCI: disabled

USB Device Filters:

Index: 0
Active: yes
Name: SMI Corporation USB DISK [1100]
VendorId: 090c
ProductId: 1000
Revision: 1100
Manufacturer: SMI Corporation
Product: USB DISK
Remote: 0
Serial Number:

Available remote USB devices:

<none>

Currently Attached USB Devices:

<none>

Bandwidth groups: <none>

Shared folders: <none>

VRDE Connection: not active
Clients so far: 0

Capturing: not active
Capture audio: not active
Capture screens: 0
Capture file: /Users/*******/VirtualBox VMs/CentOS7/CentOS7.webm
Capture dimensions: 1024x768
Capture rate: 512 kbps
Capture FPS: 25
Capture options:

Guest:

Configured memory balloon size: 0 MB
OS type: RedHat_64
Additions run level: 0

Guest Facilities:

No active facilities.

これは、GUIでは取れないような情報まで確認出来るので重宝しそうですね。

 

 

仮想マシン(VM)のスナップショット管理

bash-3.2$ VBoxManage snapshot CentOS7 list
This machine does not have any snapshots
bash-3.2$ VBoxManage snapshot CentOS7 take 20180327_snapshot
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Snapshot taken. UUID: 9f6cb5fd-e249-42a6-bc85-6152fae9e90b
bash-3.2$ VBoxManage snapshot CentOS7 list
Name: 20180327_snapshot (UUID: 9f6cb5fd-e249-42a6-bc85-6152fae9e90b) *

bash-3.2$ VBoxManage snapshot CentOS7 restore 9f6cb5fd-e249-42a6-bc85-6152fae9e90
Restoring snapshot '20180327_snapshot' (9f6cb5fd-e249-42a6-bc85-6152fae9e90b)
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

 list・・・・スナップショットの一覧表示

take・・・・スナップショットの取得

delete・・・スナップショットの削除

restore・・・スナップショットへのリストア(VMは停止している必要あり)

edit・・・・スナップショットの編集

 

その他

 VBoxManage controlvm poweroff 仮想マシン名・・・停止

VBoxManage controlvm pause(resume) 仮想マシン名・・・一時停止/再開

VBoxManage natnetwork/hostonlyif/dhcpserver・・・・ネットワーク関連設定

 

 

なんか、ハイパーバイザー(Xen/KVMなど)を触っているのと、

同じ気分になってきました。

特にこだわりがなければ、GUIでいいような気もしてきました。

 

 

オープンソース技術 開発研究所

github.com

www.facebook.com

twitter.com

www.instagram.com

 

 

にほんブログ村 IT技術ブログ Linuxへ
Linux

にほんブログ村 IT技術ブログ オープンソースへ
オープンソース

 

bitFlyer ビットコインを始めるなら安心・安全な取引所で

ビットコイン取引高日本一の仮想通貨取引所 coincheck bitcoin

 

 

Opensourcetech by Takahiro Kujirai