Increase time to boot from a UEFI based iso in HyperV

cereberus

Well-known member
Power User
VIP
Local time
8:51 AM
Posts
373
One of the annoying features with Hyper-V is when you want to install a new version of Windows in a VM from an iso if doing a Gen 2 UEFI Installation is that you nearly always time out on pressing the CD/DVD action, as a takes a few seconds to load the first screen

The long established solution (told to me by @Kari) is to use reset option from the hyper-v selection menu, but even the you have to fairly quick to press the enter key (especially on modern fast pcs).

I googled around for a solution and all replies said it was not possible unless MS make a change.

So, I had a light bulb moment tonight, and I tried this.

1) Add 3 or 4 scsi DVD drives in the Hyper-V setting menu all pointing to same boot iso.

2) Change boot order so all the DVD drives are above the other options.


I now get 14 seconds to press CD/DVD button instead of 1 second (2 5 seconds taken by initial screen.

Of course, it is not really faster overall, as it probably takes longer to set it up than it takes to do a reset but it is a lot less irritating. You could set it up so iso being installed always has same name.
 

My Computer

System One

  • Operating System
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0

jimbo45

Well-known member
Member
VIP
Local time
7:51 AM
Posts
597
Location
Hafnarfjörður IS
One of the annoying features with Hyper-V is when you want to install a new version of Windows in a VM from an iso if doing a Gen 2 UEFI Installation is that you nearly always time out on pressing the CD/DVD action, as a takes a few seconds to load the first screen

The long established solution (told to me by @Kari) is to use reset option from the hyper-v selection menu, but even the you have to fairly quick to press the enter key (especially on modern fast pcs).

I googled around for a solution and all replies said it was not possible unless MS make a change.

So, I had a light bulb moment tonight, and I tried this.

1) Add 3 or 4 scsi DVD drives in the Hyper-V setting menu all pointing to same boot iso.

2) Change boot order so all the DVD drives are above the other options.


I now get 14 seconds to press CD/DVD button instead of 1 second (2 5 seconds taken by initial screen.

Of course, it is not really faster overall, as it probably takes longer to set it up than it takes to do a reset but it is a lot less irritating. You could set it up so iso being installed always has same name.
Hi there

Is this of any use. I haven't tried it myself but it looks as if it will do the job. I'm surprised that there isn't a quick obvious method as that message press any key to boot from CD often on fast hardware disappears far too quickly. VMWare and KVM/QEMU can delay the time needed for response to something sensible but I'm surprised HYPER-V doesn't have this as standard - those that use HYPER-V regularly perhaps could request the feature in the feedback.


Cheers
jimbo
 

My Computer

System One

  • Operating System
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

Kari

PhD in Malt Based Liquids
Power User
VIP
Local time
9:51 AM
Posts
569
Location
Expat from Finland in Leipzig Germany
One undocumented fact about boot order in Hyper-V is, that if PXE boot (network) is first in boot order, and no boot file is not found in exactly one minute, Hyper-V tries to boot using next option in boot device list.

In other words, if you are not in hurry to start your VM, just set network as first boot device, and DVD next:

1626911654103.png

This way, when started, VM waits one minute, the jumps to next item, DVD, and shows the "Press any key..." option.

Kari
 

My Computers

System One System Two

  • Operating System
    Windows 11 PRO x64 Dev
    Manufacturer/Model
    Hyper-V Virtual Machine (host in System 2 specs)
    CPU
    Intel Core i7-8550U
    Memory
    6 GB
    Graphics Card(s)
    Microsoft Hyper-V Video
    Monitor(s) Displays
    Laptop display (17.1") & Samsung U28E590 (27.7")
  • Operating System
    Windows 11 PRO x64 Dev Channel
    Computer type
    Laptop
    Manufacturer/Model
    HP HP ProBook 470 G5
    CPU
    Intel Core i7-8550U
    Motherboard
    HP 837F KBC Version 02.3D.00
    Memory
    16 GB
    Graphics card(s)
    Intel(R) UHD Graphics 620 & NVIDIA GeForce 930MX
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    Laptop display (17.1") & Samsung U28E590 (27.7")
    Hard Drives
    128 GB SSD & 1 TB HDD
    Mouse
    Wireless Logitech MSX mouse
    Keyboard
    Wireless Logitech MK710 keyboard
    Internet Speed
    100 Mbps down, 20 Mbps up
    Browser
    Edge Chromium Dev Channel
    Antivirus
    Windows Defender
    Other Info
    2 * 3 TB USB HDD
    6 TB WD Mirror NAS

cereberus

Well-known member
Power User
VIP
Local time
8:51 AM
Posts
373
One undocumented fact about boot order in Hyper-V is, that if PXE boot (network) is first in boot order, and no boot file is not found in exactly one minute, Hyper-V tries to boot using next option in boot device list.

In other words, if you are not in hurry to start your VM, just set network as first boot device, and DVD next:

View attachment 3715

This way, when started, VM waits one minute, the jumps to next item, DVD, and shows the "Press any key..." option.

Kari
That is interesting but it kind of goes from ome one extreme to another but would be handy for unattended installation.

In many ways, this could be even more irritating as in an attended installation, you would have to be closely watching for the minute to pass and then react. I would almost certainly miss it and I would be more irritated to wait another minute (probably several times LOL)

As an aside, I installed w11 as gen 1 in HyperV which does not suffer the same boot cd issue i.e. if you do not press a key, it automatically boots the iso anyway.

However, we are not certain that this will work in future as I expect they will phase out legacy bios booting at the Host level.

Also, my new laptop is EUFI only but it had no problem native booting the VHDX by adding a boot entry to the Host UEFI BCD. Whilst the installation contains both legacy bios and uefi capability, this is fine but is it guaranteed in the future?
 

My Computer

System One

  • Operating System
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0

Kari

PhD in Malt Based Liquids
Power User
VIP
Local time
9:51 AM
Posts
569
Location
Expat from Finland in Leipzig Germany
Yes, waiting a minute is not a solution, not even a workaround. I just mentioned it because it is an interesting, not documented feature.

Kari
 

My Computers

System One System Two

  • Operating System
    Windows 11 PRO x64 Dev
    Manufacturer/Model
    Hyper-V Virtual Machine (host in System 2 specs)
    CPU
    Intel Core i7-8550U
    Memory
    6 GB
    Graphics Card(s)
    Microsoft Hyper-V Video
    Monitor(s) Displays
    Laptop display (17.1") & Samsung U28E590 (27.7")
  • Operating System
    Windows 11 PRO x64 Dev Channel
    Computer type
    Laptop
    Manufacturer/Model
    HP HP ProBook 470 G5
    CPU
    Intel Core i7-8550U
    Motherboard
    HP 837F KBC Version 02.3D.00
    Memory
    16 GB
    Graphics card(s)
    Intel(R) UHD Graphics 620 & NVIDIA GeForce 930MX
    Sound Card
    Conexant ISST Audio
    Monitor(s) Displays
    Laptop display (17.1") & Samsung U28E590 (27.7")
    Hard Drives
    128 GB SSD & 1 TB HDD
    Mouse
    Wireless Logitech MSX mouse
    Keyboard
    Wireless Logitech MK710 keyboard
    Internet Speed
    100 Mbps down, 20 Mbps up
    Browser
    Edge Chromium Dev Channel
    Antivirus
    Windows Defender
    Other Info
    2 * 3 TB USB HDD
    6 TB WD Mirror NAS

jimbo45

Well-known member
Member
VIP
Local time
7:51 AM
Posts
597
Location
Hafnarfjörður IS
Hi folks

@Kari

Would another way to tackle this be (especially if booting from an iso) to change the boot in the ISO itself where it prompts for a key press to add say a 5 - 10 sec wait.

There must be some sort of script in plain text where it says "press any key to boot from the CD" where you could insert a wait command. 5 - 10 secs which I'm sure would be reasonable even for fast hardware and satisfy all those people who don't want to mess around with "undocumented features".

If you felt skilled enough perhaps you could even change it to if no key press was received it would boot from the CD so satisfying unattended requests,

Something like this might work

Extract the iso file to the HDD.
Edit the boot bit
then re-create the iso

mkisofs -V "YOUR ISO IMAGE" -J -r -o isoimage.iso ./for_iso

I'll have a go later as I'm not working for the next few days !!

I 'm currently not using HYPER-V but I have a W2K19 server iso which has the same "Press any key to boot from the CD" so I can have a play with that one.

Cheers
jimbo
 
Last edited:

My Computer

System One

  • Operating System
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7

Hopachi

Active member
Local time
9:51 AM
Posts
61
If you felt skilled enough perhaps you could even change it to if no key press was received it would boot from the CD so satisfying unattended requests,

Something like this might work

Extract the iso file to the HDD.
Edit the boot bit
then re-create the iso

mkisofs -V "YOUR ISO IMAGE" -J -r -o isoimage.iso ./for_iso
Yes, for instance for the efi boot part, it's mentioned here:
 

My Computers

System One System Two

  • Operating System
    Linux: Fedora 3x 64-bit / Windows 10 Pro 64-bit in VM
    Computer type
    Laptop
    Manufacturer/Model
    TOSHIBA Tecra W50-A
    CPU
    Intel i7-4810MQ
    Motherboard
    TOSHIBA, Intel QM87 Express Chipset
    Memory
    32GB DDR3 @1600
    Graphics Card(s)
    Nvidia Quadro K2100M - 2GB
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    15.6' built-in + LG-32ML600M
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung SSD 840 250GB + Samsung SSD QVO 2TB
    PSU
    180W adapter
    Cooling
    The usual airflow + docked to station - PA5117E-1PRP
    Keyboard
    Backlit built-in + Logitech Orion G610
    Mouse
    SteelSeries Rival 100 Red
    Internet Speed
    Good enough
    Browser
    Chromium, Edge, Firefox
    Antivirus
    Windows Defender
  • Operating System
    Windows 10 Pro 64-bit
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom Build
    CPU
    AMD Ryzen 7 1800X
    Motherboard
    MSI Mortar B350M
    Memory
    32GB DDR4 @2666
    Graphics card(s)
    GYGABYTE AORUS Radeon RX580 8G
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    Medion 27'
    Screen Resolution
    1920x1080
    Hard Drives
    WD Black 3D NAND SSD 250 GB NVMe + 4x HDD WD Blue 500GB 2.5'
    PSU
    Corsair Builder CX550M
    Case
    Fractal Design Define Mini (Black)
    Cooling
    Noctua NH-D15S
    Mouse
    Good one, with cable / long tail
    Keyboard
    Lenovo SK-8825(L)
    Internet Speed
    N/A
    Browser
    Firefox
    Antivirus
    Windows Defender

pparks1

Active member
Member
VIP
Local time
3:51 AM
Posts
124
I just connect to the HyperV VM first, and then power it on. I'm usually successful in catching the "Press Any Key to Install WIndows" option doing it this way.
 

My Computer

cereberus

Well-known member
Power User
VIP
Local time
8:51 AM
Posts
373
Hi folks

@Kari

Would another way to tackle this be (especially if booting from an iso) to change the boot in the ISO itself where it prompts for a key press to add say a 5 - 10 sec wait.

There must be some sort of script in plain text where it says "press any key to boot from the CD" where you could insert a wait command. 5 - 10 secs which I'm sure would be reasonable even for fast hardware and satisfy all those people who don't want to mess around with "undocumented features".

If you felt skilled enough perhaps you could even change it to if no key press was received it would boot from the CD so satisfying unattended requests,

Something like this might work

Extract the iso file to the HDD.
Edit the boot bit
then re-create the iso

mkisofs -V "YOUR ISO IMAGE" -J -r -o isoimage.iso ./for_iso

I'll have a go later as I'm not working for the next few days !!

I 'm currently not using HYPER-V but I have a W2K19 server iso which has the same "Press any key to boot from the CD" so I can have a play with that one.

Cheers
jimbo
 

My Computer

System One

  • Operating System
    Windows 10 Pro + others in VHDs
    Computer type
    Laptop
    Manufacturer/Model
    ASUS Vivobook 14
    CPU
    I7
    Motherboard
    Yep, Laptop has one.
    Memory
    16 GB
    Graphics Card(s)
    Integrated Intel Iris XE
    Sound Card
    Realtek built in
    Monitor(s) Displays
    N/A
    Screen Resolution
    1920x1080
    Hard Drives
    1 TB Optane NVME SSD, 1 TB NVME SSD
    PSU
    Yep, got one
    Case
    Yep, got one
    Cooling
    Stella Artois
    Keyboard
    Built in
    Mouse
    Bluetooth , wired
    Internet Speed
    72 Mb/s :-(
    Browser
    Edge mostly
    Antivirus
    Defender
    Other Info
    TPM 2.0
Top Bottom