Personal:Installing Virtualbox to run Windows inside of Linux
Contents |
Virtual Box
Virtual Box is a virtual machine for UNIX based Operating Systems. This allows you to run more than one OS at the same time. So for instance you've got your fully customized Ubuntu 7.10 installed and running on your brand new Dell and discover you want to run Windows Games and set up your printer becuase you own some USB All in One unit that has NO drivers on Linux for, but you hate the idea of dual booting... Virtual Box is the fastest and easiest way to get Windows running without ever leaving your comfortable and safe Linux enviroment.
Downloading and Installing Virtual Box
First off go to [http://www.virtualbox.org/wiki/Downloads] and follow the instructions for your platform, here I will be primarily focusing on Ubuntu 7.10 Gusty.
First edit your // /etc/apt/sources.lst // file and add:
deb http://www.virtualbox.org/debian gutsy non-free
Next type these following commands at a Terminal:
wget http://www.virtualbox.org/debian/innotek.asc sudo apt-key add innotek.asc wget -q http://www.virtualbox.org/debian/innotek.asc -O- | sudo apt-key add -
The key fingerprint is
6947 BD50 026A E8C8 9AC4 09FD 390E C3FF 927C CC73 innotek GmbH (archive signing key) <info@innotek.de>
After all that simply type:
sudo apt-get install virtualbox
Preparing A Virtual Machine
First thing, we need to do is set up the CD/DVD drive. So click on New:
Fill in the fields as shown above, you of course can use anything you want, but my values are pretty descriptive. ANYWAYS... moving right along, after you've filled in the fields with your values, click Next now we have to select the Memory to be used for our Virtual Machine:
It is best to use no less than 128MB for Windows XP, of course you must also consider the RAM installed, you will need enough RAM to run the Host Operating System, as well as the Guest. On my 1GB system, 256MB for a Guest OS is usually adequate and enough, unless that Guest OS is Vista LOL. Next we need to Create a Hard Drive to use so after clicking Next on the Memory screen click New and a new window will open:
Be sure to use the Dynamically Expanding image, because it will only use what space it needs, and will grow as needed as well.
On the next screen simply fill in the name of your Hard Drive image, and ignore the Drive Size slider, as this will be ignored, if you chose the dynamically expanding drive:
Once that's done Click Finish and then Next and you will be taken to the Summary screen:
Where you simply click Finish and BAM it's set up. There are only a few more steps to finish before you can install your Guest OS. First we need to configure Virtual Box to use the CD/DVD drive, so from the details tab click CD/DVD Drive and the settings window will pop up:
If you have the CD, Select your CD/DVD Drive from the pop down, If you only have an ISO file, select ISO and browse to it's location. Then click OK. Next on Ubuntu from a Terminal type:
# sudo /etc/init.d/vboxdrv start # sudo chown yourusername /dev/vboxdrv
Substitute your actual login name in place of //yourusername// obviously :-P Note: Users of Linuxes that don't use /etc/init.d to start programs, you will have to consult your distibution specific documentation in the User Manual found here .
Installing your Guest OS
This part is the easy part, really. Simply do the following:
- Insert Your CD/DVD (Unless you chose to use an ISO file above) - Press **Start** on the Virtual Box console - Follow the Guest Operating Systems Installation process.
Simple enough, eh? Unless your Guest OS is a pain to install, but that's beyond the scope of this article. Sorry :-O.
Caveats
One thing that may trip you up is you may or may not need to click in the virtual machine running the Guest OS install to enter text, and you will have to in order to use the mouse. Once done simply press the Right Control Key to release input back to the Host OS.
Windows Vista and AMD Networking
In order to get Ethernet connectivity working, after installing Vista in your Virtual Machine, you will need to Install // Guest Additions // which is located in the Devices option in the Virtual Machine menu. After this is done Vista will detect your Ethernet hardware and install it. You will have to reboot your Virtual Machine after the // Guest Additions // are installed.
USB Support
Now this does not apply to the Open Source version of Virtual Box, but in order to get USB working on Ubuntu Linux you'll need to complete the following steps:
1. Create a group called usbusers
2. Add yourself to this group
3. Edit the file // /etc/udev/rules.d/40-permissions.rules //(for this, you must have administrative privileges)
3.1 Search for the following lines (About line 67)
# USB devices (usbfs replacement) SUBSYSTEM=="usb_device", MODE="0664"
3.2 Change them to the following
# USB devices (usbfs replacement) SUBSYSTEM=="usb_device", GROUP="usbusers", MODE="0664"
4. Edit file file // /etc/init.d/mountdevsubfs.sh // (Again with administrative privileges)
4.1 Search for the following lines (Approx line 42) # # Magic to make /proc/bus/usb work # #mkdir -p /dev/bus/usb/.usbfs #domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644 #ln -s .usbfs/devices /dev/bus/usb/devices #mount --rbind /dev/bus/usb /proc/bus/usb
4.2 Change them to the following
# # Magic to make /proc/bus/usb work # mkdir -p /dev/bus/usb/.usbfs domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644 ln -s .usbfs/devices /dev/bus/usb/devices mount --rbind /dev/bus/usb /proc/bus/usb
5. Restart your PC
6. You should now have write access to all usb devices.
If you have more issues, please check these two links out:






