VMware Horizon Community
madilall
Contributor
Contributor

Sysprep RunOnce VMware view 4.6

I updated my infrastructure to 4.6. Everything is fine but one thing is changed. I use linked clone with composer and the sysprep in the infrastructure 4.5 installed fine a programi with a command line in the sysprepre runonce customization. Now when I recompose a machine the program isn't installed. With 4.6 the recompose is faster than 4.5 but in the 4.5 there was a time of 5 minutes before the last reboot after recompose. Now it reboot immediately. I think that the runonce don't have enough time to install the program. Where can i modify this time setting.? Anyone has this kind of problem? How can I isntall a msi automatically on each recompose (no gpo). Thanks

0 Kudos
5 Replies
kgsivan
VMware Employee
VMware Employee

If you want a script to run on desktops after they are created, recomposed, or refreshed, enter the path to a script on the Parent VM in the Post Synchronization script field.

0 Kudos
fduranti
Hot Shot
Hot Shot

We are using sysprep and not quickprep and we're using the runonce configuration in the sysprep wizard to deploy the application.

The infrastructure is completely upgraded - vmware view 4.6 - view composer 2.6 - vmware vcenter 4.1 update 1 - esx 4.1 update 1 - view agent 4.6

The strange thing is that with view 4.5/vcenter 4.1 when we was running recompose we see that the sysprep log on the Administrator user and reboot after 5 minutes leaving the time to msiexec to install the antivirus.

Now with 4.6 the recompose is really fast but after it run it will not logon Administrator account (and will not wait 5 minutes) and checking with some cmd.exe /c echo commands put in the RunOnce we see that sysprep launch them but probably the view agent/composer reboot the machine before the msiexec is finished.

Changing for example the Administrator login times to 2 will login the administrator user 1 time (instead of 2) but it will not install the antivirus (because probably the msiexec runned just before the last reboot) and the desktop will remain with the Administrator user logged in and it will be never available for the user if we don't logout the Admin user manually.

So it seems that something has changed in the way the sysprep is run between 4.5 and 4.6 of vmware view or from vsphere 4.1 and 4.1 update 1.

Another strange thing is that we found a empty sysprep logs.

Running the same sysprep customization with a manual clone of the same template from vsphere (with vmware view agent removed) we find that the antivirus is installed and all is working correctly on this clone so it seems related to the way the view composer handle the sysprep.

Another small strange thing is that running the sysprep with the manual clone from vsphere it will take much more time then when sysprep is run from the view composer.

0 Kudos
kgsivan
VMware Employee
VMware Employee

Thanks for the detailed information. Let us see if that is a bug.

Please provide below information:

1. What was the version of View and vSphere prior to the upgrade ?

2. Has the upgrade performed as per the Vmware Upgrade Guide ?

3. Was runOnce working with previous versions ?

4. Do you see this issue for both upgraded and new pools ?

Also it whould be good if you cna provide agent and broker logs

I would also suggest to call the VMware support

Thanks

Siva

0 Kudos
fduranti
Hot Shot
Hot Shot

Hi, those are the information you need:

1)  Prior to the upgrade we was running vsphere 4.1 (with all patches released before update 1) and vmware view 4.5

2) The upgrade was done as in the upgrade guide: we upgraded

     a) all connection servers

     b) all security gateway

     c) all transfer server

     d) vcenter server to 4.1 update1 and view composer to 2.6

     d) agent on our master image used in persistant automated composer pool.

3) RunOnce on the view 4.5 was running correctly, what we see with 4.5 view recompose was this sequence:

     a) machine reboot

     b) sysprep is run (probably here the RunOnce is applied to the registry)

     c) machine is rebooted for the last part of sysprep

     d) administrator account is logged into the machine (and RunOnce program get running and finish executing)

     e) after 5 minutes view composer/agent reboot the machine

     f) snapshot is taken and the desktop become available

4) We have the same behaviour for new and upgraded pool

In this way if we did a refresh we get a machine complete with the AV installed.

Now it seems that there's something happening between step c) and e) of the sysprep. Running sysprep customization directly from vsphere cloning the same Master image we use for vmware view run correctly, the administrator is loggend in at the end of the sysprep and the RunOnce run correctly.

Running the recompose on view 4.6 we see something like this:

     a) machine reboot

     b) sysprep is run (probably here the RunOnce is applied to the registry)

     c) machine is rebooted for the last part of sysprep

     d) at the end of the sysprep machine is rebooted immediately

     e) snapshot is taken and desktop become available

It seems that there's something  strange in step "d".

It seems (but it's too fast to see it) that during step "d" just before the reboot the Administrator Account is logged in (so the RunOnce programs start to run and the RunOnce key is deleted) and there's no "5 minutes" timeout before the reboot. At this point normally the machine will not install the RunOnce program (sometimes it seems that the AV is installed but incorrectly).

I hope this can clear the situation a bit more.

My collegue opened also a call with vmware for this problem (If you need the call #) let me know.

Francesco

0 Kudos
six4rm
Enthusiast
Enthusiast

Hi,

Did you ever find out how to resolve this issue at all?

I've been trying to install Sophos AV via a RunOnce script and it's been proving difficult. I've basically encountered the exact same as yourself in that the 1st Administrator login occurs and then Sysprep shuts the machine down within seconds not giving any time for the scripts to execute.

0 Kudos