Clone a XenApp 6.5 server on VmWare

Hello

We are setting up a new XenApp 6.5 farm. The farm is already setup, we added a second server to the farm for use as a template. Everything is running on Vmware.

First we prep the Xenapp server for imaging using the xenapp server role manager.
We then shut down the VM and convert it to a template.
The last step is to deploy a VM from the just created template using the customization wizard.
We fill in a new host name, ip address, join to the domain, ...

Problem now is that when we look at the farm there are 2 new servers added. One with a custom hostname (created by sysprep) and one with the name we specified.

Is there anyway we can work arround this problem? I also tried performing the sysprep in the OS itself but then i can't use the customization wizard. I just deployed the vm from my template without customization which results that the server is automatically joined to the farm with a bad hostname. At this moment the server is also still not joined to the domain.

Thx
LVL 2
FlipTripAsked:
Who is Participating?
 
Carl WebsterCommented:
Just a thought here since I don't use sysprep, I use PVS.

1.  Create a batch file that sets all the Citrix services that are currently set to Automatic to disabled
2.  Run that batch file right before you run sysprep
3.  Create a batch file that resets those services back to automatic
4.  Put that batch file in a separate GPO in a computer startup script
5.  After sysprep runs, joins the server to the domain and restarts, the script will run and set the services to automatic
6.  IMA will now start and the server should join the farm with the newly created server name

On every server restart after that, the services will already be set to automatic and the batch file will do nothing.  In the Citrix 2008 R2 optimization guide, they suggest setting the startup time for services to 10 minutes.  That should give the Citrix services plenty of time to start.  In XenApp 5, I have seen MFCOM and IMA take almost 10 minutes to do their thing.
0
 
MinoDCCommented:
if the OS load the sysprep works, you can use it from the customization wizard, typing this command in the screen where it asks you what commands to run at startup (in RunOnce):

 sysprep.exe / generalize / oobe
0
 
Carl WebsterCommented:
0
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

 
MinoDCCommented:
pardon:  

sysprep.exe /generalize /oobe
0
 
FlipTripAuthor Commented:
@CarlWebster
Yep. Its approach 3 we want.

@MinoDC

Problem is that when the image is prepped and we deploy a VM from the image 2 processes will run when the VM is started:
1 Sysprep and 2 XenApp will join the server back to the farm. Problem is that the server should be joined to the farm when sysprep is finished, the server has the correct hostname and is joined to the domain.
We want all these steps to be automated so that litte user interaction is needed.
0
 
MinoDCCommented:
Can you try to insert a .bat file (in C for example) with this content:

net stop (citrix service)
net stop (citrix service)
net stop (citrix service)
sysprep /generalize /oobe

and insert c:\name.bat in the screen where it asks you what commands to run at startup.

Or you can select VMware sysprep, and add net stop command in the screen where it asks you what commands to run at startup.
0
 
FlipTripAuthor Commented:
That's it.
1. I prepared the XenApp server for imaging with the Xenapp Server role manager.
2. Disabled IMAService, CitrixHealthMon, CtxHttp and CitrixXTEServer services.
3. Shutdown my Xenapp server
4. Convert the VM to template
5. Deploy a VM from the template with customization (generate new sid, new hostname, join domain, ...)
6. Created a GPO with a script to set the service back to auto and start them.

Thx for the help!
0
 
MOQINFRACommented:
can you please give an example of the runOnce Script. I disabled IMA Service.
Now i am not sure where to create the RunOnce Script or what to put in the script

We have Server 2008 R2 (i.e x64)
where to create the RunOnce key??

HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce
or
HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\RunOnce

Or what GPO settings
0
 
FlipTripAuthor Commented:
You can also use the preferences in gpo to re-enable the services instead of a script. Also, create your computer account in advance and put it in the right OU.

Grtz
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.