So far I mainly used Windows machines as development machines as well at home. Recently I have started experimenting with Ubuntu linux. Hence I wanted to install Ubuntu as Guest os on VirtualBox. However I faced few problems (like when maxium screen size was set to 800x600 and it took some time to figure out how enable screen size change). Hence i wrote down the steps that worked for me.
This is configuration that i used.
Host OS : Windows Vista
Guest OS : Kubuntu 8.1
Virtualbox version 3.0
Install Kubutu in VirtualBox
- Create a new VM (lets name it 'Kubuntu') in the Virtualbox
- Mount CDROM drive. 3. Put the Kubuntu CD in the drive OR Mount Kubuntu ISO image as drive
- Start new VM (Kubuntu)
- Kunbuntu Install CD will be detected. Proceed with installation.
- Basic Kunbuntu installation is done.
- Now you should be able to 'boot' to Kubuntu.
Installing Guest Additions
- Goto 'VirtualBox->Device->Install Guest Additions'.
- If there is already mounted CDROM drive, this will not work. Unmount the CDROM drive.
- Then Goto menu 'VirtualBox->Device->Install Guest Additions' again. Select the 'VBoxGuestAdditions.iso' image and mount as device.
- You will get a 'device list' in the Kubuntu guest os.
- Select the 'virtualbox' device for installing the 'guest additions'.
- In the Kubuntu, run 'konsole' to start the terminal window
- run 'cd /media/cdrom0' (or wherever the cdrom VBoxGuestAdditions.iso is mounted to)
- run 'sudo sh ./VBoxLinux-x86.run'. This will install Guest Addition kernel modules.
- Reboot the guest os.
- Now guest additions are installed.
- By default display size is set to 800x600 under VM. That is the maximum size set.
- Shut down the guest os and exit from Virtualbox.
- Goto virtualbox installation directory in the Host OS(Run 'cd
') Run 'VBoxManage setextradata global GUI/MaxGuestResolution 1200,800' from command line. Replace '1200,800' by whatever resolution supported by your computer. Start Virtual box and start the Kubuntu VM. Click 'Machine->Auto Resize Guest Display' menu Now Minimize/Maximize VM Window. Internal Kubuntu desktop window will now get resized. In Kubuntu, goto Application Laucher 'system settings->display'. Change the display size to the size you want and apply. Now next time when you start Kubuntu VM, you may just have to do the step 6 and 7. Run 'sudo apt-get install linux-kernel-headers' Now your basic compiler setup is done. You may want to download other softwares like CodeBlocks IDE. Run 'adept' package manager. Search 'Code blocks', Python etc. Click on 'Install' and then select 'Apply Changes' from Adept menu.
Sharing Files between windows host and linux guest.
On Windows, create folder (e.g. c:\shared). Goto VirtualBox->Devices->Shared Folder and add the created folder. Give a name to the folder (e.g. 'shared')
Run command 'vboxmanage sharedfolder add "Kubuntu" -name "shared" -hostpath "c:\shared"' Kubuntu is VM name.
sudo mount -t vboxsf shared $HOME/shared
If these steps help you or if you find any mistakes/want to suggest any improvements, please write a comment.