Recipes » Ubuntu Desktop as ESX Image
Ubuntu Desktop as ESX Image
Ubuntu Desktop as ESX Image
Creating Ubuntu Desktop 9.04 (or newer) as VMWare ESX image
Pre-installation Steps
- Download Ubuntu Desktop file ubuntu-9.04-desktop-i386.iso to your local machine, use WinSCP to copy this to the ESX server directory /home/admin, and via SSH console move that file to its ultimate destination, e.g. /vmimages/tools-isoimages/myimages.
Warning: 32 bit ISO is preferable. The 64 bit file gives an error message: 'This kernel requires an x86-64 CPU, but only detected an i686 CPU. Unable to boot - please use a kernel appropriate for your CPU.'
- Via VI Client create a new virtual machine, pick "Linux - Ubuntu (32 bit)", pick the default RAM size (512MB) and the defautlt disk (8GB).
- Add two NIC cards to it, configure them both to use vmxnet rather than flexible interfaces. (Try "flexible")
- Pick the ISO image for your CD-ROM device and mark Connect at Startup.
- Run the virtual machine:
- Pick English installation interface
- Select "Install Ubuntu"
- In the installation welcome screen select English, click Forward
- Pick your city and time zone
- Pick keyboard layout for the country you are in, e.g. Latvia > Apostrophe variant
- Pick Specify partitions manually (Advanced)
- In partitioner click New partition table, create the ext3 partition - its size is all the free disk space minus about 1000MB for swap (i.e. around 7500MB). It is primary partition with mount point "/". Also create a "swap" as primary partition - all remaining disk space.
- Create use "bcadmin" with password from the datasheet; name computer as usrv6 (or another short name).
- After installation is finished, remove the CD-ROM (in VI Client edit settings for CD/DVD - pick Client Device) and restart by pressing Enter in the Ubuntu screen.
Network Connectivity
- Open Applications > Accessories > Terminal, type sudo passwd and set the password for the root.
- Pick System > Preferences > Network Connections
- Edit eth0 IP4 settings - pick method Manual and write in a fixed IP address, mask and gateway from the data sheet.
- Verify eth1 IP4 settings - it should be a DHCP connection.
- In a terminal window run the following command:
/etc/init.d/networking restart
Run the Ubuntu updates
- Edit the file and remove comments (hash signs) in four places:
sudo gedit /etc/apt/sources.list
- Run these three commands:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Restart, when the machine suggests it.
Post-installation steps
- If you have upgraded distribution, some packages are no longer needed and may be auto-removed. Also install some basic development tools:
sudo apt-get autoremove
sudo apt-get install gcc make binutils
apt-get install xinetd build-essential linux-headers-`uname -r`
- Install VMWare Tools - in VI Client right-click the Ubuntu virtual machine and select Install/Upgrade VMWare tools. It shold mount a virtual DVD with two installation files. Copy the VMwareTools-3.5.0-153875.tar.gz file to your desktop.
- In a terminal window run these commands:
cd ~/Desktop
tar xzvf VMwareTools-3.5.0-153875.tar.gz
cd vmware-tools-distrib
sudo ./vmware-install.pl
- Module vmhgfs (for shared folders feature) should cause compilation error (could rerun vmware-config-tools.pl), everything else should compile and install successfully.
- To restart networking:
/etc/init.d/networking stop
rmmod pcnet32
rmmod vmxnet
depmod -a
modprobe vmxnet
/etc/init.d/networking start
- To ran VMWare Tools, during X server session run: "/usr/bin/vmware-toolbox".
Tags: esx