VMWare Server 2 on Ubuntu 8.04.1 LTS Server
A few years back VMWare released VMWare Server, a free version of their VMWare GSX Server line that gave the ability to host virtual machines for corporation and users alike. A wonderful peice of software. VMWare Server 2 has recently been released and is what's covered in this post. VMWare Server 2 comes in two flavors, Windows and Linux. We'll be using the Linux version with Ubuntu 8.04.1 LTS Server. The machine we will be building is for a dedicated virtual server, its primary job is to host virtual machines. My setup is not too far from VMWare's Flagship ESX server product, with a few exceptions; While ESX server sits on top of a low-profile linux core OS (along the lines of what I plan to do here) ESX does offer some higher-end abilities that make it worth using in a true production environment;
- VMotion which moves machines from Virtual Server to Virtual Server for either load blanacing or failures depending on configuration
- SAN Path Failover (in conjunction with the above, VMotion)
- Virtual VLAN
- SLA for CPU, Memory and Disks
Notes: For this article, I'm going to use a custom PC with an AMD Athlon64 x2 (dual-core) 5000+ Processor, 4GB of RAM and 4x500GB hard drives in a raid 0+1 configuration. I'm also assuming you have a fair amount of PC and Linux knowledge for this article.
Preflight
Now, first we need a copy of Ubuntu 8.04.1 LTS Server Edition, you can pick that up at the Ubuntu website under Get Ubuntu. Whether downloading or purchasing the CD, be sure to select 'Ubuntu 8.04 LTS Server Edition - Supported to 2013.'
You'll also need a copy of VMWare Server 2 and the licensing keys to go along with it. Don't worry, its free, you'll just need to sign up to get the keys. On VMWare's website, hit the 'download' now on the VMWare Server page. Register for the keys and download the .tar ball (not the deb, rpm or any other version of the file, you want the .tar/.tar.gz).
Other tools will come in handy, for example PuTTy and WinSCP if working from a Windows machine. PuTTy to SSH to your Ubuntu box and WinSCP to transfer the VMware Server install you downloaded. In my case, I'm working from my primary windows machine.
Ubuntu Install
Once you have obtained or burned the CD or USB stick, boot the PC and start the installation process.
Hostname
Under hostname, my server will be called DRGNSVR01, I'll refer to that name here on out.
Partitioning
Now at the partition configuration, you can go with defaults if you would like. For a production system, I strongly recommend against this, especially if you are using growing disk virtual machines from vmware workstation as you can easily fill your available space and if root ("/") is on the same partition as your virtual machines, could mean very, VERY bad things.
My partitioning is like so (1TB of Space);
Partition - Size
/boot - 100MB
/ (root) - 150GB
/var - 50GB
/virtualmachines - 800GB
Software Selection (packages)
For this server, i'm going to select OpenSSL and leave everything else blank. When prompted, change the settings to your liking/environment.
Ubuntu Configuration
Once Ubuntu has booted, login and do the following to update your apt-get lists and update your instance of ubuntu. You can do this by issuing the following command;
sudo apt-get update && sudo apt-get dist-upgradeThis can take anywhere from 5 to 35min depending on how fast your connection is and how out of date Ubuntu is. After its complete, now would be the time to reboot. Since you made a pretty major change and the Kernel just got updated.
Webmin Install
Webmin is an excellent management and reporting utility for linux, webmin basically gives you the ability to manage most of the features/servers of ubuntu through a handy web interface. In my opinion, its a lot easier to manage and more secure than having X installed. First, you'll need to install the prequisits by issuing the following command;
sudo apt-get install perl libnet-ssleay-perl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl opensslNow, look at the webmin site under the download section and either download the webmin_1.430_all.deb file to your machine and transfer it over via winscp or issue the following command on yoru ubuntu box;
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.430_all.debOnce the file has downloaded, issue the dpkg -i command as follows;
sudo dpkg -i webmin_1.430_all.debNow, one more thing you'll have to do is set a root password so you can connect to both webmin and later, the vmware server web interface. Run the following command to change the 'root' password;
sudo passwdOnce the password has been changed, you can now connect to the webmin interface at https://servername:10000 (in my case, https://DRGNSVR01:10000) and login via the root username and password.
VMWare Installation
Before installing VMWare Server 2, you'll need to install the prequisits by issuing the following command;
sudo apt-get install build-essential linux-kernel-devel linux-headers-server xinetdAs with any major change, now is a good time for a reboot. Once the server is rebooted, copy over the vmware installation to your ubuntu server. You can do this a number of ways; SCP, CD or USB. I'll use SCP via WinSCP to copy it over. Once its over, decompress the file;
gzip -cd VMware-server-2.0.0-116503.i386.tar.gz | tar xvf -Now enter the vmware-server-distrib directory and run;
sudo ./vmware-install.plFrom here, follow the defaults and let vmware do what it wants to do. If you created a seperate store for the virtual machines, be sure to specify that when prompted. If you didn't, you can always change it via the console. Keep an eye on what vmware asks you, this will take about 10 to 15min or so since it has to configure various portions and compile supporting applications and kernel modules.
Once VMWare Server is installed, I recommend a reboot. Its not required but its a good idea to reboot prior to running virtual guests on it (I've seen wierdness). Once you've rebooted, you can now login to vmware by going to https://yourserver:8333 (in my case, https://DRGNSVR01:8333) and login with the root account (you did set the password earlier, right?)
Post installation notes
- Be sure you set the root password, look up under the webmin install. If you haven't you won't be able to get into webmin or vmware console.
- In the webconsole, you can change datastores (where your virtual machines are located), users who have access to the system and many other aspects of vmware.
- If you plan on copying virtual machines over, I recommend installing samba (sudo apt-get install samba) and configuring a share via webmin. I find it faster than using winscp, which is odd, but it works.
- Becareful using apt-get dist-upgrade if the server is in a production environment. If a kernel upgrade is in place, you'll need to re-run vmware-config.pl (sudo vmware-config.pl) to have vmware config recomplile the modules, otherwise your virtual machines WILL NOT START UP after a reboot until you do so. I recommend; shutting down any virtual machines, running the dist-upgrade, rebooting, running vmware-config and rebooting once more. As always; if you have a production box its a stellar idea to have a development box you can test large upgrades on FIRST. That way you know what to expect if something doesn't go right.






Great instructions. Thank you.
You forgot to add:
[code]sudo apt-get install openssl[/code]
That needs to be installed for your instructions to work. Novices will bomb on this.
@Tim: Fixed that, thanks man. Tripped me up too on my last install.
Can we make the assumption on the partition settings that these are primary, configured ext3 and at the beginning of the disk?
Of course I could always figure that out by trial and error but I am attempting to save myself extended build time.
Good job on the instructions by the way.. Just what I was needing.
Nice instructions but I wonder on three things (only wonder, I am NOT arguing, please do not take offence)...
1. Why bother with webmin at all if this is a vmware server is there any need for it, or is it just something you like (which is a perfectly good reason)?
2. Rather than using winscp? I shared from the windows box and mounted that, then copied iso's for installing from, which means my server doesn't need an optical drive at all.
3. How do you go about backing up, I saw a script somewhere I cannot find again :( it would snapshot the vm and copied the snapshot to a share. Thought that was very neat.
Keep up the good work.