Increase time to boot from a UEFI based iso in HyperV


cereberus

Well-known member
Guru
VIP
Local time
4:54 AM
Posts
5,422
OS
Windows 10 Pro + others in VHDs
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

  • OS
    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
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

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
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

  • OS
    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
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

  • OS
    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
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

  • OS
    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
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

  • OS
    Windows XP,7,10,11 Linux Arch Linux
    Computer type
    PC/Desktop
    CPU
    2 X Intel i7
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

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC
    CPU
    i3 8109U
    Motherboard
    Intel
    Memory
    16GB DDR4 @2400
    Graphics Card(s)
    Intel Iris Plus Graphics 655
    Sound Card
    Intel / Realtek HD Audio
    Monitor(s) Displays
    LG-32ML600M
    Screen Resolution
    1920x1080
    Hard Drives
    Intel SSD 250GB + Samsung QVO SSD 1TB
    PSU
    Adapter
    Cooling
    The usual NUC airflow
    Keyboard
    Logitech Orion G610
    Mouse
    SteelSeries Rival 100 Red
    Internet Speed
    Good enough
    Browser
    Chromium, Edge, Firefox
    Antivirus
    Windows Defender
  • Operating System
    CentOS 9 Stream / Alma / Rocky / Fedora
    Computer type
    Laptop
    Manufacturer/Model
    TOSHIBA
    CPU
    Intel i7 4800MQ
    Motherboard
    TOSHIBA
    Memory
    32GB DDR3 @1600
    Graphics card(s)
    NVIDIA Quadro K2100M
    Sound Card
    Realtek HD Audio
    Monitor(s) Displays
    Built-in
    Screen Resolution
    1920x1080
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 Computers

System One System Two

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Beelink SEI8
    CPU
    Intel Core i5-8279u
    Motherboard
    AZW SEI
    Memory
    32GB DDR4 2666Mhz
    Graphics Card(s)
    Intel Iris Plus 655
    Sound Card
    Intel SST
    Monitor(s) Displays
    Asus ProArt PA278QV
    Screen Resolution
    2560x1440
    Hard Drives
    512GB NVMe
    PSU
    NA
    Case
    NA
    Cooling
    NA
    Keyboard
    NA
    Mouse
    NA
    Internet Speed
    500/50
    Browser
    Edge
    Antivirus
    Defender
    Other Info
    Mini PC used for testing Windows 11.
  • Operating System
    Windows 10 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom
    CPU
    Ryzen 9 5900x
    Motherboard
    Asus Rog Strix X570-E Gaming
    Memory
    64GB DDR4-3600
    Graphics card(s)
    EVGA GeForce 3080 FT3 Ultra
    Sound Card
    Onboard
    Monitor(s) Displays
    ASUS TUF Gaming VG27AQ. ASUS ProArt Display PA278QV 27” WQHD
    Screen Resolution
    2560x1440
    Hard Drives
    2TB WD SN850 PCI-E Gen 4 NVMe
    2TB Sandisk Ultra 2.5" SATA SSD
    PSU
    Seasonic Focus 850
    Case
    Fractal Meshify S2 in White
    Cooling
    Dark Rock Pro CPU cooler, 3 x 140mm case fans
    Mouse
    Logitech G9 Laser Mouse
    Keyboard
    Corsiar K65 RGB Lux
    Internet Speed
    500/50
    Browser
    Chrome
    Antivirus
    Defender.
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

  • OS
    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
Back
Top Bottom