I have a Dell Inspiron laptop with 300GB hard drive, in which I use 200GB for Windows 7 and 100GB for Ubuntu 12.04.

Is there any way I could operate my Windows 7 in Ubuntu, because there are some applications which run in Windows and every time I need to shut down Ubuntu and restart using Windows, making it a tedious job?


Sure you can't do that since every OS has different kernel to be loaded and other things related to its core image to run correctly.

But you can install windows applications using wine inside ubuntu.


What your are asking is called a Hypervisor. Xen Hypervisor is one of those.

What is Xen?

Xen is an open-source type-1 or baremetal hypervisor, which makes it possible to run many instances of an operating system or indeed different operating systems in parallel on a single machine (or host). Xen is the only type-1 hypervisor that is available as open source. Xen is used as the basis for a number of different commercial and open source applications, such as: server virtualization, Infrastructure as a Service (IaaS), desktop virtualization, security applications, embedded and hardware appliances. Xen is powering the largest clouds in production today.

Components in detail:

  • The Xen Hypervisor is an exceptionally lean (<150,000 lines of code) software layer that runs directly on the hardware and is responsible for managing CPU, memory, and interrupts. It is the first program running after the bootloader exits. The hypervisor itself has no knowledge of I/O functions such as networking and storage.

(more details when you click the link)

Image of the setup (source of the image). The source has a very nice comparison between VMWare, MS Viridian and Xen.

enter image description here

The Ubuntu official documentation has installation method and tips and tricks on how to set this up:

During installation of Ubuntu

During the install of Ubuntu for the Partitioning method choose "Guided - use the entire disk and setup LVM". Then, when prompted to enter "Amount of volume group to use for guided partitioning:" Enter a value just large enough for the Xen Dom0 system, leaving the rest for virtual disks. Enter a value smaller than the size of your installation drive. For example 10 GB or even 5 GB should be large enough for a minimal Xen Dom0 system. Entering a percentage of maximum size (e.g. 25%) is also a reasonable choice.

Installing Xen

Install a 64-bit hypervisor. (A 64-bit hypervisor works with a 32-bit dom0 kernel, but allows you to run 64-bit guests as well.)

sudo apt-get install xen-hypervisor-amd64

Modify GRUB to default to booting Xen ("Xen 4.1-amd64" should be replaced with the appropriate name, in 12.10 the line is "Ubuntu GNU/Linux, with Xen hypervisor"):

sudo sed -i 's/GRUB_DEFAULT=.*\+/GRUB_DEFAULT="Xen 4.1-amd64"/'
/etc/default/grub sudo update-grub

Set the default toolstack to xm (aka xend):

sudo sed -i 's/TOOLSTACK=.*\+/TOOLSTACK="xm"/' /etc/default/xen

Now reboot:

sudo reboot

And then verify that the installation has succeeded:

sudo xm list 
Name      ID   Mem VCPUs     State    Time(s) 
Domain-0  0   945     1     r-----      11.3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.