# Neue Virtuelle-Maschine anlegen VBoxManage createvm --name VHostName --register -ostype Gentoo # Neue virtuelle Festplatte erzeugen VBoxManage createhd --filename VHostName.vdi --size 4000 --variant Fixed # 4GB # (erzeugte) Festplatte anbinden VBoxManage storageattach VHostName --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium VHostName.vdi # (echtes) DVD-Laufwerk anbinden VBoxManage storageattach VHostName --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium host:/dev/cdrom # ISO einbinden VBoxManage storageattach VHostName --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /full/path/gentoo-install-x86-minimal-20100216.iso # VirtualBox Guest Additions ISO einbinden VBoxManage storageattach VHostName --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /opt/VirtualBox/additions/VBoxGuestAdditions.iso # Laufwerk oder ISO trennen VBoxManage storageattach VHostName --storagectl "IDE Controller" --port 0 --device 1 --medium none # Share anlegen VBoxManage sharedfolder add VHostName --name sharename --hostpath /vbox/share/ # Share auf Windows-Gast mounten net use X: \\vboxsvr\sharename # Share auf Linux-Gast mounten mount -t vboxsf sharename /foo/mountpoint # Speicher angeben VBoxManage modifyvm VHostName --memory 128 --vram 4 # Netzwerk auf NAT schalten VBoxManage modifyvm VHostName --nic1 nat # Portforwarding aktivieren (wenn Netzwerk ein NAT) VBoxManage setextradata VHostName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Bezeichnung/Protocol" TCP VBoxManage setextradata VHostName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Bezeichnung/GuestPort" 60443 VBoxManage setextradata VHostName "VBoxInternal/Devices/pcnet/0/LUN#0/Config/Bezeichnung/HostPort" 60443 # RDP (an 127.0.0.1:3392) aktivieren VBoxManage modifyvm VHostName --vrdp on --vrdpaddress 127.0.0.1 --vrdpport 3392 --vrdpauthtype null # OS-Type ändern VBoxManage modifyvm VHostName --ostype Gentoo # VBox starten VBoxHeadless -startvm VHostName # Virtuellen Powerknopf drücken (Herunterfahren) VBoxManage controlvm VHostName acpipowerbutton