The VHD is a file, similar to VMWare's virtual disks. In Server 2008 R2, we can boot up from the VHD on the hard disk. You can also boot up a VHD from a USB drive.
To set up VHD, we need to use the bcdedit command to set it up. VHD files are created from HyperV. When you're done with the HyperV machine, turn it off and copy the VHD file.
You can also create a VHD from scratch from Server Manager > Storage > Disk Management > More Actions > Create VHD. If you create a VHD this way, you need to install an operating system on it.
Tip: Holding down the shift key while clicking on taskbar icons would open a new window. Similar to right-clicking it and launching it again.
To show all boot loader entries, we can simply type:
bcdedit
We need to clone the current boot loader configurations like this:
bcdedit /copy {current} /d "Server Core R2"
Replace "Server Core R2" with whatever name you want to see during boot. After creating the copy, you'll see the GUID assigned to it. Copy this GUID down.
We need to run bcdedit like this after modifying the underlined parts:
bcdedit /set {GUID} device vhd=[c:]\Folder\VHDFile.vhd
bcdedit /set {GUID} osdevice vhd=[c:]\Folder\VHDFile.vhd
bcdedit /set {GUID} detecthal on
Booting like this would clear out all existing configurations. You will have to set up the operating system from scratch again.
To delete an entry from the boot loader, we can use bcdedit again:
bcdedit /delete {GUID} /cleanup
No comments :
Post a Comment