Monday, April 2, 2012

Expanded Guide for Windows 8 on VMware View

Last week I started trying to get a Vmware View Pool working for Demoing Windows 8 for users. At my boss's request because we could show what we can do with View and also preventing people from digging up old PCs and laptops to install it on.


I quickly found the post made by Andre Leibovici at http://myvirtualcloud.net/?p=2991 on the steps to creating a VMware Pool of Windows 8 VMs. Great blog by the way. This post was exactly what I was looking for but I ran into a few problems like others in the comments of his blog that I wanted to try and answer if possible.


Normally we can we can install windows and then the VMware Tools followed by the VMware View Agent. Then create a pool selecting that VM to be replicated/cloned. However currently after looking at the logs I believe there is a issue with the VMware View Agent communication with the View Server which shows up as "Waiting for agent".


Waiting for Agent Problem

Before I had started to follow Leibovici's post I tried to create a Windows 8 VMware Automated Pool like I normally would. This is where one of my problems came up. I created the Windows 8 VM, Installed the VMware tools, then Agent and tried to create a Pool. I cloned my windows 8 VM to 5 VMs , customized them and started them. Then started "Waiting for agent". For anyone that has tried this might know this is as far as the VM ever gets. You can see the errors by checking out the logs on both the client and server.

View Agent Log Events Path: C:\ProgramData\VMware\VDM
View Server Log Events Path: C:\ ProgramData\VMware\VDM\logs


At this time I know of no solution for this issue. These VM's do exist in the ADAM Database under the Servers OU but changing the pae-OSVersion has no effect. You'll find the following links talking about it it but none of which provided a solution as of yet.




While I had no luck finding a solution for this I believe its why Leibovici guide has your create a manual pool and connect the Windows 8 vm's as "Other Sources" in order to get around this problem.

Other Sources

If your like me you may never use this feature of View. If so you let me show you it should look like. From inside the VMware View Admin web site expand View Configuration and select Registered Desktop Sources. You'll notice that i have a Zero here because in this screen shot I have not yet successively connected a machine as a Other Source.



This shows you two types of sources Terminal Services Sources and Other Sources. Other Sources is what were interested in. Other Sources are normally Physical machines with the VMware View Agent Installed so that View Offer these machines in a Manual Pool. Because following Leibovici's post we want our Windows 8 VM to show up under Other Sources.


I then tried to fix my already created Windows 8 VMs that i had cloned. I uninstalled the View Agent, Rebooted the VM, and reinstalled the View Agent. Making sure to not install the View Persona Management.







 Next specify the View Server it should connect to and the username and password if necessary.
Because my VM had already been registered to the View before it also throws an error that the View Agent was already registered and do you want to update the previous registration. Select OK.



After the Install finishes reboot the VM. If you check the ADAM instance (How to Connect to the View ADAM Database) you'll find that the VM has a object under the Servers OU. (How to Search VMware View ADAM Instance). Next following Leibovici's post we change the objects pae-OSVersion to 5 and then expect to find the object listed under "Registered Desktop Sources " and then "Other Sources".


No matter what I never got the machine to appear under "Other Sources". Reading other peoples posts on the View Forums and comments on Leibovici's post people reported installing over and over until it finally worked. Call me crazy but there has to be a cause, something changed for it to work that one time, some state was different, if we can find that we can fix it for everyone.


To be clear I believe my root problem is that Windows 8 VM is not showing up under "Other Sources" when I install the view agent. 


Looking at my notes I know that I had already installed the View agent on the Windows 8 VM when i installed the Vmware tools. That was even before I took a snapshot of it. Thats normal for a VM I'm going to be using for View but I'm not using this VM in a normal method so maybe it matters. I also added these VM's to a View Automated pool before trying to add them to a manual pool. So view already knows they exist. Its why when I reinstall the View agent it gives the error about the machine having previous registration. 


To test I'm going to try frist to see if a none VM will correctly show up in Other Sources. Then if it does work on getting a fresh install of Windows 8  with a different hostname and see if i can view it in "Other Sources". If that is visable I'm going to see if I can find the difference between it and a machine had once already had the view agent in an automated pool on it.


