locked
Import\Export VM vs. "Copying VM after power off" RRS feed

  • Question

  • If I power down a hyper-V VM can I simply copy the folder its in (and contents) to another directory\server and restart the VM?  (keeping the original VM powered down.)  Or is there a problem with that approach requiring me to use the "Import\Export' options of Hyper-V?

    TIA,

    barkingdog

    Wednesday, August 13, 2008 7:21 PM

Answers

  • Import/export preserves your snapshots. Copying the folder will not. Also, import/export preserves your settings (e.g., network adapters, ram, logical processor count). A folder copy will not preserve your settings.
    Wednesday, August 13, 2008 8:00 PM
  • Thanks to both John and Brian for excellent answers....

    but John mentioned that

    >>>  as long as you DO NOT have snapshots. (which you should not use in production anyway)


    Why should one not use Snapshots in prodcution? Performance? Increased risk of failure?

    TIA,

    Barkingdog
    • Marked as answer by edm2 Sunday, August 17, 2008 4:59 AM
    Thursday, August 14, 2008 1:57 AM
  • I mentioned it because of performance and recovery.

    A snapshot in Hyper-v spawns a differencing disk off a previous vhd.  This means that you have files within the base vhd and files within the differencing disk that must all be searched - thus creating greater disk IO.

    the second reason is recovery.  A differencing disk has to be chained, andthat chain marker is a hard path not a virtual path.  Therefore if any parts are not roceovered to the same volumes, then the disk is broken.

    And, if the disk is briken, it can beput back together, but usually the moment of panic causes the chain to be broken.  Once the chain is broken and one of the disks in the chain is modified (not the last disk), then the chain can never be repaired.

    I wrote a bit about this in my blog.

    Since you have a VMware background.  The very first thing that you need to puton your board is not to think that snapshots are a backup or DR method.
    The MSFT snapshot model is strictly designed for testing, then merging - or development.  It was never intended for production virtual machines (in that you would have multiple snapshots).

    You know htat a vmware checkpoint can be copied out and is essentially a standalone vm.  This isn't the case with Hyper-V.
    Brian Ehlert (hopefully you have found this useful)
    Thursday, August 14, 2008 4:39 AM

All replies

  • Import/export preserves your snapshots. Copying the folder will not. Also, import/export preserves your settings (e.g., network adapters, ram, logical processor count). A folder copy will not preserve your settings.
    Wednesday, August 13, 2008 8:00 PM
  • John is exactly right.

    Export does far more than copy the VHD - it sets up integrity for the VM to be run again without recreating the configuration (as well as fixing up snapshots, history, etc.)

    Copying the VHD would be fine as long as you DO NOT have snapshots.
    (which you should not use in production anyway)

    http://itproctology.blogspot.com/2008/05/versatility-of-hyper-v-export-import.html

    Brian Ehlert (hopefully you have found this useful)
    Wednesday, August 13, 2008 8:53 PM
  • Thanks to both John and Brian for excellent answers....

    but John mentioned that

    >>>  as long as you DO NOT have snapshots. (which you should not use in production anyway)


    Why should one not use Snapshots in prodcution? Performance? Increased risk of failure?

    TIA,

    Barkingdog
    • Marked as answer by edm2 Sunday, August 17, 2008 4:59 AM
    Thursday, August 14, 2008 1:57 AM
  • I mentioned it because of performance and recovery.

    A snapshot in Hyper-v spawns a differencing disk off a previous vhd.  This means that you have files within the base vhd and files within the differencing disk that must all be searched - thus creating greater disk IO.

    the second reason is recovery.  A differencing disk has to be chained, andthat chain marker is a hard path not a virtual path.  Therefore if any parts are not roceovered to the same volumes, then the disk is broken.

    And, if the disk is briken, it can beput back together, but usually the moment of panic causes the chain to be broken.  Once the chain is broken and one of the disks in the chain is modified (not the last disk), then the chain can never be repaired.

    I wrote a bit about this in my blog.

    Since you have a VMware background.  The very first thing that you need to puton your board is not to think that snapshots are a backup or DR method.
    The MSFT snapshot model is strictly designed for testing, then merging - or development.  It was never intended for production virtual machines (in that you would have multiple snapshots).

    You know htat a vmware checkpoint can be copied out and is essentially a standalone vm.  This isn't the case with Hyper-V.
    Brian Ehlert (hopefully you have found this useful)
    Thursday, August 14, 2008 4:39 AM