| 1 | vm_name="win10"
|
|---|
| 2 | license_key="xxxxx-xxxxx-xxxxx-xxxxx-xxxxx"
|
|---|
| 3 | VBoxManage createvm --name $vm_name --ostype Windows10_64 --register
|
|---|
| 4 | VBoxManage createmedium --filename /home/simulant/vm/$vm_name/hard-drive.vdi --size 50000
|
|---|
| 5 | VBoxManage storagectl $vm_name --name 'SATA Controller' --add sata --controller IntelAHCI
|
|---|
| 6 | VBoxManage storageattach $vm_name --storagectl 'SATA Controller' --port 0 --device 0 --type hdd --medium /home/simulant/vm/$vm_name/hard-drive.vdi
|
|---|
| 7 | #VBoxManage storageattach $vm_name --storagectl 'SATA Controller' --port 1 --device 0 --type dvddrive --medium host:/dev/cdrom
|
|---|
| 8 | VBoxManage sharedfolder add $vm_name --name=model --hostpath=/home/simulant/models/none --automount --auto-mount-point=M:
|
|---|
| 9 | VBoxManage sharedfolder add $vm_name --name=simu_vm --hostpath=/home/simulant/simu_center/simuvm --automount --auto-mount-point=S:
|
|---|
| 10 | VBoxManage sharedfolder add $vm_name --name=install --hostpath=/home/simulant/simu_center/binary_repo_vm/install --automount --auto-mount-point=I:
|
|---|
| 11 | VBoxManage sharedfolder add $vm_name --name=update --hostpath=/home/simulant/shared_folders/update --automount --auto-mount-point=U:
|
|---|
| 12 | ln -s install /home/simulant/shared_folders/install
|
|---|
| 13 | VBoxManage modifyvm $vm_name --ioapic on \
|
|---|
| 14 | --cpus 4 \
|
|---|
| 15 | --memory 4000 --vram 128 \
|
|---|
| 16 | --graphicscontroller vboxsvga \
|
|---|
| 17 | --nic1 bridged \
|
|---|
| 18 | --bridgeadapter1 eno1 \
|
|---|
| 19 | --largepages on \
|
|---|
| 20 | --pae on \
|
|---|
| 21 | --nestedpaging on \
|
|---|
| 22 | --vtxvpid on
|
|---|
| 23 |
|
|---|
| 24 | VBoxManage modifyvm $vm_name --nic2 hostonly \
|
|---|
| 25 | --hostonlyadapter2 vboxnet0
|
|---|
| 26 | VBoxManage unattended install $vm_name --iso=win10.iso \
|
|---|
| 27 | --user=dummy \
|
|---|
| 28 | --password=dummy \
|
|---|
| 29 | --full-user-name=dummy \
|
|---|
| 30 | --install-additions --locale=de_DE \
|
|---|
| 31 | --country=DE \
|
|---|
| 32 | --language=de-DE \
|
|---|
| 33 | --time-zone=CET \
|
|---|
| 34 | --key "$license_key" \
|
|---|
| 35 | --image-index=1 \
|
|---|
| 36 | --script-template /usr/share/virtualbox/UnattendedTemplates/win_nt6_unattended.xml \
|
|---|
| 37 | --post-install-template /usr/share/virtualbox/UnattendedTemplates/win_postinstall.cmd \
|
|---|
| 38 | --post-install-command='I:\os_install\Simu-Box_Prepare_OS.bat'
|
|---|
| 39 | VBoxManage startvm $vm_name
|
|---|