Booting Windows 7 or 2008 from a vhd on a USB drive

after struggling for a week i managed to boot my machine from a vhd located on an external USB drive.



1- prepare a vhd file that has windows 7 or windows 2008 (there are thousands of blogs on how to do this step)


2- copy the vhd to the local hard drive in any parition that has enugh space for the vhd to expand


3- boot from your normal windows (not the vhd that we just prepared)


4- right click my computer and select manage then go to disk management


3- attach the vhd after which it will appear as a normal disk drive volume


4- go to and download pwboot then copy it inside the vhd drive


5- shut down the current windows and boot your machine into the vhd (again there are many blogs explaining how)


6- run the pwboot (FROM WITHIN THE VHD IMAGE)


7- use bcdboot to copy the system files from the vhd to the physical USB drive


8- restart your machine


9- select boot from USB drive


Comments (12)

  1. Roger says:

    Sounds really useful!  This will come in handy. Imagine having a complete Windows 7 machine on a flash drive! Just plug it in, restart, and now you’re using your own computer, on any physical machine. It would be quite handy here in the KSU library, where the screens are not set to the native LCD resolution, but the computers are extremely locked down so I can’t do anything about it…

    Actually, that makes me wonder: is this completely self-contained, and can boot on any computer, even one with only XP or Linux installed, or does it need the Vista+ bootloader to work?


  2. Marauderz says:

    Hmm.. I’ve tried the steps you’ve mentioned but it’s not working. I’m getting an invalid file error for


    And some other thing I had a question with, is that where is the boot store? how does it know which VHD to use on the USB drive?

  3. HusseinA says:


    only Wondows 7 and Windows 2008 R2 supports that. and yes it is an incredible feature. now i have all my virtual machines on a USB drive. so i turned my physical machine to a native virtual . i dont have any OS on my machine. even my personal is a vhd file. if something happens i can just take away my vhd to a new physical machine.

    backup is very easy, i only have to copy the vhd periodically.

    i am sure you will find thrid part software in the future may be to support also windows vista and XP

    so did you try it ?

  4. HusseinA says:


    great question

    bcdedit is your tool to configure the boot options. do you remember boot.ini

    we used to run notepad to edit it

    but now you have to use bcdedit and point it towards the boot manager to configure it.

    so if i have 3 vhds on my USB.

    i will go to command prompt and three of them as 3 different entries

    so when you boot you will see three different boot options (like dual boot) , every entry points to a different vhd

    if you want to add a new entry it is easier to copy one of the existing entries and modify it

    what did you do exactly ?

  5. Marauderz says:

    Here’s what I did

    – Installed Win7 Ultimate onto VHD

    – Booted into it

    – Ran PWBoot on it.

    – Plugged in my USB drive

    – ran "BCDBOOT C:windows /s USBDrive:"

    – Rebooted into normal Win7

    – Copied VHD to USBDrive:

    – BCDEdited the boot store in USBDrive: to use the VHD file to boot.

    – It WILL boot, BUT.. it’ll never make it into windows cause it BSOD and restarts soon into the booting process, I think it’s because it’s confused about what it’s installed on.

  6. HusseinA says:

    when yo booted your machine lastly , did you change the boot from BIOS to be from USB drive ?

  7. Marauderz says:

    Yes, it’s definetly booting from the USB drive. It’s jsut that it’s bluescreening in the booting process.

  8. Marauderz says:

    Yes, it’s definetly booting from the USB drive. It’s jsut that it’s bluescreening in the booting process.

  9. HusseinA says:

    it has to be RTM not RC

    are you using RTM ?

  10. Kevin says:

    Hey – great post… I am SOOO close to getting this to work, I can boot to the vhd if it’s on my local c: drive, but not when it’s on my external usb drive. I CAN boot from usb drive (i’ve installed windows 7 from there) – so I know my machine sets it. Would you please tellme how I should set my bcdedit to support pointing to my "test.vhd" on my external usb drive?

    Windows Boot Loader


    identifier              {577f92c3-fbca-11de-89b9-cb53572a6d85}

    device                  vhd=[H:]test.vhd,locate=custom:12000002

    path                    Windowssystem32winload.exe

    description             vhd

    locale                  en-US

    inherit                 {6efb52bf-1766-41db-a6b3-0ee5eff72bd7}

    recoverysequence        {577f92c4-fbca-11de-89b9-cb53572a6d85}

    recoveryenabled         Yes

    osdevice                vhd=[H:]test.vhd,locate=custom:22000002

    systemroot              Windows

    resumeobject            {577f92c2-fbca-11de-89b9-cb53572a6d85}

    nx                      OptIn

    detecthal               Yes


    Your assistance would be greatly appreciated!!

  11. Korean says:

    hi, i m a korean. so i cant speak English well. but, i m so happy for knowing this method.

    and then, i m novice in computer … windows management…

    i would ask to you. if i have an USB 3.0 Flash memory and usb 3.0 adapter in Laptop, can the method work ?

  12. wagon says:

    the device usb have  more space than .vhd image when expanded