понедельник, 18 мая 2015 г.

Citrix PVS: device is active so action cannot be done, but no device is active

Hi

Sometimes when you update your vDisk via diskUpdateDevice and then shutdown diskUpdateDevice to promote maintenance version to production, diskUpdateDevice status don't updated correctly and hangs on active status. You cannot delete vDisk maintenance version or delete the whole vDisk, you always get warning message "device is active so action cannot be done".

You can't mark down diskUpdateDevice either because there is no option for mark diskUpdateDevice down. But you can do it via powershell.

Open CMD as Administrator and run command:
"C:\Windows\Microsoft.NET\Framework64\v2.0.50727\InstallUtil.exe" "C:\Program Files\Citrix\Provisioning Services Console\McliPSSnapIn.dll"

1. Open powershell
2. Type: Add-PSSnapin -Name McliPSSnapIn

3. Next connect to PVS if you are not launched power shell console at PVS server:
MCLI-Run setupconnection -p server=pvsservername,port=port

4. To find vDisk with name vD_02 type:
mcli-get disklocator -p disklocatorname="vD_02", storename=store1, sitename=cod

Return:
Executing: Get disklocator
Get succeeded. 1 record(s) returned.
Record #1
diskLocatorId:
diskLocatorName: vD_02
siteId:
siteName: COD
storeId:
storeName: STORE1
description:
menuText:
serverId:
serverName:
enabled: 1
role: 100
mapped: 0
active: 1
rebalanceEnabled: 0
rebalanceTriggerPercent: 25
subnetAffinity: 0
diskUpdateDeviceId: f6579c7d-413-4593-956f-4e02956786ea
diskUpdateDeviceName: XA_02

5. Our update device is "diskUpdateDeviceName: XA_02"

6. Next we need to find this device.
Go to vDisk Update Management - vDisks and find XA_02 in "VM" column.

7. Type:
mcli-get diskupdatedevice -p deviceName=XA_02

8. You will get:
mcli-get diskupdatedevice -p deviceName=XA_02

Executing: Get diskupdatedevice
Get succeeded. 1 record(s) returned.
Record #1
deviceId:
deviceName: XA_02
virtualHostingPoolId:
virtualHostingPoolName: vCenter
diskLocatorId:
diskLocatorName: vD_02
siteId:
siteName: COD
storeId:
storeName: STORE1
description:
deviceMac: 00-67-11-34-77-12
port: 6901
active: 1
adTimestamp:
adSignature:
logLevel: 0
domainName:
domainObjectSID:
domainControllerName:
domainTimeCreated:
ip: 10.
serverPortConnection: 6943
serverIpConnection: 10.
serverId:
serverName: PVS01
diskVersion: 40
status: 9
licenseType: 7
makLicenseActivated: 0
model:
license: 0

We see that device status is active (active: 1) though the device is shutted down.

9. So we need just change the device status.
Type:
mcli-run markdown -p devicename=XA_02
Executing: Run markdown
Run succeeded.

10. Now check status of diskupdatedevice by command:
mcli-get DiskUpdateDevice -p devicename=XA_02
You will see that status has been changed from "active: 1" to "active: 0"

Now you can delete maintenance version or whole vDisk.

Комментариев нет:

Отправить комментарий