Upgading OS in a VHD.


  1. Posts : 15,484
    Windows10
       #1

    Upgading OS in a VHD.


    I know that you cannot upgrade OS in a VHD without importing VHD into Hyper-V.
    @Kari showed a way of doing this with mbr format, but I would prefer using UEFI.

    This means the vhd also needs an EFI partition in the vhd.

    This set me thinking. The efi partition does not need to be on same drive as the OS as we know.

    So I am thinking, I could install EFI on one vhd, and OS on another and it should boot in the vm? May need to use Macrium Reflect Fix boot problems link..

    This is a more academic question but it does mean if have a vhd without the EFI partition, I do not have to mess around adding efi partition to vhd?
      My Computer


  2. Posts : 4,580
    several
       #2

    Use vhdx
      My Computer


  3. Posts : 4,143
    Windows 3.1 to Windows 11
       #3

    Set your Boot Partition to USB and then point to VHD

    Fat32 USB drive letter=S
    Mount - VHD drive letter= V

    Code:
    Bcdedit v:\windows /s s: /f uefi
    Code:
    Bcdboot v:\windows /s s: /f uefi
    EDIT: used wrong bcd command
    Last edited by Kyhi; 24 Sep 2018 at 07:38.
      My Computer


  4. Posts : 15,484
    Windows10
    Thread Starter
       #4

    Kyhi said:
    Set your Boot Partition to USB and then point to VHD

    Fat32 USB drive letter=S
    Mount - VHD drive letter= V

    Code:
    Bcdedit v:\windows /s s: /f uefi
    I get this - I do not want to use a usb. I can add efi to my vhdx with OS for sure to boot it in hyper-V but just thought I could have a tiny separate vhdx file containing the efi. It works on physical disks, so should work in hyper-V?

    I will try it later.
      My Computer


  5. Posts : 15,484
    Windows10
    Thread Starter
       #5

    SIW2 said:
    Use vhdx
    I do use vhdx - what are you saying?
      My Computer


  6. Posts : 5,478
    2004
       #6

    cereberus said:
    I get this - I do not want to use a usb. I can add efi to my vhdx with OS for sure to boot it in hyper-V but just thought I could have a tiny separate vhdx file containing the efi. It works on physical disks, so should work in hyper-V?

    I will try it later.
    It should work - your EFI partition can be on same disk, another disk, a USB key or SD card - anywhere. You can even put several on the same disk if you want. Normally your firmware will boot the first it finds.

    It would probably be easier to shrink your vhd by 100MB and stick an EFI partition on the end. Then boot into and upgrade in Hyper-V. You could then either delete it or leave it as native booting it will be ignored.
      My Computer


  7. Posts : 15,484
    Windows10
    Thread Starter
       #7

    lx07 said:
    It should work - your EFI partition can be on same disk, another disk, a USB key or SD card - anywhere. You can even put several on the same disk if you want. Normally your firmware will boot the first it finds.

    It would probably be easier to shrink your vhd by 100MB and stick an EFI partition on the end. Then boot into and upgrade in Hyper-V. You could then either delete it or leave it as native booting it will be ignored.
    Sure, adding it to end is easy enough but I was more interested as a way of quickly adding a vhd to hyper-v without it - was more of an academic question really.
      My Computer


 

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 03:59.
Find Us




Windows 10 Forums