Changing boot order from CD to IDE during Hyper-V installation



  • I'm running pfsense on a 2012 R2 hyper-v server. It's not possible to change boot order from CD to IDE without shutting down the VM. Is there any way to shutdown / halt pfsense immediately before the reboot to change the boot order? I've been halting immediately before the reboot, but this seems to be somewhat inelegant. It would be useful if there was an option to enter "h" during the short period before the reboot to enable changing boot order.



  • I just "ejected" the image when the vm BIOS loads.
    Otherwise just shutdown as soon as the vm reboots, worked for me.



  • I would script this in powershell

    stop-VM -Name TestVM
    get-VM TestVM | Set-VMBios -StartupOrder @("IDE","CD","LegacyNetworkAdapter","Floppy")
    start-VM -Name TestVM



  • @maddogthesahr:

    I just "ejected" the image when the vm BIOS loads.
    Otherwise just shutdown as soon as the vm reboots, worked for me.

    The iso file is mounted as a virtual CD. There is no eject button. Changing boot order and "removing" the virtual CD are both disabled while the vm is running. It must be halted. Since it can't be halted from the installer, the only way to halt it is from the hyper-v manager.

    Update: Was just looking again and noticed that it seems to be possible to set the media to none while the vm is running. I'll try that next time I do an install.



  • @gjaltemba:

    I would script this in powershell

    stop-VM -Name TestVM
    get-VM TestVM | Set-VMBios -StartupOrder @("IDE","CD","LegacyNetworkAdapter","Floppy")
    start-VM -Name TestVM

    I'll try that. Thanks for the idea. Doesn't really solve the problem, but it's bit quicker than doing it manually.



  • @bimmerdriver:

    @maddogthesahr:

    I just "ejected" the image when the vm BIOS loads.
    Otherwise just shutdown as soon as the vm reboots, worked for me.

    The iso file is mounted as a virtual CD. There is no eject button. Changing boot order and "removing" the virtual CD are both disabled while the vm is running. It must be halted. Since it can't be halted from the installer, the only way to halt it is from the hyper-v manager.

    Update: Was just looking again and noticed that it seems to be possible to set the media to none while the vm is running. I'll try that next time I do an install.

    I tried the "none" setting. When I applied it, there was an error saying that the media was locked. Unfortunately, there doesn't seem to be a clean way to dismount the CD or change the boot order. It appears the only clean way to do this is for there to be a halt option along with the reboot.



  • I tried this again and for the life of me, I can't convince hyper-v to dismount the CD with the vm running. The "none" setting can be changed, but as soon as it's applied, there is an error. I tried to dismount the CD during the shutdown phase of the reboot. Any later and it's already booting again from the CD.

    FWIW, windows 10 handles this in a very elegant way. Even if the VM is set to boot from the CD, immediately when it boots, there is a message, "press any key to boot from the CD". Otherwise, it boots from the IDE.

    UPDATE: I tried again. This time, I applied the "none" setting after the reboot started, during the short interval when the screen is completely black. It worked.



Log in to reply