+
+function vhd_common_menuentry {
+
+ if [ "$VTOY_VHD_NO_WARNING" != "1" ]; then
+ if [ "$vtoy_iso_fs" != "ntfs" ]; then
+ echo -e "!!! WARNING !!!\n"
+ echo -e "\nPartition1 ($vtoy_iso_fs) is NOT ntfs, the VHD(x) file may not boot normally \n"
+ echo -e "\nVHD(x) 文件所在分区不是 ntfs 格式, 可能无法正常启动 \n\n"
+ echo -n "press ENTER to continue boot (请按 回车 键继续) ..."
+ read vtInputKey
+ fi
+ fi
+
+ vt_chosen_img_path vt_chosen_path vt_chosen_size
+ vt_patch_vhdboot ${vtoy_iso_part} ${vt_chosen_path}
+
+ ventoy_debug_pause
+
+ if [ -n "$vtoy_vhd_buf_addr" ]; then
+ if [ "$grub_platform" = "pc" ]; then
+ linux16 $vtoy_path/memdisk iso raw
+ initrd16 mem:${vtoy_vhd_buf_addr}:size:${vtoy_vhd_buf_size}
+
+ set gfxmode=1920x1080,1366x768,1024x768,800x600,auto
+ terminal_output gfxterm
+ boot
+ else
+ ventoy_cli_console
+ chainloader ${vtoy_path}/ventoy_x64.efi memdisk env_param=${env_param} isoefi=${LoadIsoEfiDriver} ${vtdebug_flag} mem:${vtoy_vhd_buf_addr}:size:${vtoy_vhd_buf_size}
+ boot
+ ventoy_gui_console
+ fi
+ else
+ echo "Failed to boot vhd file"
+ ventoy_pause
+ fi
+}
+
+function vhd_unsupport_menuentry {
+ common_unsupport_menuentry
+}
+