ADMIRAL VMWare ESXi notes

From ImageWeb

Jump to: navigation, search

Contents

VMWare ESXi notes

Installation from an ESXi ISO image burned onto a CD is very straightforward.

Remember to enable hardware virtualization (VT) in the system BIOS.

Install vSphere client: needs Windows XP SP2 or later

To upload machine image, see http://communities.vmware.com/thread/158682. Specifically, using the vSphere client:

  • Connect and log in to the required ESXi host
  • Home > Inventory > ESXi host > Configuration > storage
  • Right click on the datastore, and select "Browse Datastore...". A new window is displayed.
  • If this is not the first image for this system, you will need to remove the folder for it before creating a new VM. Remember to shutdown the VM before attempting to delete it!
  • Create a new folder for the new VM image files
  • Select the new folder, and upload VM image files

Installing ADMIRAL system under ESXi hosting

Upload a copy of the ADMIRAL system image; rename it to something useful (e.g. zoo-admiral-silk-root) before uploading it, as ESXi doesn't allow renaming of virtual disk images. We perform the upload in two stages:

  • Use WinSCP to copy the image to the machine running vSphere
    • Rename the image as required
  • Use vSphere to upload the image to the /images directory in the ESXi datastore

Using the vSphere client, create a new VM:

  • Home > Inventory > (right-click host) > new virtual machine...
  • select "custom install"
  • Select VMXNet3 networking and paravirtualized network driver.
  • When asked, don't create disk image

When the new VM has been created:

  • move image into directory when VM has been created
  • then add copied disk image to VM.

Initial configuration of the new VM, install VMWare tools:

  • Start the new VM. Initially, with VMXNET3 selected, networking does not work until VMWare tools has been installed.
  • Open console: right-click new VM and select "Open console"
  • In the new console window: VM > Guest > Install VMWare tools
  • Mount CDROM:
 sudo mkdir /media/cdrom
 sudo mount /dev/cdrom /media/cdrom
  • Install VMWare tools (NOTE: this requires that kernel development tools are installed - assuming use of --addpkg kernel-package linux-headers-xxx when creating the original image)
 cd /tmp
 cp /media/cdrom/VMwareTools-4.0.0-208167.tar.gz .
 tar xvfz VMwareTools-4.0.0-208167.tar.gz
 cd vmware-tools-distrib
 sudo ./vmware-install.pl
and accept default values for all questions asked.

At this point, networking should be working. It is recommended at this stage to install SSH, then continue the installation via an SSH session, which provides better capabailities for reviewing console messages:

  • apt-get install openssh-server

Add an LVM-hosted data volume to the system (using LVM allows more capacity to be added at a later date):

  • Using the ESX console allocate a new disk for the virtual machine. We currently specify 200Gb with thin provisioning.
  • In a system terminal session:
    • allocate a single partition occupying the entire disk via: fdisk /dev/sdb
    • create a LVM physical extent, volume group and logical volume (using all the available space) on the new partition, mount the resulting volume at /mnt/lv-admiral-data, and relocate the user data directories to the new disk by running /root/lvmconfig.sh.
      • The manual commands for doing this are:
pvcreate /dev/sdb1
vgcreate vg-admiral-data /dev/sdb1
lvcreate --name lv-admiral-data --extents 100%FREE vg-admiral-data
mkfs.ext3 /dev/vg-admiral-data/lv-admiral-data
mkdir /mnt/lv-admiral-data
mount /dev/vg-admiral-data/lv-admiral-data /mnt/lv-admiral-data/
cd /home
cp -axv data/ /mnt/lv-admiral-data/
mv data data-saved
ln -s /mnt/lv-admiral-data/data/ data
mkdir /mnt/lv-admiral-data/home
  • Edit /etc/fstab to add a line as follows:
/dev/vg-admiral-data/lv-admiral-data            /mnt/lv-admiral-data    ext3    acl,defaults        0       0

Before the next step, register the server for backups with HFS, and make a note of the backup node name and password (other password+1).

