Mastering Windows Server 2016 Hyper-V

(Romina) #1

file and inspecting the MinimumSize attribute. Note that when working with dynamic
disks, changing the size of the file changes only its maximum size; the actual amount
of space used on disk is based entirely on the data written, which is shown in the
FileSize attribute. If you want to reduce the size of a VHDX file more than the
MinimumSize attribute, you should connect to the virtual machine and shrink the size
of the volumes inside the virtual machine by using Disk Management to increase the
amount of unallocated space.


Figure 4.2 A virtual machine with 20GB of space unallocated


LISTING 4.1: Setting the Size of a VHDX File


PS  E:\ >   Get‐VHD .\win81nondomain.vhdx

ComputerName                        :   SAVDALHV01
Path : E:\Virtuals\win81nondomain\Virtual Hard
Disks\win81nondomain.vhdx
VhdFormat : VHDX
VhdType : Dynamic
FileSize : 11983126528
Size : 85899345920
MinimumSize : 64423477760
LogicalSectorSize : 512
PhysicalSectorSize : 4096
BlockSize : 33554432
ParentPath :
DiskIdentifier : ae420626-f01e-4dfa-a0a5-468ffdfe95ad
FragmentationPercentage : 6
Alignment : 1
Attached : True
DiskNumber :
Key :
IsDeleted : False
Number :
Free download pdf