?
Solved

Help cloning a Citrix PS 4.0 server (never done it before)

Posted on 2009-04-20
36
Medium Priority
?
1,346 Views
Last Modified: 2012-06-22
I have a few servers in my farm and recently one of them went down. I'm thinking the easiest way to deal with this is to clone the servers. Each of these servers are identical models and hardware with hot-swappable drives. They're running Windows 2003 Server and Presentation Server 4.0, and the data store is on an MS SQL 2005 server. I do not have a base image of any of these machines, although I figured I could probably just pull one of the drives from a working server and pop it into the one I need to rebuild. I just don't know what adjustments to make and I guess I'm looking for some reassurance since I've never tried doing this before.

I read the Citrix article (CTX107406) at http://support.citrix.com/article/CTX107406&searchID=-1. I'm still a little confused though. I believe the process would go something like this?

1. Remove the bad server from the farm and from the domain.
2. Unplug the bad server from the network.
3. Replace the bad server's drives with a hard drive from one of the good/working servers.
4. Generate and apply a new SID for the server. (How/where do I do this?)
5. Rename the machine and join it back to the domain.
6. Start the IMA service.
7. Edit the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\IMA. Set "ServerHost" to the new name.
8. Edit the registry key: HKEY_CLASSES_ROOT\AppID\(SID). Set "RunAs" to "(server name)\Ctx_SmaUser"

How off am I? ;)
0
Comment
Question by:elorc
  • 16
  • 12
  • 8
36 Comments
 
LVL 37

Accepted Solution

by:
Carl Webster earned 2000 total points
ID: 24185425
SYSPREP will do the new SID, new name and join to the domain for you.

Check out http://support.citrix.com/article/CTX116063 and http://shannon.neutex.net/2008/07/08/cloning-a-xenapp-server-with-xenappprep/
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24193706
You could alos download NewSID and use the to generate a new SID. Once you join it to the farm again I would do a refresh of the local host cache, dsmaint config /recreatelhc. Then use CHfarm to join the server to the exsisting farm.
0
 
LVL 1

Author Comment

by:elorc
ID: 24193780
I'm still a little confused here... which instructions do I follow? Do I want to build a vDisk or a XenServer template? Once I've built it, how do I deploy it to the machine I want to rebuild? And when it says "Restart the master target device" is it referring to the machine I want to put the new image onto, or is it referring to the production machine that I'm cloning onto the new one? I'm assuming by target it means the machine that I'm installing the image onto.

Sorry, I know these are pretty stupid questions but having never done this before, I'm not sure what some of these things mean. Thanks.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 37

Expert Comment

by:Carl Webster
ID: 24193810
The instructions are for a variety of systems: Physical, virtual and using Provisioning Server.  Your master is your master physical server.
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24194023
If you're using Xenserver you can make a copy of the original Vdisk  then import it into the console. I would power the original or master down while following the next steps.


Ensure that local admins can administer Citrix farm,
Remove Domain
Configure Ip address
Change farm using Chfarm
Set IP and team nics
Run new sid and give server a new name.
Add to domain
Change citrix farm
Run SMA recreation tool CTX106393
0
 
LVL 1

Author Comment

by:elorc
ID: 24194239
Ok so here's what I did.

1. Copied XenAppPrep over to the working server and removed one of the hard drives.
2. Powered down the problem server, pulled its hard drives, and replaced them with the one I pulled from the working server.
3. Removed the problem server from the domain and from the farm.
4. Disconnected the problem server from the network and powered it back up.
5. Installed XenAppPrep, ran it from the command line as just "XenAppPrep" (no /pvs switch). It said it generalized everything successfully.
6. I renamed the server to the correct name (placing it in a temporary workgroup) and ran sysprep to reseal it.

So at this point can I power it back on, reconnect it to the network, and join it back to the domain?
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24194304
When your clones come online, the XenAppPrep service will kick in, reset all of your machine-specific information, and kick off the XenApp services such as IMA. Then, your clone will work just like the XenApp server. Since you ran the tool without the /pvs switch,will only run on the first bootup and disable itself after that.
0
 
LVL 1

Author Comment

by:elorc
ID: 24194306
I don't have XenServer. It's just a farm of physical servers with hot-swappable drives running Presentation Server 4.0.
0
 
LVL 1

Author Comment

by:elorc
ID: 24194315
Okay so since I've rebooted it once since then, I should run XenAppPrep again, power it down, plug it back into the network and boot it back up?
0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24194342
No, I believe you only need to run XenAppPrep once since you did not need to use the /pvs switch.  You should be good to go.
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24194368
yes
0
 
LVL 1

Author Comment

by:elorc
ID: 24194386
Ok so Sysprep is waiting for me to finish the process after reboot. I should enter in all of the info, join it to the domain, and all should be good?
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24194390
yes to power it down, plug it back into the network and boot it back up, I missed the xenappprep part..
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24194501
yes
0
 
LVL 1

Author Comment

by:elorc
ID: 24194704
Ok, after I brought the system back up and finished SysPrep it says:

User Interface Failure

The Logon User Interface DLL:
M:\Windows\system32\ctxgina.dll failed to load

Contact your system administrator to replace the DLL, or restore the original DLL.


It only gives me a button to "Restart"
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24194797
What RAID config are you using?
0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24194824
0
 
LVL 1

Author Comment

by:elorc
ID: 24195690
I'm not sure how to do that in my situation. It's not a virtual disk. If I put this drive into another machine, I believe that machine's drive will start to replicate over this one.
0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24195739
Since this is physical, just boot to the login screen or wherever it gets to. go to another server and see if you can do a remote registry edit.
0
 
LVL 1

Author Comment

by:elorc
ID: 24196064
No luck. It doesn't seem to be grabbing an IP address. If it is, I'm having no luck locating it. It's not joined to the domain yet so I couldn't check there either. During Sysprep's whole process it just asked me to name the machine and set the local admin password. Nothing about joining the domain came up.

0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24196099
Yet another reason to add to my list of reasons to not remap the server's drives.

Unless someone else can come up with a solution for you, you may be hosed.  Do you need to remap the server's drives?
0
 
LVL 1

Author Comment

by:elorc
ID: 24196136
I was able to get into Safe Mode (I didn't think it would work) so I'm going to try making the changes there.
0
 
LVL 1

Author Comment

by:elorc
ID: 24196167
We don't need to remap the drives. The only reason I've kept it that way was because that's how it's always been here. I inherited this system that was originally set up by private consultants. I believe you were the one who actually helped me with one of my original issues here: Crystal Reports wasn't functioning properly with in-house applications because the drive was M: and not C:. So this wouldn't be the first time it's given me an issue.

I'm going to try applying these changes while in safe mode. Hopefully that works. Failing that, I guess I'm screwed and have to reinstall this server from the ground up. Ugh.
0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24196173
Good, completely forgot about Safe Mode.  Sorry.
0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24196200
If you reload the server, I would recommend NOT remapping the server's drives.  But that is probably painfully obvious now.
0
 
LVL 1

Author Comment

by:elorc
ID: 24196353
Okay... lol... it's not over yet.

So I found the node in the registry that it's referring to:  HKEY_LOCAL_MACHINE\System\MountedDevices. Under that I have two keys:

\DosDevices\C:
\DosDevices\D:

So I should just need to change \DosDevices\C: to \DosDevices\M: and I should be set?

0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24196393
and D: to N:
0
 
LVL 1

Author Comment

by:elorc
ID: 24197213
That resolved the drive letter issue. I can log into the machine locally now, but the network adapters don't work. It shows them as installed but it's indicating there is a problem with the driver. I'll have to try reinstalling the drivers. I didn't notice the XenAppPrep thing opening anything up, though. Is that a big deal, or can I just add this machine to the domain and to the farm manually once I get the network adapters working?

0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24197517
XenAppPrep should have taken care of the necessary stuff to make sure IMA works properly.
0
 
LVL 1

Author Comment

by:elorc
ID: 24197542
It shows up on the list of servers but no one can seem to connect to it. If I try to connect to it through Program Neighborhood, it hangs at "Connection in progress..." for a minute and then finally throws up the error message: "Cannot connect to the Citrix Presentation Server. There is no Citrix Presentation Server configured on the specified address."

0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24197591
Stuff like this makes me wonder if cloning a XenApp server is worth the hassle.  You _probably_ could have loaded the server from scratch by now.
0
 
LVL 1

Author Comment

by:elorc
ID: 24197613
It looks like all of the services are running...


Picture-1.png
0
 
LVL 37

Expert Comment

by:Carl Webster
ID: 24197662
What about Independent Management Architecture?
0
 
LVL 12

Expert Comment

by:Daniel Borger
ID: 24197683
try to recreate the lhc. net stop imaservice      dsmaint config /recreatelhc   net start imaservice
0
 
LVL 1

Author Comment

by:elorc
ID: 24197707
... Well played, sir. Well played. :)

That service was running, but I restarted it anyway. Logins work now. Hopefully this is the end of all the issues.
0
 
LVL 1

Author Comment

by:elorc
ID: 24215056
So far it seems to be running well. It was a bit of an uglier process than I had hoped it'd be, but it got the job done in the end. It definitely still saved me some time, too.

Thanks again.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenDesktop 7.6 Citrix Policies Graphics
If your vDisk VHD file gets deleted from the image store accidentally or on purpose, you won't be able to remove the vDisk from the PVS console. There is a known workaround that is solid.
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question