<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Frank Yang (Yang Fei), Technology Architect</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/fyang/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/fyang/feed.xml</link>
    <description>Microsoft Technology Center - Beijing</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:25:23 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to clone your system drive with Windows 7 VHD boot</title>
      <link>https://docs.microsoft.com/archive/blogs/fyang/how-to-clone-your-system-drive-with-windows-7-vhd-boot</link>
      <pubDate>Fri, 09 Apr 2010 06:58:00 GMT</pubDate>
      <dc:creator><![CDATA[fyang]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/fyang/2010/04/09/how-to-clone-your-system-drive-with-windows-7-vhd-boot/</guid>
      <description><![CDATA[&nbsp;
When I try to build multiple demonstrations on one laptop, I found it's not best choices to...]]></description>
      <content:encoded><![CDATA[<P mce_keep="true">&nbsp;</P>
<P>When I try to build multiple demonstrations on one laptop, I found it's not best choices to install multi OS instance on different partition. While, Windows 7/Vista can provide the capability to boot from VHD directly, could resolve these problems very well. Additional,&nbsp;by using differential&nbsp;disk,&nbsp;I could save a lot of disk space.</P>
<P mce_keep="true">&nbsp;</P>
<P>The steps will be like this:</P>
<OL type=1>
<LI>Prepare VHD&nbsp;</LI>
<OL type=1>
<LI>Method 1 </LI></OL></OL>
<OL type=1>
<OL type=1>
<UL type=disc>
<LI>Install Win7 and applications on VHD file directly</LI>
<LI>Knom's Blog have a good step-by-step guide to help you complete this. <A href="https://blogs.msdn.com/knom/archive/2009/04/07/windows-7-vhd-boot-setup-guideline.aspx" mce_href="https://blogs.msdn.com/knom/archive/2009/04/07/windows-7-vhd-boot-setup-guideline.aspx">https://blogs.msdn.com/knom/archive/2009/04/07/windows-7-vhd-boot-setup-guideline.aspx</A></LI>
<LI>Install as C:\VHD\WIN7ENT_BASE.VHD</LI></UL></OL></OL>
<OL type=1>
<OL type=1 start=2>
<LI>Method 2</LI></OL></OL>
<OL type=1>
<OL type=1>
<UL type=disc>
<LI>Capture current system drive on hard disk.</LI>
<LI>By default, Win7 will create 100M system reserved partition, and then take 100% spare disk space to be system partition.</LI>
<LI>Capture your&nbsp;system drive and convert it into VHD</LI></UL></OL></OL>
<OL type=1>
<OL type=1 start=2>
<OL type=1>
<OL type=1>
<LI>Boot by Win7 DVD/USB click repair mode or boot into WinRE/WinPE</LI>
<LI>Using imagex.exe to capture the system drive to wim file on USB drive. Imagex.exe can get from WAIK installation folder. Also, <A href="https://www.autoitscript.com/gimagex/" mce_href="https://www.autoitscript.com/gimagex/">https://www.autoitscript.com/gimagex/</A> can provide a simple GUI for imagex.exe.</LI>
<LI>Create VHD file on physical disk, by diskpart.exe</LI></OL></OL></OL></OL>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>create vdisk file=" C:\VHD\WIN7ENT_BASE.VHD" maximum=32768</B><B></B></P>
<P><B>attach vdisk</B><B></B></P>
<P><B>select disk 1 (the # should be disk# of vdisk)</B><B></B></P>
<P><B>select part 1</B><B></B></P>
<P><B>assign letter=O:</B></P>
<P><B>exit</B><B></B></P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<OL type=1>
<OL type=1 start=2>
<OL type=1>
<OL type=1 start=4>
<LI>Using imagex.exe/gimagex.exe to apply the captured WIM to O:</LI>
<LI>Using diskpart.exe to detach vdisk</LI></OL></OL></OL></OL>
<OL type=1>
<OL type=1>
<UL type=disc>
<LI>Now the C:\VHD\WIN7ENT_BASE.VHD is ready to use.</LI></UL></OL></OL>
<P>Note: the size of parent disk will be the disk size of child disk, which cannot change any more, please reserve free space for your further modification. For example, I have 12G data on drive C, so I set the fixed size of VHD is 32G. or set it to 127G with expending VHD. BTW,&nbsp; the Disk2VHD utility are not right tool to make VHD boot, it should be use for P2V scenarios, that VHD boot in VPC or Hyper-V.</P>
<P mce_keep="true">&nbsp;</P>
<OL type=1 start=2>
<LI>Make differential VHD</LI>
<OL type=1>
<LI>Boot into your Win7 on hard disk or WINRE environment on USB/DVD</LI>
<LI>Run diskpart.exe in administrator privilege</LI>
<LI>Use this command to create multiple VHD</LI></OL></OL>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>create vdisk file="c:\vhd\win7ent_1.vhd" parent="c:\vhd\win7ent_base.vhd"</B><B></B></P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<OL type=1 start=3>
<LI>Add new boot entry in BCD</LI>
<OL type=1>
<LI>Run CMD.EXE in administrator privilege</LI>
<LI>Use the following command to add new entry</LI></OL></OL>
<BLOCKQUOTE>
<BLOCKQUOTE>
<BLOCKQUOTE>
<P><B>bcdedit /copy {current} /d "Win7 Enterprise VHD1"</B></P>
<P>command return <B>{guid}</B></P>
<P><B>bcdedit /set {guid} osdevice vhd=[c:]\vhd\win7ent_1.vhd</B></P></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE>
<UL>
<LI>3. Repeat to add multiple VHD entry</LI>
<LI>4. Run <B>bcdedit /v </B>to check entry settings</LI>
<LI>5. Run <B>bcdedit /default {guid}</B> to change default entry</LI></UL>
<OL type=1 start=4>
<LI>Reboot system and see new boot choices, and select one to boot into VHD</LI>
<LI>You can start to use the new VHD boot system.</LI>
<OL type=1>
<LI>Normally the VHD will be [c:], the original [c:], which host VHD file will be [d:]. </LI>
<LI>The size of D:\VHD\win7ent_1.vhd will be show as the same with its parent disk D:\VHD\win7ent_base.vhd. the actual size can be seen when you boot into original Win7 on hard disk or other VHD system. </LI></OL></OL>
<P>Note: If the VHD you boot from the <B>same machine</B> you captured, you make see a strange thing that the VHD becomes the D: drive and you boot from the D: drive, but your original C: drive is still there. It because the VHD are duplicate with physical disk on this machine, it has hardware information of the physical disk.</P>
<P>It's totally messed up, because the registry on the VHD is a clone of the registry on C: drive, and includes many hard-coded references to C:. So %ProgramFiles% is still set to "C:\Program Files\". You can switch the C: and D: by this KB article. <A href="https://support.microsoft.com/?kbid=223188" mce_href="https://support.microsoft.com/?kbid=223188">https://support.microsoft.com/?kbid=223188</A> </P>
<P mce_keep="true">&nbsp;</P>
<P>Preference Links:</P>
<P mce_keep="true">&nbsp;</P>
<P>ImageX GUI utility by autoitscript.com</P>
<P><A href="https://www.autoitscript.com/gimagex/" mce_href="https://www.autoitscript.com/gimagex/">https://www.autoitscript.com/gimagex/</A></P>
<P mce_keep="true">&nbsp;</P>
<P>Demonstration: Windows 7 VHD Boot</P>
<P><A href="https://www.microsoft.com/downloads/details.aspx?familyid=80EDE31D-3509-407B-A896-0BEEA8705589&amp;displaylang=en" mce_href="https://www.microsoft.com/downloads/details.aspx?familyid=80EDE31D-3509-407B-A896-0BEEA8705589&amp;displaylang=en">https://www.microsoft.com/downloads/details.aspx?familyid=80EDE31D-3509-407B-A896-0BEEA8705589&amp;displaylang=en</A></P>
<P mce_keep="true">&nbsp;</P>
<P>How Do I: Windows 7 VHD Boot Demonstration?</P>
<P><A href="https://technet.microsoft.com/en-us/windows/dd758779.aspx" mce_href="https://technet.microsoft.com/en-us/windows/dd758779.aspx">https://technet.microsoft.com/en-us/windows/dd758779.aspx</A> </P>
<P mce_keep="true">&nbsp;</P>]]></content:encoded>
    </item>
  </channel>
</rss>