Hello, @vitaly simonovich !How do I add storage to my Azure Lab Plan VM?
Azure Lab Services doesn't support VM image sizes that are larger than 127 GB, or images with multiple disks. While you can add external file storage to a lab, this is definitely not recommended for .vhdx files (which either won't work or will suffer dramatic performance loss).
There are, however, some things that you can do to help meet your lab requirements:
- Consider which Hyper-V VMs are needed for the class, not the department. There is sometimes a tendency to want to create one template for all classes in a department. Taking the time to consider what is needed for only a specific class can save money by allowing for a smaller template machine size to be used. Save the image for reuse in the future.
- Use VHDX for virtual disks. The OS disk size for Lab Services VMs depends on the selected image and for most of the images its 128 GB. The size of a VHD disk for a Hyper-V VM matches the maximum size you want that virtual disk to be. The VHDX format allows for the actual size of the file to be reduced and to later be increased up to the maximum disk size. Using the VHDX file format for your virtual disk could potentially allow for more Hyper-V VMs on a lab template machine. This is dependent on the number and size of files stored on each virtual disk, though. The ability to shrink virtual disks only works with the VHDX file format. If you have an existing VHD file, use the Convert-VHD PowerShell cmdlet to convert to a VHD file to VHDX. Use Resize-VHD PowerShell cmdlet to shrink the virtual disk size and store more virtual disks on the template machine.
- Use dynamic memory when creating the Hyper-V virtual machine.
Users can set the minimum and maximum RAM for the Hyper-V virtual machine. This allows other Hyper-V virtual machines or the host machine to use the memory when it is not needed. This can be useful in cases where a Hyper-V VM only needs to be used in bursts rather than continuously.
I hope this has been helpful! Your feedback is important so please take a moment to accept answers.
If you still have questions, please let us know what is needed in the comments so the question can be answered. Thank you for helping to improve Microsoft Q&A!