RDS 2012 - Virtual desktop collection with powershell and custom answerfile fails on VDI deployment


hi guys,

i try deploy new virtual desktop collection win8 vdi's (pooled/managed) based on custom answer file. needs automated working server manager not option, that's why answer file needed.

the lab environment based on windows server 2012 , win8 enterprise only. functional level etc. off course windows server 2012.

i use following command:

new-rdvirtualdesktopcollection ` -collectionname "pooled managed win8" ` -description "this collection contains pooled , managed win 8 vdi machines." ` -ou "vdi" ` -connectionbroker "rdscb01.lab.local" ` -pooledmanaged ` -customsysprepunattendfilepath "\\hyper02\_unattend\oobe-only.xml" ` -virtualdesktopallocation @{"hyper02.lab.local"=3} ` -virtualdesktopnameprefix "pooled-win8-" ` -usergroups "lab.local\domain users" ` -maxuserprofiledisksizegb 1 ` -virtualdesktoptemplatehostserver "hyper02.lab.local" ` -virtualdesktoptemplatename “_win8-template” ` -userprofilediskpath "\\hyper02.lab.local\_userprofiledisks" ` -storagetype localstorage ` -localstoragepath "e:\_vdi" ` -force ` -debug  $error[0]|format-list -force


i tried multiple answer files, simple 1 fails:

<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend">     <settings pass="oobesystem">         <component name="microsoft-windows-international-core" processorarchitecture="amd64" publickeytoken="31bf3856ad364e35" language="neutral" versionscope="nonsxs" xmlns:wcm="http://schemas.microsoft.com/wmiconfig/2002/state" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">             <inputlocale>en-us</inputlocale>             <systemlocale>en-us</systemlocale>             <uilanguage>en-us</uilanguage>             <uilanguagefallback>en-us</uilanguagefallback>             <userlocale>nl-nl</userlocale>         </component>         <component name="microsoft-windows-shell-setup" processorarchitecture="amd64" publickeytoken="31bf3856ad364e35" language="neutral" versionscope="nonsxs" xmlns:wcm="http://schemas.microsoft.com/wmiconfig/2002/state" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance">             <useraccounts>                 <administratorpassword>                     <value>uabhahmacwb3ag8acgbkaceaqqbkag0aaqbuagkacwb0ahiayqb0ag8acgbqageacwbzahcabwbyagqa</value>                     <plaintext>false</plaintext>                 </administratorpassword>                 <localaccounts>                     <localaccount wcm:action="add">                         <password>                             <value>uabhahmacwb3ag8acgbkaceauabhahmacwb3ag8acgbkaa==</value>                             <plaintext>false</plaintext>                         </password>                         <description>admin</description>                         <displayname>admin</displayname>                         <group>administrators</group>                         <name>admin</name>                     </localaccount>                 </localaccounts>             </useraccounts>             <oobe>                 <hideeulapage>true</hideeulapage>                 <hidelocalaccountscreen>true</hidelocalaccountscreen>                 <hideoemregistrationscreen>true</hideoemregistrationscreen>                 <hideonlineaccountscreens>true</hideonlineaccountscreens>                 <hidewirelesssetupinoobe>true</hidewirelesssetupinoobe>                 <networklocation>work</networklocation>                 <protectyourpc>3</protectyourpc>                 <skipmachineoobe>true</skipmachineoobe>                 <skipuseroobe>true</skipuseroobe>             </oobe>         </component>     </settings>     <cpi:offlineimage cpi:source="wim:d:/=%20software/iso&apos;s/lic/en_windows_8_enterprise_x64_dvd_917522/sources/install.wim#windows 8 enterprise" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> </unattend>

everything goes fine, until comes deployment of vdi machines , answer file is called. fails following error:

ps n:\> \\dc01\isos\new-virtualdesktopcollection.ps1 unable retrieve details of virtual desktop collection.     + categoryinfo          : writeerror: (:) [start-rdvmrollout], rdmanagementexception     + fullyqualifiederrorid : startrdvirtualmachinerollout,microsoft.remotedesktopservices.management.cmdlets.startrdvirtualmachinero     lloutcommand     + pscomputername        : localhost    collectionname    type              size       percentinuse    --------------    ----              ----       ------------    pooled managed... pooledmanaged     0          0                   writeerrorstream      : true origininfo            : localhost exception             : system.management.automation.remoteexception: unable retrieve details of virtual desktop                          collection. targetobject          :  categoryinfo          : writeerror: (:) [start-rdvmrollout], rdmanagementexception fullyqualifiederrorid : startrdvirtualmachinerollout,microsoft.remotedesktopservices.management.cmdlets.startrdvirtualmachinerolloutco                         mmand errordetails          :  invocationinfo        :  scriptstacktrace      :  pipelineiterationinfo : {} psmessagedetails      : 

without answer file parameter runs perfectly, vdi machines oobe.... that's not want off course....

this link (http://support.microsoft.com/kb/2747656?wa=wsignin1.0) , other sources tell me when set regkeys can find log in c:\windows\logs, there nothing. looked on management server , connection broker.

the thing find in event viewer this:

the xml input specified vm provisioning job not in valid format. error: 0xc00cee03 input xml:

<?xml version="1.0"?> <rdvp:rdvprovisioning xmlns:rdvp="http://www.microsoft.com/rdv/2010/05/"> <rdvp:provisionpoolrequest><rdvp:job> <rdvp:action>create</rdvp:action> <rdvp:onerror>stop</rdvp:onerror></rdvp:job> <rdvp:pool><rdvp:name>pooled_managed_w</rdvp:name> <rdvp:type></rdvp:type> <rdvp:vhdtype>diffdisk</rdvp:vhdtype> <rdvp:savedelay></rdvp:savedelay> <rdvp:version></rdvp:version> <rdvp:mark_ha>no</rdvp:mark_ha></rdvp:pool> <rdvp:vm> <rdvp:basevmlocation>\\rdscb01\rdvirtualdesktoptemplate\pooled_managed_w\imgs\__3</rdvp:basevmlocation> <rdvp:localvmcreationpath>e:\_vdi</rdvp:localvmcreationpath> <rdvp:localgoldcachepath></rdvp:localgoldcachepath> <rdvp:smbshare></rdvp:smbshare> <rdvp:enablevmstreaming>0</rdvp:enablevmstreaming> <rdvp:runvmsfromsmb>0</rdvp:runvmsfromsmb> <rdvp:namingprefix>pooled-win8</rdvp:namingprefix> <rdvp:namingstartindex>1</rdvp:namingstartindex> <rdvp:domain>lab.local</rdvp:domain> <rdvp:ou>ou=vdi,ou=computers,ou=kamer 2101,dc=lab,dc=local</rdvp:ou> <rdvp:productkey></rdvp:productkey> <rdvp:unattendxml> <![cdata[<?xml version="1.0" encoding="utf-8"?> <unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="oobesystem"> <component name="microsoft-windows-shell-setup" processorarchitecture="amd64" publickeytoken="31bf3856ad364e35" language="neutral" versionscope="nonsxs" xmlns:wcm="http://schemas.microsoft.com/wmiconfig/2002/state" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <oobe> <hideeulapage>true</hideeulapage> <hidelocalaccountscreen>true</hidelocalaccountscreen> <hideoemregistrationscreen>true</hideoemregistrationscreen> <hideonlineaccountscreens>true</hideonlineaccountscreens> <hidewirelesssetupinoobe>true</hidewirelesssetupinoobe> <networklocation>work</networklocation> <protectyourpc>3</protectyourpc> <skipmachineoobe>true</skipmachineoobe> <skipuseroobe>true</skipuseroobe> </oobe> </component> </settings> </unattend>]]> </rdvp:unattendxml> </rdvp:vm> <rdvp:hypervhosts> <rdvp:hypervhost> <rdvp:name>hyper02.lab.local</rdvp:name> <rdvp:numbervms>3</rdvp:numbervms> </rdvp:hypervhost> </rdvp:hypervhosts> </rdvp:provisionpoolrequest> </rdvp:rdvprovisioning>

----------------------------------------------------------------------

log name: microsoft-windows-terminalservices-sessionbroker/admin
source: terminalservices-sessionbroker
eventid: 1549
level: error
user: network service
task category: ms vm provisioning plugin
computer: rdscb01.lab.local

i hope can working, in advance everybody!

regards,

bart




hi all,

i found solution!

it's first line in answer file:

<?xml version="1.0" encoding="utf-8"?>

remove line unattend .xml file , creation of collection , vdi deployment run perfectly!

so unattend file start with:

<unattend xmlns="urn:schemas-microsoft-com:unattend">

etc...

i find bug, because windows system image manager places line automatically. and every time you edit file wism line getting reinserted! aware of that!


bart scheltinga | bartsp34ks.nl



Windows Server  >  Remote Desktop Services (Terminal Services)



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file