{"id":1213,"date":"2019-10-11T01:09:40","date_gmt":"2019-10-10T23:09:40","guid":{"rendered":"http:\/\/itsimple.info\/?p=1213"},"modified":"2019-10-11T01:09:40","modified_gmt":"2019-10-10T23:09:40","slug":"how-to-fix-broken-or-corrupted-hyper-v-disk-chain-and-merge-snapshot","status":"publish","type":"post","link":"https:\/\/itsimple.info\/?p=1213","title":{"rendered":"How To Fix Broken or Corrupted Hyper-V Disk chain And merge snapshot"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>Sometime Hyper-v can create snapshot or Differencing disks causing the VM not to start :<\/p>\n<p><a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/DiskChain_Error.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1215\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/DiskChain_Error.jpg\" alt=\"\" width=\"907\" height=\"716\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/DiskChain_Error.jpg 655w, https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/DiskChain_Error-300x237.jpg 300w\" sizes=\"auto, (max-width: 907px) 100vw, 907px\" \/><\/a><\/p>\n<p>This can happen because of hardware problem like storage LUN going full and pause, third party backup software trying to backup a full VM while failing over and over causing <span class=\"tlid-translation translation\" lang=\"en\"><span class=\"\" title=\"\">detached<\/span><\/span> out of sync snapshots and broken disk chains, The Disk folder may look like this :<\/p>\n<p><a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/FolderOfDisks.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-1216\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/FolderOfDisks.png\" alt=\"\" width=\"809\" height=\"500\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/FolderOfDisks.png 560w, https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/FolderOfDisks-300x185.png 300w\" sizes=\"auto, (max-width: 809px) 100vw, 809px\" \/><\/a><\/p>\n<p>and the hyper-v show no Snapshots :<\/p>\n<p><a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/NoSnapAtmanger.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1218\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/NoSnapAtmanger.png\" alt=\"\" width=\"591\" height=\"109\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/NoSnapAtmanger.png 591w, https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/NoSnapAtmanger-300x55.png 300w\" sizes=\"auto, (max-width: 591px) 100vw, 591px\" \/><\/a><\/p>\n<h4><strong>To try and fix this first you need to make sure you have a valid backup !!! failing to do so may cause data lost, Please be advised<\/strong><\/h4>\n<p>Now I would recommend to use the <a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/Merge-VMDisks.rar\">Merge-VMDisks.ps1<\/a> and you can download it from here at <em><strong><a href=\"https:\/\/gallery.technet.microsoft.com\/scriptcenter\/Powershell-script-to-merge-72a96c17\">Microsoft Gallery Script Center<\/a><\/strong><\/em><\/p>\n<p>This script is function script which mean you first need to upload it to the memory as administrator then you can use the function, To upload it first run as admin <strong>(With the dot)<\/strong><\/p>\n<pre>ps c:\\. D:\\Folder_Name\\Merge-VMDisks.ps1<\/pre>\n<p>Then make sure you access the function :<\/p>\n<pre>ps c:\\Get-Item -Path function:<\/pre>\n<p>You should get the function in the list<\/p>\n<p><a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/function3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1220\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/function3.jpg\" alt=\"\" width=\"631\" height=\"184\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/function3.jpg 590w, https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/function3-300x87.jpg 300w\" sizes=\"auto, (max-width: 631px) 100vw, 631px\" \/><\/a><\/p>\n<p>Now you can run them from the session, To found the right disk chain you can go to the setting of the VM get the name of the last know disk configured there . Then you can run :<\/p>\n<p>PS C:\\Get-ParentPath Full_Path_and_name_of the configured_Disk<\/p>\n<p>You will get the right list of the disk chain, then before merging the disks you can reconnect it according to the order in the list with &#8220;inspect disk&#8221; tool from the hyper-v manager :<\/p>\n<p><a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/reconnectDisksChain.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1222\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/reconnectDisksChain.jpg\" alt=\"\" width=\"530\" height=\"429\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/reconnectDisksChain.jpg 530w, https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/reconnectDisksChain-300x243.jpg 300w\" sizes=\"auto, (max-width: 530px) 100vw, 530px\" \/><\/a><\/p>\n<p>Rebuild the chain according to the list marking the ignore ID mismatch sometime !<\/p>\n<p><a href=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/ignoreDiskChainID.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1223\" src=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/ignoreDiskChainID.jpg\" alt=\"\" width=\"720\" height=\"539\" srcset=\"https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/ignoreDiskChainID.jpg 720w, https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/ignoreDiskChainID-300x225.jpg 300w, https:\/\/itsimple.info\/wp-content\/uploads\/2019\/10\/ignoreDiskChainID-131x98.jpg 131w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>After that try to power-on the VM , if all is well you should be up and running with healthy disk chain .<\/p>\n<p>Then you can safely proceed to merge to disks :<\/p>\n<pre>PS C:\\Merge-VMDisks -VMName 'VM_Name'<\/pre>\n<p>This will merge all the disk on the VM according to the right disk chain .<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h3>Good Luck<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; Sometime Hyper-v can create snapshot or Differencing disks causing the VM not to start : This can happen because of hardware problem like storage LUN going full and pause, third party backup software trying to backup a full VM while failing over and over causing detached out of sync snapshots and broken disk chains, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,21,12,18,14,15],"tags":[],"class_list":["post-1213","post","type-post","status-publish","format-standard","hentry","category-hyper-v","category-operating-systems","category-tutorials","category-virtualization","category-windows","category-windows-server"],"_links":{"self":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/1213","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1213"}],"version-history":[{"count":0,"href":"https:\/\/itsimple.info\/index.php?rest_route=\/wp\/v2\/posts\/1213\/revisions"}],"wp:attachment":[{"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itsimple.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}