Herramientas de usuario

Herramientas del sitio


servidores:virtualizacion:virtualbox_scripting

VirtualBox: uso de VBoxManage en línea de comandos

Get Basic Info About What We Need

VBoxManage list
VBoxManage list ostypes

Create a Guest and Register it to be visible in the GUI

VBoxManage createvm --name clitest --ostype Linux26_64
VBoxManage registervm ~/VirtualBox\ VMs/clitest/clitest.vbox
VBoxManage list vms

Adjust the settings

VBoxManage modifyvm clitest --vram 16
VBoxManage modifyvm clitest --memory 1024
VBoxManage modifyvm clitest --boot1 dvd --boot2 disk --boot3 none
VBoxManage modifyvm clitest --acpi on --ioapic on
VBoxManage modifyvm clitest --nictype1 virtio --nic1 bridged
# This is on Mac OS X so you might need to fiddle around with the name of --bridgeadapter1
VBoxManage modifyvm clitest --bridgeadapter1 en0:\ Ethernet --cableconnected1 on
VBoxManage modifyvm clitest --chipset ich9
VBoxManage modifyvm clitest --firmware bios

Create a disk to boot from

VBoxManageo vbm createhd --filename ~/VirtualBox\ VMs/clitest/root.vdi --size $((2**10 * 5))

Create a SATA Controller

VBoxManage storagectl clitest --name SATA\ Controller --add sata --sataportcount 2 --bootable on

Attach an ISO image and disk to the Guest

VBoxManage storageattach clitest --storagectl SATA\ Controller --port 0 --device 0 --type dvddrive --medium ~/ISOs/Fedora-13-x86_64-netinst.iso
VBoxManage storageattach clitest --storagectl SATA\ Controller --port 1 --device 0 --type hdd --medium clitest/root.vdi

Boot it

VBoxManage startvm clitest --type gui # Iniciar con la GUI
VBoxManage startvm clitest --type headless # Iniciar en línea de comandos sin ventana
servidores/virtualizacion/virtualbox_scripting.txt · Última modificación: 2011/06/27 20:10 por fmolinuevo