9 | | - Create a Linux guest (CentOS in my case). Install system with fixed IP (10.0.2.10 in my case) |
10 | | VBoxManage createvm --name "$VmName" --register |
11 | | # System |
12 | | VBoxManage modifyvm "$VmName" --ostype RedHat_64 --memory 500 --acpi on --ioapic on --boot1 disk --boot2 dvd --boot3 net --boot4 floppy |
13 | | # Network Card |
14 | | VBoxManage modifyvm "$VmName" --nic1 natnetwork --nat-network1 NatNetwork --nictype1 82540EM |
15 | | # Storage |
16 | | VBoxManage storagectl "$VmName" --name IDE --add ide --controller PIIX4 --bootable on |
17 | | VBoxManage storagectl "$VmName" --name SATA --add sata --controller IntelAhci --bootable on |
18 | | VBoxManage createhd --filename "$VIRTUALBOX_DATA_DIR\\$VmName\\$VmName.vdi" --size 50000 |
19 | | VBoxManage storageattach "$VmName" --storagectl IDE --port 0 --device 0 --type dvddrive --medium "$INSTALL_DIR\binaires\linux\CentOS-6.5-x86_64-bin-DVD1.iso" |
20 | | VBoxManage storageattach "$VmName" --storagectl IDE --port 0 --device 1 --type dvddrive --medium "$INSTALL_DIR\binaires\linux\CentOS-6.5-x86_64-bin-DVD2.iso" |
21 | | VBoxManage storageattach "$VmName" --storagectl IDE --port 1 --device 0 --type dvddrive --medium "C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso" |
22 | | VBoxManage storageattach "$VmName" --storagectl SATA --port 0 --type hdd --medium "$VIRTUALBOX_DATA_DIR\\$VmName\\$VmName.vdi" |
23 | | # Shared Folder |
24 | | VBoxManage sharedfolder add "$VmName" --name "Install" --hostpath "$INSTALL_DIR" --automount |
| 9 | == Create a Linux guest (CentOS in my case). Install system with fixed IP (10.0.2.10 in my case) |
| 10 | VBoxManage createvm --name "$VmName" --register[[BR]] |
| 11 | # System[[BR]] |
| 12 | VBoxManage modifyvm "$VmName" --ostype RedHat_64 --memory 500 --acpi on --ioapic on --boot1 disk --boot2 dvd --boot3 net --boot4 floppy [[BR]] |
| 13 | # Network Card[[BR]] |
| 14 | VBoxManage modifyvm "$VmName" --nic1 natnetwork --nat-network1 NatNetwork --nictype1 82540EM[[BR]] |
| 15 | # Storage[[BR]] |
| 16 | VBoxManage storagectl "$VmName" --name IDE --add ide --controller PIIX4 --bootable on[[BR]] |
| 17 | VBoxManage storagectl "$VmName" --name SATA --add sata --controller IntelAhci --bootable on[[BR]] |
| 18 | VBoxManage createhd --filename "$VIRTUALBOX_DATA_DIR\$VmName\$VmName.vdi" --size 50000[[BR]] |
| 19 | VBoxManage storageattach "$VmName" --storagectl IDE --port 0 --device 0 --type dvddrive --medium "$INSTALL_DIR\binaires\linux\CentOS-6.5-x86_64-bin-DVD1.iso"[[BR]] |
| 20 | VBoxManage storageattach "$VmName" --storagectl IDE --port 0 --device 1 --type dvddrive --medium "$INSTALL_DIR\binaires\linux\CentOS-6.5-x86_64-bin-DVD2.iso"[[BR]] |
| 21 | VBoxManage storageattach "$VmName" --storagectl IDE --port 1 --device 0 --type dvddrive --medium "C:\Program Files\Oracle\VirtualBox\VBoxGuestAdditions.iso"[[BR]] |
| 22 | VBoxManage storageattach "$VmName" --storagectl SATA --port 0 --type hdd --medium "$VIRTUALBOX_DATA_DIR\$VmName\$VmName.vdi"[[BR]] |
| 23 | # Shared Folder[[BR]] |
| 24 | VBoxManage sharedfolder add "$VmName" --name "Install" --hostpath "$INSTALL_DIR" --automount[[BR]] |