One of the common issue in Hyper-V vm is that the whole virtual disk becomes full. What will you do in that case, add another larger disk and copy or restore from original disk? There's much faster and easier method - expand virtual hard disk drive directly. To do this, there are two ways. Each way has its advantage and disadvantage. This article introduces detailed steps to expand vm hard disk drive in Hyper-V.
Way 1 - expand vm hard disk in Hyper-V su PowerShell komanda
Išplečiant vm standųjį diską su PowerShell is the fastest and easiest way, however, before expanding you should shut down Hyper-V virtual machine and delete the Checkpoints associated with disk that you want to expand.
How to expand hard disk for Hyper-V virtual machine with PowerShell:
- Atviras PowerShell with Administrator privilege from Quick Launch bar or Start menu.
- Tipas Resize-VHD -Path 'E:\yourown.vhdx' -SizeBytes 200gb
Pastaba:
- E: \ jūsų nuosavybė.vhdx reiškia absoliučią kelią ir virtualiojo disko pavadinimą su kabutėmis.
- 200 GB reiškia vm standžiojo disko išplėtimą iki 200 GB, o ne pridedant 200 GB.
Way 2 - expand vm hard drive online with Hyper-V Vadovas
Su Hyper-V Manager, you can expand vm hard drive dynamically without shunting down the guest virtual machine. However, it requires much more steps, in addition, you'd better also delete the Checkpoints with associated virtual disk(s).
How to expand vm hard disk drive with Hyper-V Vadybininkas:
Žingsnis 1: Atviras Hyper-V Valdytojas, kairiajame skydelyje spustelėkite pagrindinį kompiuterį, tada spustelėkite Redaguoti diską in Veiksmai skydelis dešinėje.
Žingsnis 3: Spauskite Naršyti viršuje, kad surastumėte savo VHD / VHDX virtualų disko failą, tada spustelėkite Sekantis.
In a short while, original virtual hard disk will be extended and additional disk space will be shown as unallocated at the end.
Jei laikysitės Windows Disko valdymas arba NIUBI Partition Editor running while expanding virtual disk, you need to click "Refresh" button to load latest disk partition parameters. In some Windows versijų, turite iš naujo atidaryti disko tvarkymą.
Kaip išplėsti virtualųjį skaidinį išplečiant standųjį diską
After expanding vm hard drive, you need to add the additional unallocated space to system partition C and/or other volumes. To accomplish this task, NIUBI Partition Editor yra labai lengva ir greita, tereikia nuvilkti į disko žemėlapį.
parsisiųsti NIUBI Partition Editor ir atlikite vaizdo įraše nurodytus veiksmus:
Pastaba: if there's another partition such as D: in the middle, to extend system C drive, you need to move unallocated space behind it first.
To do this, right click drive D: and select "Keisti dydį / perkelti garsumą", drag the middle of this partition towards right in the pop-up window. If you want to extend the contiguous partition with unallocated space, you can combine directly without moving. (Drag right border towards right in the pop-up window.)