How To Build A Headless Virtual Windows Server
I have a Windows 2000 Server running ColdFusion connected to a Microsoft SQL Database. I use this to run the company inventory database as well as for web development. I also have Apache, PHP and mySQL running on my Kubuntu workstation. Also on my Kubuntu workstation is a virtual server with Windows XP, Windows Vista, and Windows 7 beta installed. I have been thinking it is time to consolidate to free up some resources on my workstation as well as take advantage of moving W2K to a virtual server.
I decided to build a Ubuntu LAMP (Linux/Apache/mySQL/PhP) Server with VirtualBox installed on it. Since Ubuntu Server does not have a desktop installed, the virtual server would have to be headless; which means anything running on the virtual server would have to be accessed via Remote Desktop.
I found an article on HOWTO: Setup Headless Sun xVM VirtualBox 2.0 on Ubuntu Server 8.10 – Windows XP. This article was a good starting point however when I tried to install VirtualBox I received an error that the kernel module could not be built as the kernal sources could not be found. Well the article said there would be some dependency problems and gave the command to run next... it didn't work.
I tried several different things and did some more research. My problem is I am a geek, but am still learning (shouldn't we all be?). So, after a couple of tries I finally got virualbox installed and here is how I did it.
1. Installed Ubuntu Server.
2. Installed openssh-server so I could remote into the server command prompt.
Note: Additional software will be installed to the Ubuntu Server using apt-get. Here is the APT HOWTO for managing packages. The packaging system uses a private database to keep track of which packages are installed, which are not installed and which are available for installation. The apt-get program uses this database to find out how to install packages requested by the user and to find out which additional packages are needed in order for a selected package to work properly.
3. Update the package list.
4. Upgrade the installed packages to the latest version.
5. Install Dynamic Kernal Module Support (dmks) which will take care of upgrading the Virtualbox kernel module if the Linux kernel is upgraded.
Now we are ready to install the VirtualBox virtual server. Download the latest version of VirtualBox here. and save it on the Ubuntu server.
6. Install the VirtualBox software.
7. Fix the dependency errors.
8. Here is where the compilation of the kernel module failed because the Linux kernel sources could not be found. Looking at the error I checked which kernel is installed and then tried to install the linux-headers for that version. That did the trick.
9. Assign the user to the vboxusers group
10. Are now ready to compile the vboxdrv and start the virtual server.
Hopefully that was good for you as well. We are now ready to install the guest OS. I installed Windows 2000 Server and so named the installation W2KServer. It really doesn't matter what you call it, just replace W2KServer with the name of your installation. These instructions follow that of the HOWTO mentioned above.
11. Install the Guest OS.
-register an install iso
Used Remote Desktop Connection client to connect to the virtual server. Should see the Windows installation.
12. After Windows Server was installed, I installed the VBoxGuest Additions.
13. Now to install Microsoft SQL Server 2000
Now that the Windows Server is installed, I still need to install service packs and updates. The network is by default configured using Network Address Translation (NAT) which probably won't work very well as it is on a different subnet from the rest of my network.
14. Switch the networking from NAT to hostIF. This connects guest OS NIC to the host NICC.
15. Some other commands that may come in handy:
FOLLOWUP: Well I have had this configuration up and running for a week now and am quite pleased with how it is working. I started out with 1GB of RAM and almost immediately increased it to 2GB. I also have a new 320 GB Hard Drive on the way. So far I have moved my inventory database to the virtual Windows 2000 server, all of my websites as well as eGroupware to the Ubuntu Server. I have mounted my home directory on my workstation to a folder on the root of the Ubuntu server and made it available to the W2K server. Oh, I also have Windows7 Beta and Windows XP running. This is accomplished by changing the port number of the startup command. VBoxHeadless -startvm W2KServer -p (port#). Then to bring up the desktop in Remote Desktop I just enter the <address of the Ubuntu server>:port#.
No feedback yet
It's all about change.... I'll take a look at technical items of interest and put in my "two cents worth".