title: How do I clone the virtual disk of running VM on Hyper-V 2012
body: <p>I want to clone the virtual disk of a <em>running</em> VM on Hyper-V 2012.  </p>
  
  <p>I know that snapshotting the VM will generate a diff disk (file extension .AVHDX).  All subsequent writes are to this snapshot, and its parent is read only.</p>
  
  <p>However, that parent may also be a snapshot, which means I cannot simply copy the parent.</p>
  
  <p>How do I obtain a single file that contains all the virtual hard drive’s data prior to my snapshot?</p>
  
  <p>Put another way, how do I export the parent of the current snapshot to a single .VHDX file?</p>
  
  <p>Ideally, I would like to know how to do this using the Hyper-V V2 WMI API.</p>