Hello Rozario, Peter,
Welcome to the Microsoft Q&A and thank you for posting your questions here.
I understand that you need best practice to create a VM on Azure local HCI Cluster.
Follow the below steps for best practice:
- Registered cluster and in-policy using Powershell:
Get-AzureStackHCI | Format-Table Name, RegistrationStatus, inPolicyIfRegistrationStatus≠Registered, callRegister-AzureStackHCIor re-sync within 30 days. - Create a custom Storage Path BEFORE creating VMs using bash command:
This ensures each VM gets isolated storage - https://learn.microsoft.com/en-us/cli/azure/stack-hci-vm/storagepath?view=azure-cli-latestaz stack-hci-vm storagepath create \ --resource-group RG_NAME \ --custom-location "/subscriptions/.../customLocations/MocLocation" \ --name "TESTVM" \ --path "D:\SHARE\TESTVM" - Then, validate Storage Path and capacity using bash command:
az stack-hci-vm storagepath listandGet-ClusterNode | Get-StoragePool | Get-PhysicalDisk | Measure-Object Size -SumTo ensures the new path is available and CSVs have sufficient free space.- https://learn.microsoft.com/en-us/cli/azure/stack-hci-vm and https://learn.microsoft.com/en-us/windows-server/storage/storage-spaces/create-volumes?view=azloc-24081 gives you more details. - Modify VM creation to use new path by using PowerShell:
Or configure via Windows Admin Center and select your custom storage path as it's more details here - https://docs.azure.cn/en-us/azure-local/manage/vmNew-VM -ComputerName HCIHost01 ` -Name TESTVM ` -Path "D:\SHARE\TESTVM" ` -VHDPath "D:\SHARE\TESTVM\TESTVM.vhdx" ` -MemoryStartupBytes 4GB ... - Restart MOC-operator / NodeAgent to reconcile containers by using PowerShell:
Restart-Service -Name "MocNodeAgent" -Forceand validate error rectified:az stack-hci-vm list az stack-hci-vm storagepath list - Finally, monitor and scale at will by:
- Keeping CSV space ≥ anticipated VM data
- Use thin provisioning or ReFS parity - https://learn.microsoft.com/en-us/windows-server/storage/storage-spaces/create-volumes?view=azloc-24081
- Extend CSV via WAC or PowerShell:
Optimize-ClusterStoragePool -FriendlyName Pool1 -UseLargeStripe Resize-ClusterPhysicalDisk
I hope this is helpful! Do not hesitate to let me know if you have any other questions or clarifications.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful.