Hyper-V Virtual Disk Operations: Compact, Convert, Kiterjed, and Shrink – How to Guide and Tips.
Compact
1. Run your Hyper-V Manager és kattintson rá Edit Disk;
2. Kattintson Következő;
3. Kattintson Tallózás to select your disk for operations;
4. After Disk is selected click Következő;
5. First option is Compact (this is the simplest operation). Kattintson Következő;
6. At the next page click Következő;
Convert
1. Option Convert (change your Virtual Disk format, *.vhd or *.vhdx). Kattintson Következő;
2. Select the format and click Következő;
3. Select the type of Virtual Disk.
JEGYZET: In enterprise is Best Practice – to use a Virtual Disk type Fixed size.
4. Make a choice and click Következő;
5. Kattintson Tallózás to select the final name and destination of Virtual Disk, és kattintson Save;
7. If it’s ok – click Következő;
8. Kattintson Befejez to run this operation;
Kiterjed
1. Run Hyper-V Manager and click on Inspect Disk and select target Virtual Disk to show information about it. Kattints a Bezárás gomb;
2. We have 60 GB VHDX, Expand it. Click on Edit Disk in Hyper-V Manager; Kattints a Következő gomb;
3. Kattintson the Browse button and select target Virtual Disk;
4. After selecting click the Következő gomb;
5. Válassza ki Kiterjed option and click the Következő gomb;
6. Enter the new size and click the Next button, I’m set to 80 GB. (You must have free space to do this);
7. Check the final information and click the Befejez gomb;
8. Let’s Inspect Disk again. As we see – it now 80 GB size.
9. Connect to VM, which Virtual Disk we Kiterjed. Login in (user must have Local Administrator Rights) and open This PC;
10. As we see it’s 60 GB (old size) but not 80 GB. Bezárás This PC. Jobb egérgomb kattintson a kezdet button and select Disk Management;
11. After the Disk Management console opens you will see Unallocated space on the Disk (20 GB);
12. Jobb egérgomb click on Disk “(C:)” and select Extend Volume;
13. Kattints a Következő gomb;
14. It shows up space for extending. Kattints a Következő gomb;
15. Kattintson Befejez to apply changes;
16. As we see – The disk is extended to 80 GB, close the Disk Management konzol;
17. Nyisd ki "This PC again. Hooray “Local Disk (C:)” now has an 80 GB size.
Shrink
1. Run Hyper-V Manager and make sure your Virtuális gép (VM) with target “Virtual Disk is in an Off state. Close Hyper-V Manager;
2. Nyisd ki Disk Management on the Hyper-V computer (local pc). Jobb egérgomb kattintson a kezdet button and select Disk Management;
3. After the Disk Management console opens, go to the upper menu. Kattintson Akció and then Attach VHD;
4. Kattintson Tallózás to select the target Virtual Disk fájlt;
5. After selecting click the rendben gomb;
6. We connected Virtual Disk;
7. Jobb egérgomb click on the connected Disk and select Shrink Volume;
8. Enter the size in MB (Megabytes) to shrink from Disk. Kattints a Shrink gomb;
9. Tökéletes, shrinking is successful;
10. Jobb egérgomb kattintson a sajátjára Virtual Disk és válassza ki Detach VHD;
11. Kattintson rendben and close the Disk Management konzol;
12. Run your Hyper-V Manager and click on Edit Disk;
13. Kattints a Következő gomb;
14. Kattints a Tallózás button to select target Virtual Disk;
15. After selecting Disk click the Következő gomb;
16. As you see we get a new option Shrink, select it and click the Következő gomb;
JEGYZET: Option “Shrink” is available if “Virtual Disk” has “Unallocated” space.
17. Enter the new size and click the Befejez gomb;
18. Inspect our Virtual Disk again, now it’s 41 GB;
19. In the system;