How to create a new virtual machine for Ubuntu:



First, download and install VirtualBox


1. Launch VirtualBox

2. Click New

3. This opens New Virtual Machine Wizard. Click Next

4. Give your new virtual machine a name, choose the right OS and version. These are automatically selected if VirtualBox can determine it from the name you gave. Click Next

5. Set the amount of RAM you want to assign to Ubuntu. For running a Linux vm (virtual machine), 512 MB is enough. You can assign as much as you want to, maximum being about 512 MB less of your host computer's RAM. Keep in mind though that RAM used by a running vm is away from the RAM Windows can use; assigning more RAM can make your vm run faster and better but at the same time make your Windows crawl so slowly even the vm halts. My recommendation is always leave at least 2 GB for Windows, or if you have under 4 GB of RAM only give maximum of 1 GB to a vm. Click Next

6. VirtualBox asks now if you want to create a new vhd (virtual hard disk), or use existing vhd. Choose Create new and click Next

7. New Virtual Disk Wizard starts. Click Next

8. Click Next to accept Dynamically expanding storage
 Dynamically expanding vhd means that although the guest consideres the HD being the size given (max value), host Windows only uses as much space on HD as is actually needed; a 20 GB dynamic vhd where only 4 GB is used is seen by Windows host as a 4 GB vhd file, not as a 20 GB file, but the guest OS sees the same vhd file as a 20 GB hard disk with 16 GB free. I recommend 8 to 12 GB for Ubuntu.

9. You can now accept the default location where VirtualBox offers to save the vhd, or change the location by clicking the small folder symbol. Default save folders are Your_Username\.VirtualBox (VirtualBox 3.2 and older) or Your_Username\VirtualBox VMs(from version 4 Beta). You can also change the original size of vhd here. Click Next

10. Click Finish to end New Virtual Disk Wizard

11. Click Finish to end New Virtual Machine Wizard

12. Now choose the virtual machine you just created and click Settings

13. Choose Storage from the left pane, CD/DVD from under the title IDE controller, and click the small CD symbol on the right


14. Now you need to tell VirtualBox which install media you want to use. You can assign any of the host system's CD/DVD drives to vm , or an ISO image to act as a CD/DVD drive. For now, you want to use the Ubuntu ISO you downloaded earlier. Browse to its location, choose it and click Open


15. Now choose Display from the left pane, assign the maximum 128 MB video RAM to virtual machine's emulated video card:

16. Next you need to setup network controller. Click Network on the left pane, choose Enable Network Adapter, choose Bridged Adapter, and choose your host computer's network adapter from drop down list:

Host-only only permits network operations with the Host OS.
NAT mode will mask all network activity as if it came from your Host OS, although the VM can access external resources.
Bridged mode replicates another node on the physical network and your VM will receive it's own IP address if DHCP is enabled in the network.

17. Click OK to save edited settings