Citrix Xendesktop5中創建虛擬機失敗的2個案例分析

 Xendesktop5中無法創建虛擬機的2個問題分析

1.       case1
用戶在添加新的桌面的過程中提示:
The catalog has the following errors:
      Failed to create the virtual machine:Domain\Machinename$
 

用戶的桌面模式爲Dedicate模式,發生問題後檢查並確認了網絡,磁盤空間,AD賬戶和用戶權限後均沒有問題。
準備開始收集DDC端日誌,2種方法可以收集:具體參考一下KB:
http://support.citrix.com/article/CTX127492
有必要簡單介紹一下收集日誌的工具CDF Control
a.       下載工具到DDC端並根據系統的情況選擇對應的版本,工具打開後會自動檢測在DDC端運行的相關服務,根據問題的情況選擇對應的module,當然也可以全選,只是日誌看起來比較多.
 

 
簡單介紹下DDC端的幾個常用的服務:
AD Identity Service: 主要負責維護AD賬戶,包括創建、刪除和導入導出AD賬戶等
Machine Identity Service:Maintenance of storage attached to provisioned VMs,Create,delete and update the Identity Disk
Broker ServiceAmalgamates what was previously the IMA Service, XML Relay, SSL Relay, pool management service.NET, if any portion fails the whole Broker service is failed over to another server
Configuration Service:All the services offered by the XenDesktop controllers in a site are registered in a service Directory. This service directory is used by any part of a deployment that needs to locate the available service resources.
Host service:Responsible for creating and managing hypervisor connections and Hosting Units. 
Machine Creation Service:Creates and deletes provisioned VMs in a hypervisor based environment (also supports option to delete AD account or leave as is when deleting VM).
a.       CDFControl可以通過Tools->Options設置日誌類型,保存位置,日誌大小,實時顯示等
b.      選擇對應的Module,Reproduce 問題前點擊 Start Tracing.重新後Stop Tracing
c.       導出並開始分析日誌
拿到日誌後開始分析日誌,因爲其他的catalog並沒有問題,我們找到對應的時間點找關於RDVDI的相關日誌,找到以下內容:
"MachineIdentityServiceLog:1:1:XenRunQueue - caught exception Citrix.ManagedMachineAPI.ManagedMachineException: Failure in CreateClone, UUID_INVALID, VDI, 18fef14e-e900-4992-ab82-9db7e0a6a673 ---> UUID_INVALID - VDI - 18fef14e-e900-4992-ab82-9db7e0a6a67"
這個無效的UUID是哪個VDI的UUID呢,在創建虛擬機中的過程中肯定涉及到的是創建VM的模板,我們通過Powershell命令查看此catalog的信息:
啓動Powershell並通過asnp.citrix*加載命令集(如果通過Desktop studio窗口啓動則不需要加載)
C:\PS> Get-ProvScheme
 

我們到Xenserver上查看此虛擬機的時候創建catalog使用的MasterImage已經被刪除,直接導致無法添加新虛擬機的時候失敗,找到了問題就好辦,爲此catalog更新新的MasterImage,Pool模式的桌面可以直接通過右鍵即可以更新,但是針對Dedicate的桌面去無法通過UI來完成,OK,我們可以通過Powershell command來完成:
C:\PS>Publish-ProvMasterVMImage -ProvisioningSchemeName MyScheme -MasterImageVM XDHyp:\HstingUnits\HostUnit1\RhoneCC_baseXP.vm\base.snapshot
Note:如果此虛擬機有多個snapshot,必須在上面命令中全部按順序加到前面
此時即可爲Catalog”RDVDI”重新添加新的計算機。。。
Case 2
用戶在創建虛擬機的時候提示一下錯誤:
標誌配置已在使用中,請確保執行此操作時,沒有任何用戶在訪問此桌面目錄,如下圖:
 

 
開始的troubleshooting動作大致和case1相同,同樣是僅此catalog異常
同樣開始通過CDFControl收集DDC端相關日誌,找到一下錯誤日誌:
Xendesktop Management Console:1:1: [6] Script AddDumBasedMachinesScript(5945): Error received from command: Set-AcctIdentityPool -IdentityPoolName 'Private PC' -OU 'OU= Private PC,OU=XenDesktop,OU=CITRIX,DC=ctx,DC=test,DC=com,DC=cn' -Domain ctx.test.com.cn' -AllowUnicode -AdminAddress 'jt-ctx-ddc02. ctx.test.com.cn’, Error:
       Name : Set-AcctIdentityPool
       Exception : System.InvalidOperationException: Identity Pool is already locked.
          ? System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
       PositionMessage :
                       + CategoryInfo : InvalidOperation: (:) [Set-AcctIdentityPool], InvalidOperationException
                       + FullyQualifiedErrorId :Citrix.XDPowerShell.ADIdentityStatus.IdentityPoolAlreadyLocked,Citrix.ADIdentity.SDK.Commands.SetAcctIdentityPoolCommand
從以上日誌中能看到很明顯的Exception:Identity pool is already locked
由於客戶的異常操作導致此Identity pool(即catalog)被鎖住,通過Powershell命令解鎖即可:
C:\PS> Unlock-AcctIdentityPool -IdentityPoolName ' Private PC' -AdminAddress 'jt-ctx-ddc02.ctx.test.com.cn'
此時可以添加新的計算機
此時catalog前面的黃色感嘆號仍然存在,可以通過清除Desktop studio裏面的action後重新打開Destop Studio即可..
 
Note:無法創建虛擬機的原因可能很多,以上只是可能的2種,只是提供分析和解決思路。
 
 
 

本文出自 “虛擬人生” 博客,請務必保留此出處http://virtuallife.blog.51cto.com/152152/795205

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章