Pour les professionnels de l’informatique > Forums - Accueil > Hyper-V > Extreme problem - HyperV is not saving machine config files properly.
Poser une questionPoser une question
 

TraitéeExtreme problem - HyperV is not saving machine config files properly.

  • lundi 23 juin 2008 08:26AlexiNostavich Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    I've encountered a problem with HyperV which involved the system performing a save state for a reboot.

    Other machines saved and closed up fine.  However one of our machines must have had changes or something strange.

    The changes weren't the problem.  It was the way hyperv saved the file.

    The file was not truncated first, so if the configuration file's size shrinks, it leaves a whole bunch of extra garbage at the end of the config file.  (Unparsable XML Code).

    Event ID 18160

    The requested operation cannot be performed on a file with a user-mapped section open. (0x800704C8)





    You can inspect your XML files by opening them with something like internet explorer.  If it cuts out near the bottom with a parse error at the end, then that was the cause (bad data still left at the end of the config).


    This can make the configuration just disappear from the HyperV manager.  Honestly, why isn't this at least brought to attention with something more english like.


    Microsoft, please get someone on fixing this ASAP.  It can be a huge issue if notes in a config file are changed and the file becomes smaller.



    <?xml version="1.0" encoding="UTF-16" standalone="yes"?>
    <configuration>
      <_2497f4de-e9fa-4204-80e4-4b75c46419c0_>
        <EnabledState type="integer">3</EnabledState>
      </_2497f4de-e9fa-4204-80e4-4b75c46419c0_>
      <_83f8638b-8dca-4152-9eda-2ca8b33039b4_>
        <controller0>
          <drive0>
            <pathname type="string">E:\Hyper-V\vm-Prod-SQL\VM-Prod-SQL-disk1.vhd</pathname>
            <type type="string">VHD</type>
          </drive0>
          <drive1>
            <pathname type="string">E:\Hyper-V\vm-Prod-SQL\VM-Prod-SQL-disk2.vhd</pathname>
            <type type="string">VHD</type>
          </drive1>
        </controller0>
        <controller1>
          <drive0>
            <pathname type="string">E:\ISO\en_office_sharepoint_server_2007_EE_and_SE_DVD_X13-38823.iso</pathname>
            <type type="string">ISO</type>
          </drive0>
          <drive1>
            <pathname type="string">E:\Hyper-V\vm-Prod-SQL\VM-Prod-SQL-Disk3.vhd</pathname>
            <type type="string">VHD</type>
          </drive1>
        </controller1>
        <enable_track_cache type="bool">True</enable_track_cache>
        <version type="integer">5</version>
      </_83f8638b-8dca-4152-9eda-2ca8b33039b4_>
      <_8e3a359f-559a-4b6a-98a9-1690a6100ed7_>
        <port0>
          <connection type="string"></connection>
        </port0>
        <port1>
          <connection type="string"></connection>
        </port1>
        <version type="integer">2</version>
      </_8e3a359f-559a-4b6a-98a9-1690a6100ed7_>
      <_8f0d2762-0b00-4e04-af4f-19010527cb93_>
        <controller0>
          <drive0>
            <pathname type="string"></pathname>
            <type type="string">VFD</type>
          </drive0>
        </controller0>
        <version type="integer">1</version>
      </_8f0d2762-0b00-4e04-af4f-19010527cb93_>
      <_a8a21672-99a4-4bcd-bb67-e7d90764f4fc_>
        <ChannelInstanceGuid type="string">{6044c5f6-9c29-43d7-ac25-7a3e4a68ca26}</ChannelInstanceGuid>
        <FriendlyName type="string">Network Adapter</FriendlyName>
        <IsConnected type="bool">True</IsConnected>
        <MacAddress type="string">00-15-5D-64-1A-09</MacAddress>
        <MacAddressIsStatic type="bool">False</MacAddressIsStatic>
        <PortName type="string">8a8da045-3833-413f-ace1-cfb3927908df</PortName>
        <SwitchName type="string">1467cd13-468f-4360-96b0-4f5d975544ad</SwitchName>
      </_a8a21672-99a4-4bcd-bb67-e7d90764f4fc_>
      <_ac6b8dc1-3257-4a70-b1b2-a9c9215659ad_>
        <base_board>
          <serial_number type="string">0479-0232-3489-3094-8015-3472-48</serial_number>
        </base_board>
        <bios_guid type="string">{503CE3AB-CABB-4A0C-96EB-D03D14CEE6F8}</bios_guid>
        <bios_serial_number type="string">0479-0232-3489-3094-8015-3472-48</bios_serial_number>
        <boot>
          <device0 type="string">Optical</device0>
          <device1 type="string">HardDrive</device1>
          <device2 type="string">Network</device2>
          <device3 type="string">Floppy</device3>
        </boot>
        <chassis>
          <asset_tag type="string">0991-4035-2547-6297-7322-3795-21</asset_tag>
          <serial_number type="string">0479-0232-3489-3094-8015-3472-48</serial_number>
        </chassis>
        <num_lock type="bool">False</num_lock>
        <version type="integer">2</version>
      </_ac6b8dc1-3257-4a70-b1b2-a9c9215659ad_>
      <_db8b9818-b4bb-4725-b99d-b4612716b6b4_>
        <SPD_A0 type="integer">4181387501</SPD_A0>
        <SPD_A2 type="integer">2264515423</SPD_A2>
        <SPD_A4 type="integer">2703485784</SPD_A4>
        <SPD_A6 type="integer">1107243157</SPD_A6>
        <version type="integer">0</version>
      </_db8b9818-b4bb-4725-b99d-b4612716b6b4_>
      <global_settings>
        <disk_merge_pending type="bool">False</disk_merge_pending>
        <owner>
          <sid type="string">S-1-5-21-1935655697-1606980848-1957994488-2651</sid>
        </owner>
        <power>
          <host_shutdown>
            <action type="integer">1</action>
          </host_shutdown>
          <host_startup>
            <action type="integer">2</action>
            <delay type="integer">600000000</delay>
          </host_startup>
        </power>
        <snapshots>
          <list>
            <size type="integer">0</size>
          </list>
        </snapshots>
        <unexpected_termination>
          <action type="integer">1</action>
        </unexpected_termination>
      </global_settings>
      <manifest>
        <size type="integer">8</size>
        <vdev001>
          <device type="string">58f75a6d-d949-4320-99e1-a2a2576d581c</device>
          <flags type="integer">1</flags>
          <instance type="string">58f75a6d-d949-4320-99e1-a2a2576d581c</instance>
          <name type="string">Microsoft Synthetic Mouse</name>
        </vdev001>
        <vdev002>
          <device type="string">f3cf6965-e8d3-44a9-9b7d-a04245ea7525</device>
          <flags type="integer">1</flags>
          <instance type="string">f3cf6965-e8d3-44a9-9b7d-a04245ea7525</instance>
          <name type="string">Microsoft Synthetic Video</name>
        </vdev002>
        <vdev003>
          <device type="string">84eaae65-2f2e-45f5-9bb5-0e857dc8eb47</device>
          <flags type="integer">1</flags>
          <instance type="string">84eaae65-2f2e-45f5-9bb5-0e857dc8eb47</instance>
          <name type="string">Microsoft Heartbeat Component</name>
        </vdev003>
        <vdev004>
          <device type="string">2a34b1c2-fd73-4043-8a5b-dd2159bc743f</device>
          <flags type="integer">1</flags>
          <instance type="string">2a34b1c2-fd73-4043-8a5b-dd2159bc743f</instance>
          <name type="string">Microsoft Key-Value Pair Exchange Component</name>
        </vdev004>
        <vdev005>
          <device type="string">9f8233ac-be49-4c79-8ee3-e7e1985b2077</device>
          <flags type="integer">1</flags>
          <instance type="string">9f8233ac-be49-4c79-8ee3-e7e1985b2077</instance>
          <name type="string">Microsoft Shutdown Component</name>
        </vdev005>
        <vdev006>
          <device type="string">2497f4de-e9fa-4204-80e4-4b75c46419c0</device>
          <flags type="integer">1</flags>
          <instance type="string">2497f4de-e9fa-4204-80e4-4b75c46419c0</instance>
          <name type="string">Microsoft Time Synchronization Component</name>
        </vdev006>
        <vdev007>
          <device type="string">5ced1297-4598-4915-a5fc-ad21bb4d02a4</device>
          <flags type="integer">1</flags>
          <instance type="string">5ced1297-4598-4915-a5fc-ad21bb4d02a4</instance>
          <name type="string">Microsoft VSS Component</name>
        </vdev007>
        <vdev008>
          <device type="string">2fc216b0-d2e2-4967-9b6d-b8a5c9ca2778</device>
          <flags type="integer">1</flags>
          <instance type="string">a8a21672-99a4-4bcd-bb67-e7d90764f4fc</instance>
          <name type="string">Microsoft Synthetic Ethernet Port</name>
        </vdev008>
        <version type="integer">260</version>
      </manifest>
      <properties>
        <global_id type="string">E021A095-7D94-4A1F-8A08-5AB3AFCA7354</global_id>
        <last_powered_off_time type="integer">128586783435736417</last_powered_off_time>
        <last_powered_on_time type="integer">128570559531931085</last_powered_on_time>
        <last_state_change_time type="integer">128586785989740834</last_state_change_time>
        <name type="string">vm-Prod-SQL</name>
        <notes type="string"></notes>
        <type_id type="string">Virtual Machines</type_id>
      </properties>
      <savedstate />
      <settings>
        <global>
          <logical_id type="string">E021A095-7D94-4A1F-8A08-5AB3AFCA7354</logical_id>
        </global>
        <memory>
          <bank>
            <size type="integer">1200</size>
          </bank>
        </memory>
        <processors>
          <count type="integer">2</count>
          <limit type="integer">100000</limit>
          <reservation type="integer">0</reservation>
          <weight type="integer">100</weight>
        </processors>
        <stopped_at_host_shutdown type="bool">True</stopped_at_host_shutdown>
      </settings>
    </configuration>  <memory>
          <bank>
            <size type="integer">1200</size>
          </bank>
        </memory>
        <processors>
          <count type="integer">2</count>
          <limit type="integer">100000</limit>
          <reservation type="integer">0</reservation>
          <weight type="integer">100</weight>
        </processors>
        <stopped_at_host_shutdown type="bool">True</stopped_at_host_shutdown>
      </settings>
    </configuration>


    Notice the extra garbage data left at the end of the file after it was supposed to be cleared and written shorter.


    Ugh, it's almost 3 AM I'm really sorry if this post just sounds horribly bad in grammar. 


    Essentially somewhere in the code you're just writting the bytes intead of deleting and re-writing the file.

    Alexi Nostavich

