Category Archives: VMWare

VMware – Disabling DHCP On A Linux Host VMware Server

VMware – Disabling DHCP On A Linux Host VMware Server

This article provides steps on how to disable the DHCP services on a Linux Host based VMware Server 1.0.8 server.

To disable the DHCP services on a Linux Host based VMware Server 1.0.8 server perform the following steps :-

  • Logon to the Linux Server
  • Edit the file /etc/vmware/net-services.sh
  • Search the file for the line below :-

vmware_bg_exec ‘Host-only

  • You should now see the lines shown below :-

vmware_bg_exec ‘Host-only networking on /dev/vmnet'”$vHubNr” \

vmware_start_hostonly “$vHubNr” ‘vmnet'”$vHubNr” \

                  “$hostaddr” “$netmask” ‘yes’

  • Edit the last line above and change it to the following :-

“$hostaddr” “$netmask” ‘no’

  • Save and Exit the file
  • In the command line execute the command below :-

/usr/lib/vmware/net-services.sh restart

  • The DHCP Services have now been stopped on all VMware Networks

VMware – Installing ESXi 4 via PXE

VMware – Installing ESXi 4 via PXE

Introduction

This article explains how to install VMware ESXi 4 over the network using PXE.

The infrastructure used for this article is a Centos 5.3 server with Tftp installed to provide the PXE server and a DD-WRT router running as the DHCP server with PXE options configured through DNSMasq.

Installation instructions for the Centos Tftp server and DD-WRT router are outside the scope of the article.

Pre-requisites

In order to install VMware ESXi 4 via PXE the following pre-requisites must be met :-

  • A copy of the  VMware ESXi 4 installation ISO
  • A DHCP server configured to provide the relevant PXE options
  • A Tftp server to provide the installation media
  • A 64 Bit architecture server

Copying the installation files to your PXE server

Once you’ve got the installation ISO mount the image and copy the contents to your PXE Server directory (On Centos /var/lib/tftpboot folder).  The following files should now be in your PXE Server directory :-

cimstg.tgz
cim.vgz
ienviron.tgz
image.tgz
install.tgz
sys.vgz
vmkboot.gz
vmkernel.gz

Modify the PXE Configuration file

Once the files have been copied to the PXE Server directory edit the PXE configuration file (On Centos /var/lib/tftpboot/pxelinux.cfg) and add the following lines :-

label Install ESXi 4
kernel mboot.c32
append vmkboot.gz — vmkernel.gz — sys.vgz — ienviron.tgz — cim.tgz — image.tgz — install.tgz

Test the implementation

Once the steps above have been performed test the installation by network booting the target machine and the VMware ESXi 4 installation should start.

VMware – Enabling SSH Access To ESXi

VMware – Enabling SSH Access To ESXi

This article provides the steps to perform in order to enable SSH access to an ESXi server.  ESXi comes with the abiity to run SSH but is disabled as default.

To enable SSH access to a ESXi host perform the following steps :-

  • At the ESXi Console press ALT F1 to access the console window
  • In the console window type unsupported and the press Enter

N.B. You will not see anything appear on the screen as you type it

  • At the Tech Support Page type in the root user password when prompted
  • The prompt will then change to ~#
  • At the command prompt edit inetd.conf by executing the following command

vi /etc/inetd.conf

  • Locate the line starting with #ssh stream tcp
  • Remove the # (Hash) symbol from the start of the line to uncomment it
  • Save and Exit the file
  • Next identify the Process ID for the inetd service on the host by executing the following command

ps | grep inetd

  • The output from the command above should show a similar output to below

5048 5048 busybox  inetd

N.B. The Process ID for the inetd service in the above output is 5048 although yours will differ

  • Using the Process ID returned when the ps | grep  command was ran execute the following command

kill -HUP {Your Process ID}

SSH access is now enabled on the ESXi host machine and to test it connect to the host using a SSH client and when prompted logon using the rootaccount and password.

VMware – Attaching iSCSI disks to an ESXi 4 server

VMware – Attaching iSCSI disks to an ESXi 4 server

Introduction

This article explains how to attach an iSCSI disk to a VMware ESXi 4 server.

The infrastructure used for this article is an Openfiler 2.3 server configured as an iSCSI Target Server with a single NIC to connect to the Internal LAN and provide iSCSI connectivity also.

Enabling the iSCSI storage adapter

The iSCSI storage adapter in ESXi comes as part of the standard installation but is disabled by default.  To enable the adapter perform the following steps :-

  1. Open the vSphere client and connect to the ESXi host
  2. Click on the Configuration tab and then click on Storage Adapters in the Hardware section
  3. Highlight the iSCSI software adapter and select Properties.
  4. Click on the configure button, tick Enabled and then click on OK.

Adding a send target server