Log in, change to root and run script /root/postboot.sh. A series of questions will be asked, many of which will specify or require a password. Choose a secure password and use that in all cases, except where noted. The various phases run by postboot.sh require information as noted below:

  • Configuration of libpam-ldap: enter cn=admin,dc=zoo-admiral-silk,dc=zoo,dc=ox,dc-ac,dc=uk as required (first time does not need cn=admin).
  • Postfix installation: configure as "satellite", accept mail domain, and specify smtp.ox.ac.uk for mail relay
  • HFS setup: will ask for node name and password, and if scheduler is to be run.
  • TSM node name is domain name +".zoo"; e.g. zoo-admiral-silk.zoo.
  • Add LDAP schemas; the last step requires the LDAP admin password to be entered.
  • Creating certificates: a passphrase is requested multiple times.
  • Certificate signing: asks for passphrases several times.
  • Certificates are copied to final location.
  • Configure certificates in LDAP: requires the LDAP admin password.
  • Add Samba schema and indexes to LDAP: requires the LDAP admin password.
  • Runs SMB LDAP tools configuration script: asks many questions, just accept defaults except for master and slave password (use same for both). Also need to specify that passwords are MD5-encrypted (rather than the default SSHA) and that the mailname to be appended is zoo.ox.ac.uk.
  • Adding test_admiral user: password is test_admiral. (Twice! First time fails, but second time works.)

After postboot.sh has run, add test users to the system. Restart apache.

The test suite should now run successfully against the new server. Use script /root/addtestusers.sh to add usernames used by the test suite, and after the tests have run, use /root/deltestusers.sh to remove them again.

Running the vSphere client on MacOS/VMWare Fusion

To use the vSphere management client on a Mac, I planned to use VMWare fusion to run a Windows environment for this purpose. Previously, I have run the VMWare infrastructure client under Windows 2000m (which I chose in part because it is faster and has a smaller memory footprint), but the most recent ESXi insists on upgrading to the vSphere client, which requires Windows XP SP2 or later. FAIL!

So, to run vSphere, I decided to installed a virtualized copy of Windows 7, for which I have an upgrade disk. (I am assured that running under VMware Fusion under MacOS is an allowed upgrade path, at least under the locally prevailing licensing arrangements with Microsoft.) Trying to install Windows 7 from this disk directly into a new Virtual machine does not work, as the upgrade product key is not accepted. Trying to upgrade from Windows 2000 also does not work, as the 64-bit Windows 7 installer cannot be run from this old version of Windows. Trying to upgrade by booting the Windows 7 DVD also does not work, as the old file system format is incompatible.

Eventually, I found some useful tips at http://www.winsupersite.com/win7/clean_install_upgrade_media.asp, which got me on the path to success.

The procedure I eventually followed was this:

  1. Create a new virtual machine, configured with a 16Gb IDE (not the default SCSI) virtual drive
  2. Install Windows 2000 - I suspect this was not needed, but I mention it for completeness as it was part of my successful install sequence.
  3. Boot the Windows 7 install DVD, and perform the installation process, reformatting the virtual disk and completing without entering the software key.
  4. With the system running under its 30-day evaluation, and connected to the Internet, run the activate program and enter the product key.
  5. Install VMWare tools.

Then install the vSphere client. It works, but performance is not stellar.

Accessing the ESXi server console

See: http://www.virtualizationadmin.com/articles-tutorials/vmware-esx-articles/general/how-to-access-the-vmware-esxi-hidden-console.html

The relevant incantation is ALT+F1, then unsupported.

Enabling web access

See: http://www.mygeekfinds.com/2009/06/enable-web-access-on-vsphere-esx-4/

Note: web access is not supported in the free version of the ESXi (bare-metal) hypervisor

[root@vmware]# chkconfig –level 345 vmware-webAccess on

[root@vmware]# chkconfig –list vmware-webAccess
vmware-webAccess 0:off 1:off 2:off 3:on 4:on 5:on 6:off
[root@vmware]# service vmware-webAccess start
Starting VMware Virtual Infrastructure Web Access:
VMware Virtual Infrastructure Web Access [ OK ]

Log in as root at https://vmwareESXhostname/ui/.

Personal tools
Oxford DMP online
MIIDI
Claros