Creating a Virtual Server with VmWare
November 4th, 2006 by tompossin
In the process of building the Virtual-Quickframe server for VmWare I ran in to a lot of small but prickly problems.
I have written the following installation notes to help myself and others when they are trying to build Virtual Server Images for use with either VmWare Player or VmWare Server software.
Getting Started:
- Step 1: Installing VmWare Server
- http://vmware.com has excellent instructions for installation so I am not going to duplicate their efforts.
- Click “Create a new virtual machine”
- Click “typical”
- Select the type of virtual machine
- For these instructions I am creating a virtual machine based on Ubuntu Server
- Make sure you have enough space in the location to fit a least 2 gigs of files. (realistically much more is better)
- Bridged networking is generally the most transparent for a virtual server setup like this one.
- This is important:
- For maximum speed check both boxes below the size widget
- For making an image for the smallest finished image size uncheck at least the first checkbox.
- Power on the Virtual machine with the Ubuntu disk in the cdrom
- Select “Install a Server”
- Select the proper language and keyboard settings.
- Choose a name for your virtual machine
- Partition the virtual drive for your sever (the default is often fine)
- Set the clock
- Set up first user
- (This is the sudo user for administration in Ubuntu)
- Log in and type “sudo su” to get into a “root” session
- run “apt-get update”
- run “apt-get upgrade” to get your installation up to date
- run “vi /etc/apt/sources.list”
- type “i”
- uncomment the commented repositories so you have access to the universe and multi-verse repositories
- type “esc”
- type “:wq”
- type “i”
- comment out the line for the the install cdrom
- type “esc”
- type “:wq”
- find /etc/iptab
- press F4
- edit the line for eth0 to the following
- eth0 driver pcnet32 arp 1
- press F2 to save
- This is VERY important if you want your image to have nework connection later. If you forget this step you will get a “eth0: Device not present” error later when you try to run your server image. This modification to iptab causes eth0 to be assigned to the first card with the pcnet32 driver instead of the specific MAC address of the “mother” virtual server image(When run on a different machine this MAC address does not exist).
- When you have a finished working virtual server use whatever compression software you have to compress the virtual servers folder in a “zip” archive.
- I use KDE so this is as easy as right clicking the folder and choosing “Compress as … folderName.zip” and waiting.
- Test the image
- move the zip file to another directory and extract
- open VmWare Server console and click “open a virtual machine”
- browse to the new folder and click the .vmx file
- choose to create an ID when asked and test your server.
- You should now have a working virtual server.
This is really all you should have to do to get a fully functional LAMP virtual server up and running and ready for distribution. I have made machines of this type with web software installed as small as 350megs compressed. This server had 1gig of available disk space after all the software was installed. Your mileage may vary.
Hope this helps!
{:> Tom Possin
Leave a Reply
You must be logged in to post a comment.
