Feed on
Posts
Comments

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.
  • Step 2: Creating a new Virtual Machine
    • 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
  • Give your virtual machine a unique name and select a place to save it.
    • Make sure you have enough space in the location to fit a least 2 gigs of files. (realistically much more is better)
  • Select the type of networking it will use
    • Bridged networking is generally the most transparent for a virtual server setup like this one.
  • Select the maximum disk space size
    • 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.
  • Click Finish (and wait)
  • Step 3: Install Ubuntu Server (basically a LAMP server setup)
    • 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)
  • When completed reboot and log in
  • Step 4: Setting up your new LAMP virtual server
    • 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”
  • run “apt-get update”
  • run “apt-get install apache2 php-mysql php-mysqli debconf-utils php5-mcrypt php5 php5-gd mysql-server mc openssh-server lokkit sysv-rc-conf phpmyadmin lynx”
  • run “vi /etc/apt/sources.list”
    • type “i”
    • comment out the line for the the install cdrom
    • type “esc”
    • type “:wq”
  • run “apt-get update”
  • run “mc”
    • 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).
  • Reboot
  • Test and season to taste ;)
  • Step 5: Compress the image and test
    • 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

    Trackback URI | Comments RSS

    Leave a Reply

    You must be logged in to post a comment.