VirtualBox

Ticket #9549: create-launch_vm_vbox.bash

File create-launch_vm_vbox.bash, 1.9 KB (added by Arend Dittmer, 13 years ago)

This is the complete create and launch script.

Line 
1#!/bin/bash -x
2
3# Print env for debugging purposes
4/usr/bin/env
5
6cd /Volumes/MYPOCKET7
7rm -rf ./*.log
8
9/bin/cp "vm-images/pagefile_vol_vmware.vmdk" "$USBCOMPCFG"
10/bin/cp "vm-images/pagefile_vol_vmware-s001.vmdk" "$USBCOMPCFG"
11/bin/cp "vm-images/pagefile_vol_vmware-s002.vmdk" "$USBCOMPCFG"
12/bin/cp "vm-images/pagefile_vol_vmware-s003.vmdk" "$USBCOMPCFG"
13
14"$VMM_PATH/VBoxManage" setextradata global GUI/UpdateDate never
15"$VMM_PATH/VBoxManage" createvm -name MyPocket7 --basefolder "$USBCOMPCFG" -register
16"$VMM_PATH/VBoxManage" storagectl MyPocket7 --name "IDE Controller" --add ide
17"$VMM_PATH/VBoxManage" storageattach MyPocket7 --storagectl "IDE Controller" --port 0 --device 0 --type hdd --mtype immutable --medium "$(pwd)/vm-images/usbcomp_7.vmdk"
18"$VMM_PATH/VBoxManage" storageattach MyPocket7 --storagectl "IDE Controller" --port 0 --device 1 --type hdd --mtype immutable --medium "$(pwd)/vm-images/usbcomp_user.vmdk"
19"$VMM_PATH/VBoxManage" storageattach MyPocket7 --storagectl "IDE Controller" --port 1 --device 0 --type hdd --medium "$USBCOMPCFG/pagefile_vol_vmware.vmdk"
20
21if [ -n "$VBOX_CDROM_DVD" ]; then
22 "$VMM_PATH/VBoxManage" storageattach MyPocket7 --storagectl "IDE Controller" --port 1 --device 1 --type dvddrive --medium host:"$VBOX_CDROM_DVD" --passthrough on
23else
24 "$VMM_PATH/VBoxManage" storageattach MyPocket7 --storagectl "IDE Controller" --port 1 --device 1 --type dvddrive --medium emptydrive
25fi
26
27if [ -n "$NIC_BRIDGED" ];then
28 "$VMM_PATH/VBoxManage" modifyvm MyPocket7 $NIC_OPTIONS "$NIC_BRIDGED"
29else
30 "$VMM_PATH/VBoxManage" modifyvm MyPocket7 $NIC_OPTIONS
31fi
32
33"$VMM_PATH/VBoxManage" modifyvm MyPocket7 --nestedpaging off --vram 64 --pae off --ioapic on --bioslogoimagepath "config/splash_vbx.bmp" --bioslogodisplaytime 8000 --hwvirtex off --memory $VBOX_MEMORY --ostype Windows7 --audio coreaudio --audiocontroller ac97 --boot1 disk
34"$VMM_PATH/VBoxManage" startvm MyPocket7
35#"$VMM_PATH/VirtualBox" --startvm MyPocket7

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy