Citrix XenDesktop 7 – Create Persistent Hypervisor Connection and Hosting Unit, Unattended 13 Comments

I blogged about how to automate Citrix XenDesktop 7 deployment and database creation, and how to join and existing XenDesktop 7 site unattended, but now to continue and go a bit further in the automation process, I needed and wanted to know how to automate Hosting Configuration by Adding Connection and Resources to the DDC in an unattended way. This blog will cover creation process for XenServer 6.x and vCenter (vSphere) 5.1 since I don't have access to a Hyper-V (yet), I went over Citrix eDoc to check how I could do this and I found here : [link] Thanks to Livio for some PowerShell help :) It helps to understand whet need to be setup and after few tests I ended up writing this script to automate this part :   This script have been tested with Citrix XenDesktop7 and XenServer 6.2 and vSphere 5.1

[Actually it doesn't work with Windows 7 RC1 build 7100 - You need to check commentaries to find out, or in here : http://www.archy.net/2009/05/14/vmware-workstation-nat-problem-on-windows-7-rc-build-7100/ ] Vmware workstation 6.5.1 build-126130 can be installed on Microsoft Windows 7 beta without any problem. I was able to open all my VM but I had an issue with the network nat translation. All my VM didn't had internet access through the host nat (Windows 7) I searched a bit on internet and found several person who had the same issue and here come the work around : 1. Run the Virtual Network Editor as Administrator (Use RunAS or right click and Run as Administrator on vmnetcfg.exe) 2. Goto Host Virtual Adapters and remove all VMNet instances (VMNet1 and VMNet8 typically). 3. Click Apply. 4. Add New and Assign it the new adapter to VMnet1. 5. Click Apply. 6. Select the Host Virtual Networking tab. 7. Click the > next to VMnet1 and change the address and subnet to the ICS network (192.168.0.0 / 255.255.255.0) 8. Click Apply. 9. Go to the NAT tab and select VMNet1. 10. Click Edit and change the Gateway to the ICS gateway IP (192.168.0.1) 11. Click Apply and restart the NAT service. (Counter-intuitive, I know.) 12. Go to the DHCP tab. 13. Add VMNet1 and remove all others. 14. Click Apply. 15. Select Properties of VMNet1 in DHCP Tab. 16. Enter a Start and End Address for DHCP Scope (192.168.0.50 to 192.168.0.75 as an example) 17. Adjust client lease to a few days to avoid potential DHCP client renewal timeouts. 18. Click OK / Click Apply. 19. Select Host Only Networking for every VM that needs NAT out to your host network/internet. 20. Enable ICS (Internet Connection Sharing) on the W7 Host network card that provides connectivity. Select VMNet1 as the network card that needs access. It did the trick with my VM Windows XP SP3 and I have to try with the other I have. Link : http://blog.tiensivu.com/aaron/archives/1818-How-to-get-VMWare-Workstation-6.5-Guest-VM-NAT-working-with-a-Windows-7-Build-7000-host.html Edit : I add some screenshots, this is the way it works for my Windows 7 computer (192.168.0.0/24) add for John :