NOTE: the base system software will be downloaded and installed at this could take a while. Guided - use entire disk (press enter twice to accept disk selection).Keyboard (Origin of the Keyboard / Keyboard layout).From the "Installer boot menu" select "Install".Press enter|return to start base system installation VBoxHeadless -startvm $NEW_VM_NAME -e "TCP/Ports=5000-6000 " || exit 1 # NOTE: VBoxHeadless turns on VRDE regardless of the "-vrde on|off"Įcho "About to start ' $NEW_VM_NAME' with remote RDP enabled " # start the virtual machine with VRDE (Remote Display) enabled (you should see output similar to: "VRDE server is listening on port 3389") VBoxManage modifyvm $NEW_VM_NAME -vrdeport "5000-6000 " -vrde off -vrdeauthtype null -vrdemulticon on # set the remote display port and set off VRDE (Remote Display/RDP) by default (FYI, VBoxHeadless turns it on for that session regardless of this setting) VBoxManage storagectl $NEW_VM_NAME -name "IDE Controller 1 " -add ide -controller PIIX4 -hostiocache on VBoxManage storageattach $NEW_VM_NAME -storagectl "SATA Controller 1 " -type hdd -port 0 -device 0 -medium $NEW_VDI_PATH VBoxManage storagectl $NEW_VM_NAME -name "SATA Controller 1 " -add sata -controller IntelAHCI -hostiocache on # define a SATA controller, and attach HDD image to the SATA controller # VBoxManage modifyvm $NEW_VM_NAME -nictype2 82540EM -nic2 bridged -bridgeadapter2 $ADAPTER_NAME # uncomment only for nodes that need to have an external presence # setup bridged networking using the first virtual network interface (assumes a GB adapter) VBoxManage modifyvm $NEW_VM_NAME -natpf2 "https,tcp,443,443 " VBoxManage modifyvm $NEW_VM_NAME -natpf2 "http,tcp,80,80 " # expose machine's to the internet via port forwarding (this + iptables is quite secure) VBoxManage modifyvm $NEW_VM_NAME -nictype2 82540EM -nic2 nat -natpf2 "ssh,tcp,2222,22 " # setup NAT (need to run "sudo dhclient" on host before this works) VBoxManage modifyvm $NEW_VM_NAME -nictype1 82540EM -nic1 hostonly -hostonlyadapter1 vboxnet0 # setup an internal network via the primary interface VBoxManage modifyvm $NEW_VM_NAME -ostype Ubuntu_64 -clipboard disabled -memory 512 -cpus 1 -acpi on -ioapic off -rtcuseutc on -hwvirtex on -nestedpaging on -bioslogofadein off -bioslogofadeout off -boot1 disk # modify the VM using sane linux server defaults VBoxManage createvm -name $NEW_VM_NAME -register VBoxManage internalcommands sethduuid $NEW_VDI_PATHĮcho "Creating new virtual machine: ' $NEW_VM_NAME' " # copy the template disk image to the new image location and assign a new UUIDĮcho "Creating new virtual disk image: ' $NEW_VDI_PATH' from base file: ' $USE_VDI_PATH' " # use template image to create a new disk image Tar -xvf $VDI_TEMP/ $USE_VM_NAME.tgz -C $VDI_TEMP/ Wget -timeout=1 -wait=1 -c $USE_VM_NAME.tgz -O $VDI_TEMP/ $USE_VM_NAME.tgz # if file already exists, "wget" will skip retrieving it by default # download disk image (continues partial downloads) "Įcho "You might try the command 'VBoxManage unregistervm $NEW_VM_NAME -delete' " # quit if the disk image file exists (should we allow a switch to force overwrite?)Įcho "Please try again after correcting the situation. # Check that we aren't trying to clobber an existing VDI file # name of virtual machine to manage/create # Setup a proper name for the new virtual machine # Template VM Name (probably should be based on provided argument but good for now) # virtual disk image root directory (a dedicated user/admin account is recommended) # NOT RECOMMENDED TO MODIFY UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING! VBOX_LATEST_FILE_OSX= $(wget -q $.vbox-extpack
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |