I am working on the base image now. My next step is to run sysprep. I am wondering why the instructions don’t mention anything about shrinking or compacting the VHDX file so it takes less space. Isn’t that a common practice when creating base images?
Interesting question . Â I don’t really understand why you need to shrink so much .. the key is get reasonalbe performance from your SharePoint VMs. Â The VHDX will grow as needed . Â since the parent is going or should be set readonly, all your growth will be in the child disk inc the page file.Â
I am building a parent-child(differing disk) setup. I think something must have been wrong with my first attempt with shrinking the disk, because today after going through the guest and shrinking the volume down to 12 gig it actually reflected that in the host. For some reason when I tried to shrink it the first time it was showing up as 60 gig on the host machine. What about the page file? Should I dump that on the base disk, shrink again and then sysprep? I see it is using 600MB right now.
To be honest I don’t think you would bother since VHDX are dynamic so use the space as required up to the max allocation.  If you are concerned about space you could look at setting up a diff disks that extend a master disk .  Your master disk has your O/S , service packs and some common utilities. The diff disks simply reference this  without duplicating the space taken up by the master disk.  You can even do the creation with PowerShell commands.Â