Réponses

  • jeudi 26 juin 2008 12:03Chang Yin Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
     

    Hello,

     

    I think there might be some accidents (e.g. power-outage) that caused the XML file corrupted or some Security Products (especially the ForeFront Client Security) that seized the XML file.

     

    Would you please take a look at the Event Viewer at "Application and Services Logs\Microsoft\Windows\Hyper-V-VMMS\Admin", see if any relevant errors or warnings exist? Please also let us know the exact messages about the Event 18160, see if it has some detailed information about the code like 0XC00CEE2D.

     

    We have seen some issues about "The requested operation cannot be performed on a file with a user-mapped section open. (0x800704C8)". This error may occur when you have Microsoft ForeFront Client Security or some other Security Products installed. And if this is the case, you can try the following method:

     

    Set exclusions for the following directories:

     

    Default/Custom VHD Directory

    Default/Custom VM Config Directory

    Snapshots Directory

     

    Also, in the case with ForeFront, you can set exclusions for files that processes will access. You will want to include C:\Windows\system32\vmms.exe and C:\Windows\system32\vmwp.exe.

     

    If you have encountered any accidents like the power-outage, the configuration file may be corrupted. As I saw some unusual entries in this XML file, such as unpaired entry "<savedstate />" and the last duplicated lines, the reason why saving a VM may result in an unusual configuration file may be due to the incorrect XML file. And if this is the case, you can try restarting the server more than once to see how it goes. Would you please take a look at the following thread and see if Jon's situation is similar:

     

    http://forums.technet.microsoft.com/zh-CN/winserverhyperv/thread/c67724e6-4420-4b3f-8049-1029902176f9/

     

    Additionally, would you please try re-creating the problematic VM with the existing VHD and then see if the problem remains?

     

    Thank you for your cooperation.

     

    Best regards,

    Chang Yin
    • Marqué comme réponseChang Yin lundi 30 juin 2008 01:07
    •  

