VM Triple boot Windows and Linux from SAME VM


jimbo45

Well-known member
Power User
VIP
Local time
2:02 AM
Posts
1,470
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Hi folks
Adding on to booting different releases of Windows from a SINGLE VM you can also boot a different OS also from the same VM

so as before create the original VM with a large disk, EFI, MSR, and large enough NTFS partition for your Windows systems
Install all Windows systems FIRST.

Restart the VM :
Boot windows install ISO / WINPE / Stand alone partition manager to create extra partitions for the 2nd OS -- assume LINUX.
Reboot with Linux install ISO and install -- install GRUB to the EFI partition -- the one on the main disk - don't create any EFI partitions on the extra partitions you define for the Linux VM. (see your Linux distro install instructions on Linux install)

Now reboot and select the bottom of the screen and using the extra options you'll see GRUB - this will then boot your Linux distro.

So from one single VM you can boot totally different OS'es. For backup of Windows just either save the vmdx files or run Macrium from within the VM (or equivalent) For Linux just boot up a Linux install iso and save the partitions (usually / (root) and /home are sufficient - you don't need a separate /boot partition normally.

For new installs of Windows simply use dism /APPLY-IMAGE and update the boot manager / create a new vhdx file if you want to add another Windows installation, for Linux install, including grub.

I haven't been able yet to make this work on a WINDOWS HOST with VMWare - it might be possible with HYPER-V --- anybody tried it yet.

No problem though with KVM on Linux host

It seems that the edmk virtual boot manager can pass control to the boot manager on the EFI partition which then shows the classic Windows boot menu (assuming more than one OS). I think the VMWare boot manager isn't written in that way but maybe someone can have a go with it on a WINDOWS Host.

IMO doing this makes managing VM's a lot simpler -- one VM for triple, quadruple etc boot and essentially running on native I/O it's much more performance snappy than "Classical methods" creating a different VM for each system.

Cheers
jimbo
 

My Computer

System One

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

cereberus

Well-known member
Power User
VIP
Local time
3:02 AM
Posts
1,691
OS
Windows 10 Pro + others in VHDs
Why on earth would you put multiple OSs in a single vhd requiring you to have multiple partitions in that vhd!

Far easier to just have a single vhd per OS and add a boot entry to the primary vm that contains the required bcd. There is no (reasonable) limit to how many vhds you attach to a hyperV vm.

With multiple dynamically expanding vhds, you will minimise storage space.

Also, if separate, if one installation gets corrupted, it does not affect the other vms (other than a minor bcd boot tidy up needed.

Also, it gets confusing when you refer to vms when you mean vhds. VM is the virtual equivalent of pc, vhd is virtual equivalent of a drive that you attach to vm.
 

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

jimbo45

Well-known member
Power User
VIP
Thread Starter
Local time
2:02 AM
Posts
1,470
Location
Hafnarfjörður IS
OS
Windows XP,7,10,11 Linux Arch Linux
Why on earth would you put multiple OSs in a single vhd requiring you to have multiple partitions in that vhd!

Far easier to just have a single vhd per OS and add a boot entry to the primary vm that contains the required bcd. There is no (reasonable) limit to how many vhds you attach to a hyperV vm.

With multiple dynamically expanding vhds, you will minimise storage space.

Also, if separate, if one installation gets corrupted, it does not affect the other vms (other than a minor bcd boot tidy up needed.

Also, it gets confusing when you refer to vms when you mean vhds. VM is the virtual equivalent of pc, vhd is virtual equivalent of a drive that you attach to vm.
Hi there
I explained it badly.

I have a SINGLE HDD with a load of vhdx files in it and boot entries for the VM's in the efi boot file. If one vhdx gets corrupted etc - just delete it, re-create if required and update bcdboot.

Problem with HYPER-V it doesn't like booting Linux VM's either from the main bcdboot file from the same VM that windows is in unless you mess around with something like this which gets messy. :

There's 2 windows boot options since I'm running the boot from an external HDD. So one for the internal HDD and one for the external HDD. When running totally from the internal HDD there's only the single boot manager entry which can boot as many VHDX files as required. As for storage saving etc - moot point whether to "dynamically expand" or use fixed storage. I've got a whole slew of SSD's so storage space isn't really an issue and it avoids defragmentation on VM storage.
Screenshot_20220124_143041.png

The object of the exercise is to get to this : FROM WITHIN the VM.

boot.png

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
Top Bottom