locked
Hyper-V is locking files RRS feed

  • Question

  • Hi
    I'm working on a custom solution for a hyper-v system.
    My setup is 2 hyper-v servers and a iSCSI storage.
    The iSCSI volume is mounted on both servers using Melio FS clustered file system.

    Problems
    1. When exporting a VM on server1 and importing it on server2.
    If the importer get a "config error" when reading the config.xml (caused when having vmm 2008 installed f.eks) it seems to lock the config.xml for ever.

    2. When importing a VM Hyper-V often forget to delete the config.xml and .exp files, and they stay locked for quite a while.

    So i'm just wondering, there seems to be alot of file locking that Hyper-V often forget to clean up after itself.
    Thursday, August 7, 2008 2:56 PM

Answers

  • Portions of this may be a bug.

    But you have to understand that during an Import Hyper-V simply attaches to the exported Virtual machine and runs the VM from that location.

    the VM is not copied, moved, or 'imported' in any way.

    the Import process reads in the config, recognizes that it was exported, uses that information to locate the VHD and dtermine network connections and then runs the VM.

    There is no copy process involved as other products do (XenServer, or VMware using Virtual Center).

    the process is very similar to the VMware process of adding a vm configuration file to inventory using the ESX server datastore browser.  The configuration is simply read and loaded thus identifying the location of all the bits of the VM.

    The Export process serves its part by removing the hard location pointers and GUID identifiers for items specific to a particular Host.  And copying all fo the bits of the VM into a single folder.  Thus making the VM 'portable'.

    If you are using SCVMM, you might be experiencing something a bit different than if you were using Hyper-V alone.  As SCVMM does some additional work and validation that may be causing the problem you began with and then the process is not closing, but timing out.  That would be considered a bug (in a beta).

    Brian Ehlert (hopefully you have found this useful)
    Thursday, August 7, 2008 3:28 PM

All replies

  • Portions of this may be a bug.

    But you have to understand that during an Import Hyper-V simply attaches to the exported Virtual machine and runs the VM from that location.

    the VM is not copied, moved, or 'imported' in any way.

    the Import process reads in the config, recognizes that it was exported, uses that information to locate the VHD and dtermine network connections and then runs the VM.

    There is no copy process involved as other products do (XenServer, or VMware using Virtual Center).

    the process is very similar to the VMware process of adding a vm configuration file to inventory using the ESX server datastore browser.  The configuration is simply read and loaded thus identifying the location of all the bits of the VM.

    The Export process serves its part by removing the hard location pointers and GUID identifiers for items specific to a particular Host.  And copying all fo the bits of the VM into a single folder.  Thus making the VM 'portable'.

    If you are using SCVMM, you might be experiencing something a bit different than if you were using Hyper-V alone.  As SCVMM does some additional work and validation that may be causing the problem you began with and then the process is not closing, but timing out.  That would be considered a bug (in a beta).

    Brian Ehlert (hopefully you have found this useful)
    Thursday, August 7, 2008 3:28 PM
  • I'm not talking about the virtual machine files that are used by Hyper-V.

    When you export a vm using wmi you can export it without copying the files.
    It then creates the config.xml and some .exp files.
    When you import a VM Hyper-V should just read config.xml and use the .exp files and then remove them.

    But that's where the problem is, sometimes it does't remove them and if for some reason it did't import the VM successfully the config.xml tends to lock up and be impossible to delete.
    Thursday, August 7, 2008 10:10 PM