I know my question is not exactly related to powershell issue, but I appreciate any help if possible…
Our script creates disk from Microsoft VMM virtual machine snapshot which is used by the deployment team to create virtual machines. The disk created by export-VMsnapshot command sets the dirty bit on the disk. When a new virtual machine is created from that disk it boots to trigger check disks.
Yeah, unfortunately that’s something “inside” that command, not PowerShell per se. You’d probably need to contact MS support if you feel this is a bug condition.
You could probably post this query at
Not an answer but it’s most likely down to how the snapshot is created and what the tool do with the snapshot afterwards.
E.g. if the tool creates a VSS snapshot and then make the snapshot write-able, then when creating a new drive from that snapshot, it will be seen as a “crash” state version of the drive.
To add to my question this issue is with only one virtual machine whereas other machine whose snapshot is used are working fine with same process.
Then I would start checking if the snapshot fails/logs errors for that virtual machine for some reason.
A quick test would be to shutdown the vm, take snapshot, then create a new VM from that snapshot.
Yes, I have already tried this option of creating a new VM from snapshot but in vain. This VM was clean but as our SCO workflow runs a export-vmsnapshot on another checkpoint from this machine the output vhdx we again got was also with dirty bit set.
I observed situation which matches to what you mentioned in your previous post ‘it will be seen as a “crash” state version of the drive’.
On the new VM which I create using the vhdx , if I skip chkdsk it loads OS and shows ‘unexpected shutdown’ box to me…
Yes, then that is the reason why you get a dirty disk since it apparently is in a crash state rather than a graceful state.
In Windows Server 2016 they introduced “Production” checkpoints which basically leverages VSS in the VM to make sure it’s in a application consistent state when doing the checkpoints.
You can read more about it here: