Using Guest Customization with pre and post deploy

When you use Guest Customization Scripts, it's important to define when they are running.

Getting ready

We will need a vApp with VMs in it. To test the results in this recipe, it is good if you have a Linux and a Windows VM so that you can test the results better.

How to do it...

  1. Double-click on the vApp to enter it.
  2. Select a VM that you want to configure with Guest Customization.
  3. Right-click on the VM and select Properties.
  4. Click on Guest OS Customization.
  5. Make sure you have enabled Guest Customization and then scroll down to the end of the page.
  6. In the large textbox, enter the following scripts depending on your operating system:
    • The following is the Linux script:
      #!/bin/sh if [ x$1 == x"precustomization" ...

Get VMware vCloud Director Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.