Archive for : March, 2014

image_pdfimage_print

VMware How To: Shut Down vCloud Director Cell Cleanly

To cleanly shut down a vCloud Director cell run the following commands.

Display the current state of the cell to view any active jobs.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --status

Then Quiesce the active jobs.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --quiesce true

Check the cell isn’t processing any active jobs.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --status

Shut the cell down to prevent any other jobs from becoming active on the cell.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --shutdown

Now run the status command again to check that job count says zero.
#  /opt/vmware/vcloud-director/bin/cell-management-tool -u <USERNAME> cell --status

vCD cell status

Then stop the vCD service.
# service vmware-vcd stop

When you want to bring the host back up again start the service.
# service vmware-vcd start

A typical service start takes around 2-5 minutes.  You can monitor the progess of the restart by tailing the cell.log file.
# tail -f /opt/vmware/vcloud-director/logs/cell.log

cell starting

Once it say’s 100%, it is done.

VMware How To: Create a NFS Shared Transfer Area

When setting up a multi-cell vCloud Director environment you will need to create a shared area to store the transfer folder that is used whenever something is uploaded to a vCloud Director cell, such as an ISO or an OVF template.

The diagram below shows a typical multi-cell, multi-vCenter setup.

vCD Application Layer Logical Design

In order to create the share we can use a CentOS virtual machine as the shared area.  Any NFS mount will suffice provided that it allows for ownership of folders to be set.  This guide will assume you have already created the NFS share.

This guide also assumes this is being run on a new vCD cell.  If you have already deployed vCloud Director take a backup of the contents of the /opt/vmware/vcloud-director/data/transfer folder before you start otherwise any uploaded content that hasn’t yet been copied to a datastore will be lost.
Also if the cell already exists you can skip step 1.  Just make sure to stop the cell service first.
service vmware-vcd stop

The steps to be performed on the vCD cells  are

  1. Create the transfer folder.
    mkdir -p /opt/vmware/vcloud-director/data/transfer
  2. Mount the NFS share to the new folder location.
    mount nfshost.fqdn.or.ippaddr:/nfs.export.name /opt/vmware/vcloud-director/data/transfer
  3. Use VI to edit the fstab file to auto mount the NFS share upon start up. You can also use winSCP to edit this file.
    vi /etc/fstab
  4. Add the following line to the fstab file.
    nfshost.fqdn.or.ippaddr:/nfs.export.name /opt/vmware/vcloud-director/data/transfer nfs rw 00
  5. Save the file and exit
    : wq
  6. Take ownership of the folder and contents
    chown -R vcloud:vcloud /opt/vmware/vcloud-director/data/transfer/*
  7. Install vCloud Director as normal.  For an existing cell, restart the vCD service.
    service vmware-vcd start

VMware How To: Deploy a Virtual Machine in the VMware vCloud Hybrid Service

A short video explaining how to deploy a virtual machine in the VMware vCloud Hybrid Service.
A technical overview of the vCloud Hybrid Service is available here.

VMware How To: Create A Custom ESXi Bootable ISO With Third Party Drivers

PowerCLIIf you have wondered how you can go about creating your own ESXi image complete with any drivers, such as storage controller drivers or network card drivers then you can use PowerCLI imagebuilder to achieve this.
This is helpful if the standard ESXi image is causing a purple screen of death (PSOD) when trying to boot up ESXi.

 

To do this you will need a copy of PowerCLI, you can download the v5.5 from the VMware website.
Once installed, set the execution policy to remote signed.

Set-ExecutionPolicy RemoteSigned

Now you are ready to start building your custom image following the steps below.

Import the VMWare software and vendor depot
Add-EsxSoftwareDepot C:\Name_of_ESXi_Offline_Bundle.zip
Add-EsxSoftwareDepot C:\Driver_Name_of_VIB.zip

Find the name of the driver we added
Get-EsxSoftwarePackage -Vendor Vendor_Name

Find the name of the image profile we want to copy. This will list all the image profiles available within the offline bundle.
Get-EsxImageProfile | Select Name

Copy the image profile that we need and give it a name
New-EsxImageProfile -cloneprofile ESXi-5.5.x.x-standard -name New_Name

Add the VIB to the image, <name> is the name of the driver (E.g. qlogic-nic)
Add-EsxSoftwarePackage -imageprofile name -softwarepackage <name>

Export to a new .ISO
Export-EsxImageProfile -imageprofile name -exporttoiso -filepath “c:\custom.imagebuilder.iso”

Boot from the ISO and you have your own custom ESXi image.

image_pdfimage_print