Virtual Hard Drive VHD File - Create and Start with at Boot

Page 3 of 16 FirstFirst 1234513 ... LastLast

  1. Posts : 2
    Windows 7
       #20

    OK, I understand that. Thank you very much.
    Nice place you have here :)
    Brink said:
    Hello Pitajax, and welcome to Seven Forums.

    As Spacesurfer posted, you can place the VHD at any location. You will just need to modify the commands in the steps for that location instead. :)
      My Computer


  2. Posts : 71,978
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #21

    You're welcome Pitajax. :)
      My Computer


  3. Posts : 9
    Windows Vista and Windows 7 Beta
       #22

    Some info regarding booting Windows XP from VHD.

    It seems that it should be possible as XP does have the VHD drivers. When you install XP in a virtual pc and attach a second VHD drive, you can see device manager loading the drivers for virtual drives. Hence, my theory is that it should be possible to boot XP from VHD.

    Based on this premise, I have tried the following ideas (and if someone wants to further test different scenarios, that would be helpful):

    1) Install XP on Virtual PC VHD
    2) Add VHD boot entry to menu

    bcdedit /set {ntldr} device vhd=[drive]\file.vhd
    bcdedit /set {ntldr} osdevice vhd=[drive]\file.vhd
    bcdedit /set {ntldr} detecthal on

    3) Try to boot XP and get an error stating NTLDR not found

    Based on above, it seems the VHD does load but it can't find ntldr within the partition.

    So, I tried the following. Instead of loading XP using ntldr, I tried loading it via bootmgr by doing the following:

    1) Export bcd store from a bootable source. Import that in XP loaded in Virtual PC.
    2) Copy bootmgr, bcdedit, and bootsect.exe to XP in virtual pc.
    3) Change bootsec from nt52 to nt60 using the command bootsect /nt60 /f
    4) Copy bootmgr to c:\
    5) Add entries to boot XP
    6) Restart to make sure XP boots using bootmgr instead of ntldr. It does and I have succeeded up to here.
    7) In main physical OS, add entry to boot to this VHD that load XP using bootmgr instead of ntldr.

    This failed for me. Instead of loading XP, I got Windows 7 recovery... and vaguely remember some error about partition not being right.

    So the plan is to format the partition with Windows 7, then install XP on that and retry.

    So, here's the steps if anyone wants to try.

    1) Create a virtual pc vhd. Load Windows 7 iso and format the partition with windows 7. Abort win 7 install. (Or use command prompt and diskpart to format and exit).
    2) Load Windows XP iso and install windows xp.
    3) change boot loader to bootmgr as outlined above.
    4) add boot entries to menu
    5) load xp.
      My Computer


  4. Posts : 1
    win 7 rc
       #23

    save a couple steps


    I found that during install you can press Shift+F10 it will pop up a command prompt. So you can essentially skip the whole navigate to recover stuff and just pop into cmd and do diskpart, from diskpar screen.

    I tested out a Win7 to Win7 dual-boot it is installing as i type this. I have used this to play solitar, majohng, or minesweeper while it is installing/upgrading with no issues (i even managed to get IE to work while upgrading but the upgrade took 3+ hours)

    good luck.

    Lucas
      My Computer


  5. Posts : 71,978
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #24

    Hello Lucas, and welcome to Seven Forums.

    Thank you. It has been added. :)

    Shawn
    Last edited by Brink; 02 May 2009 at 08:48.
      My Computer


  6. Posts : 50
    Windows XP and 7
       #25

    gencode said:
    Id like to format my primary hd and back up my new vhd to my NAS drive, then put it back when im all done.
    I know I can copy it back, but how to I attach it to the boot menu? so it can be booted after I reformat my primary drive or if I were to upgrade to a new larger drive.
    You need to install the boot manager. Because you do not have any operating system on your clean hard disk you can not use "system repair".

    So: Install a "dummy" operating system:
    Format your hard disk with NTFS
    Boot from Windows 7 DVD and install Windows 7 to VHD file. See here.


    After this you have on your hard disk:
    • The VHD file
    • Boot manager as file "bootmgr"
    • Boot settings in folder c:\boot\bcd
    • A file "pagefile.sys"
    Boot this "dummy" installation.

    You now should see two hard disks:
    • C: = dummy VHD file
    • D: = real hard disk
    Copy your backup of your VHD file from NAS drive to D:
    Then use "bcdedit" to add boot menu entry of your (backup) VHD file. See here.

    Boot to your (backup) VHD.
    If it works all fine then you can delete boot menu entry of your "dummy" installation via "bcdedit" and also delete dummy VHD file.
      My Computer


  7. Posts : 1
    Vista/7
       #26

    Thanks for this guide, it worked perfectly.
    However I have had a lot of driver problems with Win7 (very old hardware) and would like to now remove it. Do I just follow the tutorial: How to Unattach and Delete a Virtual Hard Disk in Windows 7, as posted at the top this guide under related links?

    Also, how does one go about changing the default boot OS? Atm its Win7 but I may want to switch it the existing OS instead of remove it.

    Cheers.
      My Computer


  8. Posts : 71,978
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #27

    Hello Uder, and welcome to Seven Forums.

    I have added OPTION TWO to the tutorial to help show you how to. :)

    To just change the default OS to start to, this tutorial below can help show you how to.

    Default Operating System - Change Default Boot OS

    Hope this helps,
    Shawn
      My Computer


  9. Posts : 47
    Win7 x64 SP1, Virtual Hackintosh
       #28

    Type of the VHD-File: Fixed vs. Expandable


    It is an excellent documentation offered here in that forum, and I successful installed Win7 x86 RC on my Thinkpad z61p using a USB-Stick as a installation media and a VHD as installation target.

    But on question / problem came up, the size of that VHD-File for a full Win7-installation and Office etc.

    Diskpart offeres two types of VHD-Files, FIXED (Default) and EXPANDABLE.

    DISKPART
    CREATE VDISK FILE=C:\VHD\<filename>.vhd MAXIMUM=25000 TYPE=EXPANDABLE

    In FIXED mode (as I understand) the max value will be allocation right now, the size will be 25Gig. In EXPANDABLE mode the size will be that amount of data, which is used by the installation, not more and the size at all can grow up to 25 GB (same behaviour as with Virtual PC or VMWare Workstation).

    So I selected a MAXIUM of 100 GB thinking the effective size will be just around 15-20 Gig. But as I looked into the explorer, the file is 100 GB in size and the underlying Vista installation has a lack of free disk space now.

    I cannot see any difference in the allocated size of my VHD, but I have created it with the TYPE=EXPANDABLE option and diskpart reports the Type as expandable - But the size is fixed to the maximum.

    Does anyone here has similar experiences?
    Is there a method to shrink the VHD?
    What about a comparison in using a VHD vs. shrinking Vista and using a own partition for Win7?
    What about Hypernation in a VHD?

    Lots of questions

    Greetings from Switzerland and Thanks in Advance

    Oblomow
      My Computer


  10. Posts : 71,978
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #29

    Hello Oblomow,

    Sorry for the late reply, but it took a bit to play with this to see what options may be available for you.

    I have added a option to create either a fixed or expandable VHD file option to help give more options.

    When using the type=expandable command, the VHD file will be exandable, but it will require installing Windows Virtual PC to actually see the VHD file as the smaller expandable size instead of the full fixed size. It seems that without that program installed to have associated with VHD files types, Windows 7 will still only show the maximum size instead whether it is fixed or expandable.

    I find that it's usually best to backup anything on the VHD that you did not want to lose, then delete it and create a new VHD file the size that you wanted instead of trying to shrink an existing one.

    Hope this helps,
    Shawn
      My Computer


 
Page 3 of 16 FirstFirst 1234513 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 10:15.
Find Us