How to add storage to Azure lab plan?

vitaly simonovich 30 Reputation points
2024-02-25T11:29:00.91+00:00

Hi,

I'm creating a research lab using the Azure Lab Plan service and I created a new lab Windows 11 Pro, version 21H2 (Gen2) Large (Nested virtualization)|8 cores | 32GB RAM | 128GB Premium SSD.

To create multiple VMs inside, I need more storage; how can I add them?

Azure Lab Services
Azure Lab Services
An Azure service that is used to set up labs for classrooms, trials, development and testing, and other scenarios.
297 questions
{count} vote

1 answer

Sort by: Most helpful
  1. kobulloc-MSFT 26,351 Reputation points Microsoft Employee
    2024-02-26T19:14:40.44+00:00

    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:

    https://techcommunity.microsoft.com/t5/azure-lab-services-blog/nested-virtualization-tips/ba-p/1534323

    1. 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.  
    2. 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. 
    3. 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! User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.