Once the iSCSI software adapter is enabled perform the following steps within the adapters Properties :-

  1. Click on the Dynamic Discovery tab
  2. Click on the Add button
  3. When prompted enter in the IP address of the iSCSI target server and click on OK.
  4. When prompted to re-scan the host select Yes.
  5. Once the re-scan has completed the iSCSI LUN’s which are available on the iSCSI target server appear.

Assigning an iSCSI LUN as a datastore

One way to present an iSCSI LUN(s) for use by a guest is to create it as a datastore.  To create a datastore for an iSCSI disk resource perform the following steps :-

  1. In the vSphere Client click on the Configuration tab.
  2. Select Storage from the Hardware section and then click on the Add Storage link
  3. When prompted select the Disk/LUN option and click on Next
  4. You will be presented with a list of available LUN’s which the ESXi server can see.
  5. Select the desired LUN and then click on Next
  6. At the current disk layout screen click on Next when prompted to create a new partition
  7. Enter the desired Datastore name and then click on continue
  8. Configure the Block Size to the desired setting and then click on Next and then Finish to create the Datastore

Assigning an iSCSI LUN to a virtual machine

It is also possible to directly assign a LUN to a virtual machine as either part of the creation of the guest or as an additional disk.  The following sections provide information on how to perform either of these methods to add a LUN to a virtual machine.

Assigning a LUN during virtual machine creation

To assign a LUN to a virtual machine during its creation perform the following steps :-

  1. Click on the Create a new virtual machine option
  2. Select a Custom configuration and then click on Next
  3. When prompted set the Virtual Machine name as desired and then click on Next
  4. Set the datastore to be used as desired and then click on Next
  5. Select the Virtual Machine Version required (Either v4 or v7 depending on your requirements) and then clcik on Next
  6. Select the Guest Operating System required and then click on Next
  7. Configure the amount of Memory you wish to assign and then click on Next
  8. Assign the amount of Network Cards you require and the pertinent Networks to connect them to and then click on Next
  9. Select the LSI Logic Parallel SCSI controller and then click on Next
  10. Select the Raw Device Mappings option for the disk and then click on Next
  11. Select the desired LUN from the list to assign to the Virtual Machine and then click on Next
  12. When prompted for where to store the LUN mapping select Store with Virtual Machine and then click on Next
  13. Select whether the LUN is presented to the Virtual Machine as a Physical or Virtual and then click on Next
  14. Configure the Virtual Device Node SCSI ID as desired and then click on Next
  15. Click on Finish to create the new Virtual Machine

Assigning a LUN as an additional disk for a virtual machine

To assign as LUN as an additional disk on a virtual machine perform the following steps :-

  1. Edit the virtual machine’s Properties and click on the Add button
  2. Select Hard Disk from the list of devices and then click on Next
  3. Select Raw Device Mappings for the disk type and then click on Next
  4. Select the desired LUN from the list to assign to the Virtual Machine and then click on Next
  5. When prompted for where to store the LUN mapping select Store with Virtual Machine and then click on Next
  6. Select whether the LUN is presented to the Virtual Machine as a Physical or Virtual and then click on Next
  7. Configure the Virtual Device Node SCSI ID as desired and then click on Next
  8. Click on Finish to add the new Hard Disk device to the Virtual Machine

VMware – Installing ESXi 3.5 Update 4 via PXE

VMware – Installing ESXi 3.5 Update 4 via PXE

Introduction

This article explains how to install VMware ESXi 3.5 Update 4 over the network using PXE.

The infrastructure used for this article is a Centos 5.3 server with Tftp installed to provide the PXE server and a DD-WRT router running as the DHCP server with PXE options configured through DNSMasq.

Installation instructions for the Centos Tftp server and DD-WRT route are outside the scope of the article.

Pre-requisites

In order to install VMware ESXi 3.5 via PXE the following pre-requisites must be met :-

  • A copy of the  VMware ESXi 3.5 Update 4 installation ISO
  • A DHCP server configured to provide the relevant PXE options
  • A Tftp server to provide the installation media
  • Copying the installation files to your PXE server

Once you’ve got the installation ISO mount the image and copy the contents to your PXE Server directory (On Centos /var/lib/tftpboot folder).  The following files should now be in your PXE Server directory :-

binmod.tgz
cim.tgz
ienviron.tgz
install.tgz
license.tgz
oem.tgz
vmkernel.gz

Modify the PXE Configuration file

Once the files have been copied to the PXE Server directory edit the PXE configuration file (On Centos /var/lib/tftpboot/pxelinux.cfg) and add the following lines :-

label Install ESX3.5i Update 4
kernel mboot.c32
append vmkernel.gz — binmod.tgz — ienviron.tgz — cim.tgz — oem.tgz — license.tgz — install.tgz

Test the implementation

Once the steps above have been performed test the installation by network booting the target machine and the VMware ESXi 3.5 installation should start.