Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Problems with booting from a VHD


02 May 2009   #1

Windows Vista
 
 
Problems with booting from a VHD

Hi guys, well I was having some issues before with copying a bootable vhd and it not working. I just retried with RC and I am still having an issue. I just did it so here’s exactly what I did maybe you can let me know what’s wrong.

Steps:
1) Boot Windows 64 RC CD
2) Go format drive completely (All new)
3) Reboot
4) Start Recovery Options, CMD prompt
5) Run diskpart, create vdisk, select vdisk, attach vdisk, exit
6) Install Windows 7 RC

ALL is 100% fine at this point, I have my primary OS running on a VHD, other than that the HD is empty, no issues at all
now I install like SQL, Visual Studio etc that I want
now I want a copy boot of it, this copy one I will use for the office, the above one is for personal work.

So I get cmd prompt while in my newly created home.vhd

copy d:\home.vhd to d:\office.vhd

Now I simply "try" to make it boot off my new office.vhd too

so I do
bcdedit /copy {current} /d "Office"
bcdedit /set {CLSID_Number} osdevice vhd=[d:]\office.vhd

then I reboot
and Home still works 100% fine, but the new copy Office.VHD does not, it starts to boot but mid way through it stops and reboots the whole machine.

Tried this on 2 different machines, HP and a Toshiba.

Please note all my OS's are VHD's there are none that are not on VHD's (regular HD)

Thanks for any info, Ed,

My System SpecsSystem Spec
.

02 May 2009   #2

Windows XP and 7
 
 

Quote   Quote: Originally Posted by gencode View Post
ALL is 100% fine at this point, I have my primary OS running on a VHD, other than that the HD is empty, no issues at all
On your hard disk you should also have:
file: bootmgr
folder: boot (with file bcd)
file: pagefile.sys
If you don't see them, then enable "show hidden system files"

Both VHDs use the same pagefile.sys. And this pagefile.sys is not IN the VHD.
Sometime I have got problems of booting copied VHD files with an existing pagefile.sys which was used by another VHD before. So I delete pagefile.sys and booting was OK.
Quote   Quote: Originally Posted by gencode View Post
so I do
bcdedit /copy {current} /d "Office"
bcdedit /set {CLSID_Number} osdevice vhd=[d:]\office.vhd
Do you forget this?
bcdedit /set {CLSID_Number} device vhd=[d:]\office.vhd
Quote   Quote: Originally Posted by gencode View Post
Tried this on 2 different machines, HP and a Toshiba.
Do you have moved the VHD files from one PC to another ? Whilst installing the operating system configures drivers for the first PC. Should not work to copy a VHD file to another PC - or all new drivers must re-install.

Also in HKEY_LOCAL_MACHINE\System\MountedDevices
you have a "fingerprint" of your first hard drive - should not work on other hard drives.
My System SpecsSystem Spec
02 May 2009   #3

Windows Vista
 
 

unawave, thanks for the help, well heres some screenshots
i had already started another test, basically gencodetest is my home and gencodecopy is the office, same thing again, booting to the copy windows loading screen starts and mid way through the machine reboots...the orig one works just fine.

Problems with booting from a VHD-sc1.png

Problems with booting from a VHD-sc2.png

Problems with booting from a VHD-sc3.png


My System SpecsSystem Spec
.


02 May 2009   #4

Windows XP and 7
 
 

Have you deleted pagefile.sys ? (boot from Linux CD and delete or boot Windows 7 installation DVD, press shift+F10, change to your drive D: and C: and delete pagefile.sys)

On the command prompt screenshot I see this wrong entry:
identifier {a3114298-36d2-11de-8537-94f5553b7e37}
device .... partition=C:

Should named:
device .... vhd=[D:]\gencodecopy.vhd
(same as "osdevice")
My System SpecsSystem Spec
02 May 2009   #5

Windows Vista
 
 
Solved

Well I tried both of those, but still it did not work.
So I thought maybe something was actually wrong with the file

I remembered when I made the copy I was actually in the VHD that I was copying from.

So I booted from the CD, went to the command prompt, deleted the copy and made a new copy.

Next boot it finally worked, I guess that has been my main issue, thanks for finding the others.

Thanks for all your help, I have learned a lot from this fourm...its all really really appreciated!

Ed,
My System SpecsSystem Spec
Reply

 Problems with booting from a VHD




Thread Tools



Similar help and support threads for2: Problems with booting from a VHD
Thread Forum
Problems dual booting XP and 7? Installation & Setup
Problems booting W7 Ultimate General Discussion
Problems in booting up Performance & Maintenance
Problems booting with 4GB of Ram Hardware & Devices
Problems with Windows 7 booting BSOD Help and Support
problems booting? General Discussion
Problems booting back to XP Installation & Setup

Our Sites

Site Links

About Us

Find 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 04:21 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33