<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly>
  <assemblyIdentity name="Microsoft-Hyper-V-VStack-Config"
                    version="0.0.0.0"
                    processorArchitecture="*"
                    language="*"/>
  <migration
      scope="Upgrade"
      settingsVersion="0"
      replacementSettingsVersionRange="0"
      replacementVersionRange="6.0-6.1"
      alwaysProcess="yes"
      >
    <migXml xmlns="">
      <detects>
        <detect>
          <condition>MigXmlHelper.DoesObjectExist("File", "%systemroot%\system32 [vmms.exe]")</condition>
        </detect>
      </detects>
      <rules context="System">
        <include>
          <objectSet>
            <!-- Collect Hyper-V Server settings in the registry -->
            <pattern type="Registry">HKLM\Software\Microsoft\Windows NT\CurrentVersion\Virtualization\* [*]</pattern>
          </objectSet>
        </include>
        <exclude>
          <objectSet>
            <!-- Don't merge the Hyper-V Version value -->
            <pattern type="Registry">HKLM\Software\Microsoft\Windows NT\CurrentVersion\Virtualization [Version]</pattern>
            <!-- Don't merge the Hyper-V InstallDate value -->
            <pattern type="Registry">HKLM\Software\Microsoft\Windows NT\CurrentVersion\Virtualization [InstallDate]</pattern>
          </objectSet>
        </exclude>
      </rules>
    </migXml>
    <!-- This is only used during in-place upgrade -->
    <machineSpecific>
      <migXml xmlns="">
        <detects>
          <detect>
            <condition>MigXmlHelper.DoesObjectExist("File", "%systemroot%\system32 [vmms.exe]")</condition>
          </detect>
        </detects>
        <rules context="System">
          <include>
            <objectSet>
              <!-- Collect Hyper-V configuration files and Azman store -->
              <pattern type="File">%ProgramData%\Microsoft\Windows\Hyper-V\* [*]</pattern>
            </objectSet>
          </include>
          <merge script="MigXmlHelper.SourcePriority()">
            <objectSet>
              <!-- Always copy the Hyper-V configuration files and Azman store -->
              <pattern type="File">%ProgramData%\Microsoft\Windows\Hyper-V\* [*]</pattern>
            </objectSet>
          </merge>
        </rules>
      </migXml>
    </machineSpecific>
  </migration>
</assembly>