VMware Cloud Community
Windspirit
Hot Shot
Hot Shot
Jump to solution

vCD VM Customization Event?

HI all,

in vCenter there are events for Guest Customaztion

  • VMware.Vim.CustomizationStartedEvent
  • VMware.Vim.CustomizationSucceeded
  • VMware.Vim.CustomizationFailed
  • VMware.Vim.VmStartingEvent

And that works fine for VM's that are created with GuestCustmization via VC. These eventes do NOT trigger when vCD creates the VM and providesthe Guest Customization.

II looked thought the REST and the Logs (GUI) and I cant find any event that captures if GuestCustomization staretd or is finished (let alone failed).

Do I miss something or did nobody yet thought of including this in vCD.

Reply
0 Kudos
1 Solution

Accepted Solutions
Windspirit
Hot Shot
Hot Shot
Jump to solution

The solution is that vCD uses the ESXi plugin to push guest customization. So the event cant get to vCenter. The only good answer to the problem is to have the VM send an email and then create a poll on that checks for the email....or an HTTPS post and tehn a poll on that... D

View solution in original post

Reply
0 Kudos
4 Replies
aneverov
VMware Employee
VMware Employee
Jump to solution

Hi,

On VCD 5.1.x and before the primary mechanism of carrying status notifications is via guestinfo.gc.status property which is set by guest customization scripts. VCD listens to this property and is supposed to post an alert on VM in case of customization failure. This is an implementation detail, so I wouldn't recommend to rely on it in your code as it may change in the future.

I can tell that VC events are usually posted as well. However, it's not reliable - I've seen templates where events were posted and others without any events. For instance, I had some Vista 32 template with no events whatsoever and RHEL 5 with events. I'm looking into how to improve this for the next release.

Did you want to use VC events for some purpose?

/Andrii

/* Please remember to mark answer as 'helpful' or 'correct' such that other users know it can be used and people focusing on ‘unanswered’ questions can skip it. */
Reply
0 Kudos
Windspirit
Hot Shot
Hot Shot
Jump to solution

I did some extensive testing with vCD 5.1 and vC 5.1.1 and the customization events are NOT recorded in VC when vCD pushes them, they are recorded fine using normal VC deploy with Guest Customization.

As for your questions: dont really need to use VC, just thought it would work.

guestinfo.gc.status is a VMwareTools propertiy, how can I read it out?

Reply
0 Kudos
aneverov
VMware Employee
VMware Employee
Jump to solution

Well, as I said previously I've seen it working for some templates. This could be an issue of VM setup as well. We've seen in the past cases when there

were some Windows services interferring with the Tools service.

Regarding guestinfo.gc.status, I think you have two main options:

1) from the outside you can setup Property Collector on VM or the whole Folder

2) from inside the guest you can use something like:

C:\Program Files\VMware\VMware Tools\vmtoolsd.exe --cmd "info-get guestinfo.gc.status"

I don't know if you want to use this to determine when guest customization is complete. In that case you should read the following blog post: http://blogs.vmware.com/vsphere/2012/06/using-a-guest-customization-script-to-tell-when-vappvm-is-re...

/Andrii

/* Please remember to mark answer as 'helpful' or 'correct' such that other users know it can be used and people focusing on ‘unanswered’ questions can skip it. */
Windspirit
Hot Shot
Hot Shot
Jump to solution

The solution is that vCD uses the ESXi plugin to push guest customization. So the event cant get to vCenter. The only good answer to the problem is to have the VM send an email and then create a poll on that checks for the email....or an HTTPS post and tehn a poll on that... D

Reply
0 Kudos