If Repair-VHD succeeds but the VM fails to boot or files are missing inside the VM:
Execute chkdsk X: /f (replacing X with your drive letter) to fix file system errors. 2. The Compaction Workaround repair-vhd
To use these commands, you must run PowerShell as an Administrator. If Repair-VHD succeeds but the VM fails to