Wednesday, February 01, 2017

[snippets]: Virtualbox headless VM creation

5  VBoxManage list ostypes
6  VBoxManage createvm --name "Windows 7" --ostype Windows7_64 --register
14  cd VirtualBox\ VMs/
16  cd Windows\ 7/
18  VBoxManage createhd --filename "Windows7.vdi" --size 10000
28  VBoxManage modifyvm "Windows 7" --memory 1024 --acpi on --boot1 
    dvd --nic1 nat
32  vboxmanage storagectl "Windows 7" --name "SATA" --add sata 
    --controller IntelAHCI
35  vboxmanage storageattach "Windows 7" --storagectl "SATA" --port 0 
    --device 0 --type hdd --medium "Windows7.vdi"
36  vboxmanage storageattach "Windows 7" --storagectl "SATA" --port 1 
    --device 0 --type dvddrive --medium /home/blabla/Windows7.iso
48  vboxmanage modifyvm "Windows 7" --vrde on
49  vboxheadless --startvm "Windows 7"
57  vboxmanage modifyvm "Windows 7" --nic1 bridged
61  vboxmanage modifyvm "Windows 7" --bridgeadapter1 enp2s0f1



then connect with RDP to port 3389