Quantcast
Channel: Virtual Machine Manager – General forum
Viewing all articles
Browse latest Browse all 2770

Setting Storage Classification on Local Storage (e.g. local SSDs.)

$
0
0

Hi all, I'm integrating SCVMM 2012 SP1 on Windows Server 2012 R2 Hyper-V with XenDesktop 7. When defining storage resources in XenDesktop, it can see the 'Local Storage' classification from SCVMM and use that for VM placement.

What this does though, is treat all local disks that have been marked by SCVMM as 'Available for Placement' as that Local Storage. (i.e. in the SCVMM console, view the properties of a Hyper-V host, select 'Available for placement' on specified volumes underHardware and then under Storage view the Storage Classifications on each physical drive.

Instead, I'd like to be able to treat each physical direct attached drive as a separate location for XenDesktop VM placement. To that end, I've been looking at setting a different storage classification for each physical drive I'm targeting. I assume this is the right approach as XenDesktop looks to query SCVMM for the storage classifications to define VM placement.

When attempting to change a storage classification on a physical drive in the host properties in SCVMM, I receive the following error:

---------------------------
Virtual Machine Manager
---------------------------
VMM is unable to process one of the provided parameters for the cmdlet (Set-SCStorageDisk):

Cannot convert 'System.Object[]' to the type 'Microsoft.SystemCenter.VirtualMachineManager.StorageDisk' required by parameter 'StorageDisk'. Specified method is not supported.

Try the operation again. If the issue persists, contact Microsoft Help and Support.

ID: 12416
---------------------------
OK   
---------------------------

Directly running the PowerShell code returns the same error (as you would expect).

$vmHost = Get-SCVMHost -ID "31ddbd43-b14f-42a1-9326-710b45eec45d"
$storageClassification = Get-SCStorageClassification -Name "Local Drive D" -ID "a818fcbb-3346-49c4-837b-df2be834f7f7"
$hostDisk = Get-SCStorageDisk -VMHost $vmHost -Name "\\.\PHYSICALDRIVE0"
Set-SCStorageDisk -StorageDisk $hostDisk -StorageClassification $storageClassification -JobGroup "40edcf09-239e-496e-8dce-84b5eec02bb3" -Verbose
Set-SCVMHost -VMHost $vmHost -JobGroup "40edcf09-239e-496e-8dce-84b5eec02bb3" -RunAsynchronously -VMPaths "C:\ProgramData\Microsoft\Windows\Hyper-V|D:\" -BaseDiskPaths ""

Interestingly, if I change $hostDisk to $hostDisk[0], the Set-SCStorageDisk line runs and produces no error, but this does not actually achieve the desired effect.

Can anyone offer some thoughts or reasons why I would be seeing this? Or am I going about this the wrong way (and thus failing).



Please remember to click "Mark as Answer" or "Vote as Helpful" on the post that answers your question (or click "Unmark as Answer" if a marked post does not actually answer your question). This can be beneficial to other community members reading the thread.


This forum post is my own opinion and does not necessarily reflect the opinion or view of my employer, Microsoft, its employees, or other MVPs.

Twitter: @stealthpuppy | Blog: stealthpuppy.com | The Definitive Guide to Delivering Microsoft Office with App-V




Viewing all articles
Browse latest Browse all 2770

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>