Jump to content
Welcome to our new Citrix community!
  • 0

Citrix Hypervisor Powershell SDK 8.2 for New-XenPVSCacheStorage fails


Ravi Anamaneni1709162046

Question

I am able to create PVS Accelerator Site, MemorySR, but unable to create PVSCacheStorage to get allotted in side PVS Accelerator Site - please help me out. One thing I noticed is that the each time in loop, XENSR is picking up previously created 'tmpfs' as well:

 

# Create PVS Accelerator Cache" https://support.citrix.com/article/CTX220735
 $NewPVSSite = Invoke-XenPVSSite -Name Test1 -XenAction Introduce -NameLabel Test1PVS
 $PVSSite = (Get-XenPVSSite).opaque_ref
 $PVSSite
 Start-Sleep -Seconds 20
 Get-XenHost | % { 
 $HName = $_.opaque_ref
 $HName2 = $_.name_label
 $MemSR = New-XenSR -PassThru -XenHost $HName -DeviceConfig @{uri=""} -PhysicalSize 8589934592 -NameLabel MemorySR -Type tmpfs
 $MemSRy = (Get-XenSR | ? { $_.type -eq "tmpfs" }).uuid
 $HName2
 $MemSRy
 New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site $PVSSite -Size 8589934592
 Start-Sleep -Seconds 20
  } 

 

Below errors shows up:

 

OpaqueRef:6aef75b7-8f3f-4290-8133-c23768523901
XenTest1
1406cfd4-4afc-f894-6370-75c57082f57b
New-XenPVSCacheStorage : Object has been deleted.SR:1406cfd4-4afc-f894-6370-75c57082f57b
At 01.ps1:249 char:2
+  New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site  ...
+  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-XenPVSCacheStorage], Failure
    + FullyQualifiedErrorId : XenAPI.Failure,Citrix.XenServer.Commands.NewXenPVSCacheStorageCommand
 
XenTest2
cee6fad4-68f1-86ae-214a-5137495cd4aa
1406cfd4-4afc-f894-6370-75c57082f57b
New-XenPVSCacheStorage : Cannot convert 'System.Object[]' to the type 'XenAPI.XenRef`1[XenAPI.SR]' required by parameter 'SR'. Specified method is not 
supported.
At 01.ps1:249 char:56
+ ... New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site $ ...
+                                                           ~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-XenPVSCacheStorage], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Citrix.XenServer.Commands.NewXenPVSCacheStorageCommand
 
XenTest3
c9b05bbd-6603-ff00-fbb7-0bd1aaa5c0c2
cee6fad4-68f1-86ae-214a-5137495cd4aa
1406cfd4-4afc-f894-6370-75c57082f57b
New-XenPVSCacheStorage : Cannot convert 'System.Object[]' to the type 'XenAPI.XenRef`1[XenAPI.SR]' required by parameter 'SR'. Specified method is not 
supported.
At 01.ps1:249 char:56
+ ... New-XenPVSCacheStorage -PassThru -XenHost $HName2 -SR $MemSRy -Site $ ...
+                                                           ~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [New-XenPVSCacheStorage], ParameterBindingException
    + FullyQualifiedErrorId : CannotConvertArgument,Citrix.XenServer.Commands.NewXenPVSCacheStorageCommand

 

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...