VM=${1:-NetBSD-9-i386} DISK=${VM}.vdi DVD=NetBSD.iso set -e vboxmanage unregistervm $VM || true vboxmanage createhd --filename $DISK --size 64000 vboxmanage createvm --name $VM --ostype "NetBSD" --register vboxmanage storagectl $VM --name "Sata Controller" --add sata --controller IntelAHCI --hostiocache on --portcount 3 vboxmanage storageattach $VM --storagectl "Sata Controller" --port 0 --device 0 --type hdd --medium $DISK vboxmanage storagectl $VM --name "IDE Controller" --add ide --hostiocache on vboxmanage storageattach $VM --storagectl "IDE Controller" --port 0 --device 0 --type dvddrive --medium $DVD vboxmanage modifyvm $VM \ --cpu-profile "host" \ --memory 4096 \ --vram 16 \ --nic1 hostonly \ --nictype1 virtio \ --hostonlyadapter1 vboxnet0 \ --rtcuseutc on \ --boot1 disk \ --boot2 dvd \ --boot3 none \ --boot4 none \ --boot1 disk \ --cpus 6 \ --mouse ps2 \ --audio null \ --nestedpaging on \ --ioapic on