Test - Phyical Machine as "Other Sources"

Use any machine around and install the  View  agent; one note is that the machine can not already have the View client installed or you can not install View agent. This worked with out any issue. Here is a picture of how a machine should appear in "Other Sources". 

Since my View environment does work with "Other Sources" I'm going to go on and test creating a new Windows 8 VM.

Test - Fresh Windows 8 Install

To remove as many variables as possible i start by creating a new VM called Win8Preview, I install Windows 8 again and install nothing else, not VMware Tools and not VMware View Agent. I snapshot and then clone it to a VM named Win8Preview01. The names doesn't really matter but I'm listing them to be clear as to what machine I'm talking about. When I created  Win8Preview01 I didn't use a customization and renamed the OS manually. This is simply being cautious, later we'll try again with customization if this works. The reason I'm working with the clone because while I could undo any client changes with the snapshot the View Server would already have entries related to that VM. 

On Win8Preview01 install the View Agent, I'm using agent version VMware-viewagent-x86_64-5.0.1-640055. Making sure to not install the View Persona Management. Following that reboot. on the VM I check that the service "VMware View Agent" is started and running. It is so I connect to the View ADAM Searching the VM to see that it has an entry in the ADAM instance. 



I search query look like the following by dropping the entries that belong to pools I know. 


(&(objectClass=pae-VM*)(!pae-displayname=nku*)(!pae-displayname=view*)(!pae-displayname=help*))


There is no entree for Win8Preview01 in the Servers OU in the ADAM Database. But I notice that there isn't one for the physical machine either which did show up under "Other Sources".  I check the "Other Sources" web page and its not listed there, only the Physical machine from the earlier test?


So where does View Store the Information of where the View Other Sources are? I create a manual pool and add that machine to it. I then research the ADAM Instance with the same query as before.  Its not found. So where is it?


Cause and Solution

One thing I didn't say about my environment is that I have two view servers, confused and for the sake of it I check the other ADAM instance on the other server. Now know that this entire time I've been telling the View Agents to connect to the View Master Server and it shouldn't matter any way as these are replication between that ADAM instances. 


But to my surprise there are Objects in the Server OU that don't exist on the other ADAM instance. These New "pae-PM" objects are exactly what we were missing!!!!!!




So for some reason, either by error on my systems or VMware Views the "pae-PM" objects only exist in the replica database. Following note that the my previous search result also wouldn't of found this object. Instead use somthing like the following.


(&(objectClass=pae-PM)(pae-OSVersion=0))


Following Leibovici's post I change the objects pae-OSVersion to 5 on Win8Preview01 and one of the VMs that were once part of the automatic pool.  I check the "Registered Desktop Sources\Other Sources" web page and its finally listing the Windows 8 VMs!




Finally I create a manual pool in VMware View, choosing floating desktops,  and then finally for Desktop Source choose Other Sources.


Finally choose the Windows 8 machine from the list for Physical Machines. Finish creating the pool. Add your entitlements, Check that at least one VMin the pool is available and test if it finally it works!



Follow Ups


I also found that by reinstalling the client on the VM's previous bound to the automated pool.  Then would appear in the other ADAM instance as "pae-PM" and also worked once I changed their objects pae-OSVersion to 5.

A follow up for myself will be to see if I have a problem with my environment's View ADAM replication or if this is normal behavior. 


Good luck and let me know if this helps anyone or if you have further questions.

2 comments:

  1. Hi,

    I tried to method you mentioned. I can add everything and all as 'other'. However, when trying to connect to it, i got a 'This desktop has no desktop sources available.' error... :(

    ReplyDelete
  2. same here even when i install the agent the screen goes back and you cant gent screen to normal until you boot into safe mode and set the desktop video driver back to a older version. when you install agent 5.1 or 5.1.1 this is not an issue only when installing agent 5.0 ore 5.0.1

    ReplyDelete

Please leave a comment; someone, anyone!