Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I look for documentation about how to create a Windows VM on an Ubuntu host, the only articles I can find are articles about Ubuntu Desktop, not Ubuntu Server.

Is there a way to create a Windows VM on Ubuntu Server? Can anyone point me to any articles? Bonus points if I don't need to compile anything or do anything super complex.

share|improve this question
If you already know how to use KVM on the command line, just sudo tasksel install virt-host, and you will have everything ready for full-blown server for virtualization. – Oxwivi Nov 23 '11 at 9:05
This page is quite enough to tell you how to get started with KVM on the command line. To access the VMs, just use VNC. If you need any more explanation, comment and tag me @Oxwivi, I will make a full answer. – Oxwivi Nov 23 '11 at 9:07

You should use KVM, because ... because Ubuntu love Kvm

what is KVM

KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).

Using KVM, one can run multiple virtual machines running unmodified Linux or Windows images. Each virtual machine has private virtualized hardware: a network card, disk, graphics adapter, etc.

The kernel component of KVM is included in mainline Linux, as of 2.6.20.

Ubuntu uses KVM as the back-end virtualization for non-graphic servers and libvirt as its toolkit/API. Libvirt front ends for managing VMs include virt-manager (GUI).

Let's go to hack

This setup guide is to configure a KVM on Ubuntu Server and management of the VMs is done remotely from another machine running Ubuntu Desktop.


STEP #1: Install lib-virt package.

sudo apt-get install kvm libvirt-bin  

STEP #2:allow incoming tcp and udp packet on port 22 (ssh) on server

sudo ufw allow 22


STEP #2: Install Virtual Machine Manager (on Ubuntu Desktop machine).

sudo apt-get install virt-manager  

STEP #3: Connect to the server: execute virt-manager

gksudo virt-manager
  • FILE.
  • ADD Connection.
    • Connect to remote computer
    • Method : SSH
    • User : your user server
    • machine name : ip address of the server


STEP #4: Create the Guest VM image. Virtual Machine Manager provides a GUI to easily create an image. Just right-click on the server and select “New”. You will then be prompted step-by-step on the variables (e.g. # of processors, memory, etc.) needed to be configured for your VM.

STEP #5: Install the Guest VM OS. Use your regular CD/DVD installer or iso image to install the operating system on the VM.

More information in ubuntu official server Documentation -> here

Good Luck and Happy Rocking

P.S : you souldn't be afraid of command line.....

share|improve this answer
Not afraid of the command line (I actually kinda love it), I just hate the complex stuff that usually causes errors that I have to google for hours to troubleshoot. – Phil Oct 28 '11 at 21:29
Just keeps asking me for my servers root password - over and over and over :/ – iwayneo Aug 29 '15 at 15:42

VirtualBox (what you'll have been reading about in the desktop threads) has a few command line tools that allow you to run any virtual machine in a headless state.

An example would be:

VBoxHeadless -startvm vm_name

You would still need to set up the VM which can be done, I believe, with VBoxManage (VBoxManage --help for options there). It might be easiest to do initial configuration on a desktop and then transfer the config and disk image to the server.

If you want it to run on boot, you'd want to write an init or Upstart script for it to load, or just shove the command in /etc/rc.local as a lazy, unmanaged method (you'll probably want & on the end of the command so it doesn't block the system loading).

But similarly, you might have to use Upstart so it doesn't load up until networking has come up. Play around with it and let us know what works.

But you shouldn't need to compile anything.

Edit: There are some run-on-boot suggestions in this thread.

Edit 2: There are some old installation instructions here but what is really useful there are the example VBoxManage statements:

VBoxManage createvm -name "Ubuntu 8.04 Server" -register
VBoxManage modifyvm "Ubuntu 8.04 Server" -memory "256MB" -acpi on -boot1 dvd -nic1 nat
VBoxManage createvdi -filename "Ubuntu_8_04_Server.vdi" -size 10000 -register
VBoxManage modifyvm "Ubuntu 8.04 Server" -hda "Ubuntu_8_04_Server.vdi"
VBoxManage registerimage dvd /home/ubuntu-8.04.1-server-i386.iso
VBoxManage modifyvm "Ubuntu 8.04 Server" -dvd /home/ubuntu-8.04.1-server-i386.iso

You'll need to customise them for your situation but they should give you a good reference point.

share|improve this answer
official virtualbox documentation vboxmanage -> – hhlp Oct 28 '11 at 17:02
@Oli ♦ Hmm what did you mean by headless state? – chrisjlee Jan 24 '12 at 6:15
@ChrisJ.Lee Headless means without a monitor. Most people manage their servers remotely without any sort of connected display. – Oli Jan 24 '12 at 10:09
@Oli ah thank you. – chrisjlee Jan 24 '12 at 15:14

You didn't ask if you need open-source/free software or commercial.

This is a good commercial solution I am personally using:

share|improve this answer
Not sure why this was downvoted. Not all commercial software is evil, just the stuff from Redmond and Cupertino. – Oli Oct 28 '11 at 16:43
@Oli Redmond ain't that bad. Don't hate. – Phil Oct 28 '11 at 16:51
I was joking! Blimey. Everybody is taking me too seriously today :) – Oli Oct 28 '11 at 16:55
Well I didn't say anything about Cupertino... ;) – Phil Oct 28 '11 at 17:03
haters gona hate.. – ao789 Nov 12 '13 at 13:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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