Dan Griffin's Blog

Comments on security, PKI, smart cards, cryptography, and entrepreneurship.

I just learned an important step when performing the following sequence: export Hyper-V virtual machines (VMs) from one machine, copy them (recursively) to another machine, and attempt to import them. Namely, you must include empty sub-directories when you copy the full export tree.

Here’s the error you’ll see if you don’t do that:


Failed to import the virtual machine from import directory … Error: the system cannot find the path specified. (0x80070003)

Here’s the command I should have used the first time around:


robocopy.exe z:\Export e:\HV *.* /s /E

But since I didn’t, I used this one to pick up the empty sub-dirs, but exclude all of the files (especially the giant ones) that I’d already copied:


robocopy.exe z:\Export e:\HV *.* /s /XO /E

Import note: if you’ve already attempted a failed import, and didn’t check the box for keeping the same machine ID, then the name of the VM’s .exp file on the local host will have been changed during the failed import (see the “Virtual Machines” subdir of the VM in question). So confusing! Thus, if you run a robocopy command such as the above, you’ll now have multiple .exp files for that machine. But here’s the trick: the one you should keep is the one that matches the new empty sub-dir that you just copied over. Delete the other one and re-try the import.

Permalink |

1 Comment »

  1. Thanks Dan. This was really helpful. I agree - this is really confusing. I liked Virtual Server so much better in this regard. Merging disks and copying files was so much more straight forward in VS.

    Comment by Travis Wright — September 4, 2008 @ 1:25 pm

RSS feed for comments on this post. TrackBack URL

Leave a comment