Windows on Linux - without Windows
October 8, 2007 2:55 PM   Subscribe

Is it possible to create a virtual Windows machine on a Debian box without X, then access the virtual machine remotely? Basically, I want to have a headless Debian server running virtual machines. I'm sure it's possible, and I've done similar things inside of X, but how would I go about doing it without X? Qemu? VMWare? Virtualbox?
posted by cdmwebs to Computers & Internet (11 answers total) 5 users marked this as a favorite
I've done this with VMWare. You setup the server with VMWare Server and use a box with X or Windows to configure the virtual machines. E-mail's in profile if you have any detailed questions.
posted by advicepig at 3:03 PM on October 8, 2007

So, I create the machine on my headless box, then vnc or rdp in to install and configure the guest OS?
posted by cdmwebs at 3:04 PM on October 8, 2007

Both remote X and VNC work just fine on a headless machine. Getting VNC up and running should be pretty easy; just apt-get install tightvncserver and it'll grab all the X packages you'll need. Remote X will probably just need the x11-common package.
posted by marionnette en chaussette at 3:15 PM on October 8, 2007

Agreeing with what the others said.

I have actually gone a step further with this. I have two linux boxes, one which is main workstation (let's call it wendell) and another running headless but with X and VMWare player installed (let's called it vinnie). I can run a MS Windows session on vinnie but display it in a window on wendell by running a command like this:

ssh -CX vinnie 'vmplayer /path/to/mswindows.vmx'

So, I am running a remote X session through ssh to display the graphics shown by VMWare. You'd think it would be slow, but it's actually much more responsive for me than using VNC on the same network.

A few other things worth noting:

1. You can create GNOME or KDE launcher icon on the desktop with the command listed earlier to make it easy to start your MS Windows session.

2. You can also add the --fullscreen option to vmplayer in order to make your MS Windows session take up the whole screen.

3. You can change the path to the vmx file in order to run other operating systems (or different configurations of the same operating system).
posted by tomwheeler at 4:06 PM on October 8, 2007

All great suggestions. Thanks!

One caveat is that I need to remote to the virtual server from other windows boxes via RDP. I see what you're saying with X over SSH, but can I have the virtual server start at boot and be waiting for remote connections from other Windows clients, too?
posted by cdmwebs at 4:19 PM on October 8, 2007

VMWare player lacks any particular management capability, but you might be able to hack something together with initscripts to ensure your VM launches automatically.

A better way is to use VMWare server, which lets you configure a VM to startup/shutdown with the underlying (host) machine.
posted by tomwheeler at 4:26 PM on October 8, 2007

They're giving you answers that are far too complex.

Install VMWare Server on the Debian box. Tell it to adjust the inetd.conf file so that it's listening on port 902. Install the client part of VMWare server on any other machine you want.

Then, you just connect with the client software over the network to the Debian machine, and build and run the virtual machine. You get full graphic capability over the network. I think you can even haul the soundcard over the net too, although I've never tried that.

You don't need any other solution. VMWare uses SSL encryption by default, so it should be immune to session snooping. You don't need VNC or any other solution; you get full graphic support just with the client. You don't need anything else to do what you want.

You may WANT to put Remote Desktop on the virtual Windows box, because it's definitely faster than the VMWare protocol, but you don't have to.

VMWare Server isn't open source, but it doesn't cost anything.
posted by Malor at 5:36 PM on October 8, 2007

Oh, once you're connected to the remote box, you can set individual machines to start when Debian starts, so they'll come up automatically. You can also set VMWare to automatically shut down guest OSes at system shutdown as well, if you have installed the VMWare Tools package in the virtual environment. (you definitely want to do this, it speeds things up a lot, and reduces load on the host.)

VMWare Server is entirely abstracted from the machine it's running on. You can administer a remote server exactly the same way you would a local box. The only difference is that the screen updates are quite a bit slower.

You can also install the 'vmware-mui' package if you wish, which installs a light-duty Apache server listening on whatever port you want... this gives you a little more of a system overview. You don't have to install the MUI; just the server software itself and the client on any remote box you want to use as an administrative console.

Remember that if you update your kernel, you may have to rerun the script... it builds modules for your kernel. Whenever the version number in the kernel changes, you'll have to recompile those modules, which means you'll have a few minutes of downtime after a reboot. Something to be aware of.
posted by Malor at 5:44 PM on October 8, 2007


Thanks - that sounds like the way to go. At this moment, I'm installing XP on a qemu virtual machine. I think the VMWare Server solution looks quite a bit cleaner. I'll try it next.

Anyone know how the hosting companies do this on such a large scale? Take the Google approach and throw more hardware at it?
posted by cdmwebs at 6:18 PM on October 8, 2007

Many of them use VMWare ESX Server, which is an expensive piece of software.... couple thousand bucks at least. It runs directly on the bare metal, and can then support multiple operating systems quite easily, with lots of features for managing multiple machines from a single console, including live migrations and the like. The freebie Server is the teaser to show you good their solutions are (and they are excellent).

There's also GSX Server, which is very much like the freebie Server, but which offers most of the same tools that ESX Server does. It runs on a host operating system, rather than directly on the bare metal.

There's a number of other solutions out there too; Xen, QEMU, OpenVZ, User Mode Linux, and the new kernel 'containers' are all different approaches that are Linux-based. Under Windows, there's also Virtual PC from Microsoft, but that's kind of braindead in comparison to most of the other offerings. I'm not sure how widespread most of them are. Xen has problems, so I don't think it's wide use. User Mode Linux is used in at least a couple of major installations I know of, but UML tends not to perform as well as most other solutions. It is, however, very stable. The others I just haven't heard too much about.

For what you're doing, VMWare Server is just exactly first your requirements precisely.
posted by Malor at 6:42 PM on October 8, 2007

Darn. "fits", not "first".
posted by Malor at 6:42 PM on October 8, 2007

« Older help finding software   |   Who's hacked the Linksys NAS200? Newer »
This thread is closed to new comments.