How to add a new boot menu to boot the system from a vhd file

Copy the vhd file to a local folder, D:\boot for example.

Run the following command with administrator privilege

rem {current} is an identifier id. This is used to backup the {current} setting, ignore it if you dont want.
rem **strongly recommend**
bcdedit /copy {current} /d "current_backup"

rem set the device(the vhd file)
bcdedit /set {current} device vhd=[d:]\path-to-the-vhd-file
rem bcdedit /set {current} device vhd=[d:]\boot\xxxx.vhd for example.

rem set the osdevice(same path of the device)
bcdedit /set {current} osdevice vhd=[d:]\path-to-the-vhd-file

rem set the default boot item(ignore this if you dont want make the new system as the default one)
bcdedit /set {bootmgr} default {current} //guid.

Reboot the host and enjoy the new system.