Citrix Xendesktop5中创建虚拟机失败的2个案例分析

  • Post author:
  • Post category:其他

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 Service:
Amalgamates 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种,只是提供分析和解决思路。
 
 
 

转载于:https://blog.51cto.com/virtuallife/795205

关闭菜单