Gå til hovedinnhold

HOW TO CONFIGURE VIRTUALBOX ON A HEADLESS SERVER

To install a headless VirtualBox on an Ubuntu-host, follow this guide from burnz.

1. On the headless server, create a new virtual machine:
VBoxManage createvm --name "Windows XP" --ostype WindowsXP --register
Note that you do not need to specify --ostype, but doing so selects some sane default values for certain VM parameters, for example the RAM size and the type of the virtual network device. To get a complete list of supported operating systems you can use:
VBoxManage list ostypes
2. Make sure the settings for this VM are appropriate for the guest operating system that we will install. For example:
VBoxManage modifyvm "Windows XP" --memory 256 --acpi on --boot1 dvd --nic1 nat --vrdpmulticon on --accelerate3d on
3. Create a virtual hard disk for the VM (in this case, 10GB in size):
VBoxManage createhd --filename "WinXP.vdi" --size 10000
4. Add an IDE Controller to the new VM:
VBoxManage storagectl "Windows XP" --name "IDE Controller" --add ide --controller PIIX4
5. Set the VDI file created above as the first virtual hard disk of the new VM:
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 0 --type hdd --medium "WinXP.vdi"
6. Attach the ISO file that contains the operating system installation that you want to install later to the virtual machine, so the machine can boot from it:
VBoxManage storageattach "Windows XP" --storagectl "IDE Controller" --port 0 --device 1 --type dvddrive --medium /full/path/to/WinXP.iso
7. Start the virtual machine using VBoxHeadless:
VBoxHeadless --startvm "Windows XP"
If everything worked, you should see a copyright notice. If, instead, you are returned to the command line, then something went wrong. You can list all registered machines with:
VBoxManage list vms

--- OPTIONAL EXTRAS ---

To easy start, stop, autostart one or more VMs install Vboxtool from http://sourceforge.net/projects/vboxtool/

On my Ubuntu-host I had problems with kvm-intel, and VirtualBox would not start. I had to remove the driver from the kernel with:
sudo rmmod kvm-intel
And then rebuild the VBox-driver:
sudo /etc/init.d/vboxdrv setup
You may also try installing dynamic kernel module on the host:
sudo apt-get install dkms
You can change the boot order of the VM with:
VBoxManage modifyvm "Windows XP" -boot1 dvd -boot2 disk -boot3 floppy -boot4 net
Look up virtualbox.org for some additional commands, and here you can download some pre-build images: virtualboxes.org

Kommentarer

Populære innlegg fra denne bloggen

Autodownloader for put.io

Downloading files from your put.io archive can be done with wget, it can be done unattended and you won't even have to initiate the job: Place all the files you would like to download in a folder on put.io (i.e /download). Create the script download.sh on your system. Run the script as a cron-job (crontab -e) download.sh #!/bin/sh wget --limit-rate=20k --no-check-certificat -c -nH -P /FOLDER/ -r --ftp-user=USERNAME --ftp-password=PASSWORD ftp://ftp.put.io/download/* --limit-rate=20k will limit bandwith to 20k --no-check-certificat will skip certificate check -c will make wget continue the download if  interrupted   -nH will stop creating the ftp-path in your download-folder -P /FOLDER/ tell wget where to put the downloaded files -r recursive, so that even folders in download will be downloaded --ftp-user=USERNAME Your username to put.io --ftp-password=PASSWORD Your password to put.io (special characters need a backslash i.e PASS\!WORD if your p...

Locales i Ubuntu og andre Debian-spinoffs

"dpkg-reconfigure locales" genererer locales som er listet opp i filen "/var/lib/locales/supported.d/local". Ønsker man å generere flere enn de som allerede er oppført må man derfor legge de til der (en på hver linje) før man kjører "dpkg-reconfigure locales". Godtatt syntaks finnes i filen "/usr/share/i18n/SUPPORTED". Typisk: no_NO.UTF-8 UTF-8 no_NO ISO-8859-1

Helle synger Flashlight (Jessie J) og vinner Talentiaden 2016 på Gudeber...