Toutes les réponses

  • mardi 24 juin 2008 01:12Craig Leach Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     
    I'm having the same problem as you. I've had to edit the XML configuration files about on about 33% of the server setting edits. This occured with both RC0 and RC1.

    Regards,
    Craig Leach
    Craig Leach
  • jeudi 26 juin 2008 12:03Chang Yin Médailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateurMédailles de l'utilisateur
     Traitée
     

    Hello,

     

    I think there might be some accidents (e.g. power-outage) that caused the XML file corrupted or some Security Products (especially the ForeFront Client Security) that seized the XML file.

     

    Would you please take a look at the Event Viewer at "Application and Services Logs\Microsoft\Windows\Hyper-V-VMMS\Admin", see if any relevant errors or warnings exist? Please also let us know the exact messages about the Event 18160, see if it has some detailed information about the code like 0XC00CEE2D.

     

    We have seen some issues about "The requested operation cannot be performed on a file with a user-mapped section open. (0x800704C8)". This error may occur when you have Microsoft ForeFront Client Security or some other Security Products installed. And if this is the case, you can try the following method:

     

    Set exclusions for the following directories:

     

    Default/Custom VHD Directory

    Default/Custom VM Config Directory

    Snapshots Directory

     

    Also, in the case with ForeFront, you can set exclusions for files that processes will access. You will want to include C:\Windows\system32\vmms.exe and C:\Windows\system32\vmwp.exe.

     

    If you have encountered any accidents like the power-outage, the configuration file may be corrupted. As I saw some unusual entries in this XML file, such as unpaired entry "<savedstate />" and the last duplicated lines, the reason why saving a VM may result in an unusual configuration file may be due to the incorrect XML file. And if this is the case, you can try restarting the server more than once to see how it goes. Would you please take a look at the following thread and see if Jon's situation is similar:

     

    http://forums.technet.microsoft.com/zh-CN/winserverhyperv/thread/c67724e6-4420-4b3f-8049-1029902176f9/

     

    Additionally, would you please try re-creating the problematic VM with the existing VHD and then see if the problem remains?

     

    Thank you for your cooperation.

     

    Best regards,

    Chang Yin
    • Marqué comme réponseChang Yin lundi 30 juin 2008 01:07
    •