New
#1
Running several versions of Windows from the SAME VM config
Hi folks
@sat2022
Delving a little more into VHDX files (Physical ones) it seemed to me that if you want to run various builds of Windows on essentially the same PC as Virtual machines - there's no reason why the Virtual machine boot couldn't offer the boot choice of these Virtual machines Note you can't run them all simultaneously - for that you will need a config file for each virtual machine.
So ONE virtual machine definition gives you choice at start up of what Windows build you want to boot .
Voila !!!!
So I'm using a Linux Host and running KVM/QEMU as the virtual machine sofware
So what you do is : (assuming you;ve installed KVM/QEMU and it's working. This is a Windows 10 forum so google if you aren't sure about installing KVM and enabling networking between HOST and VM.
1) obtain the windows ISO for the windows build you want to install
2) create a virtual machine with say 200GB of HDD space (I'm using an external SSD device but any will do -- my Windows VM's are around 45 GB each so enough for 4 systems on this disk). Only do this ONCE !!!.
3) start VM by booting t the ISO ->repair windows->command mode
4) now prepare the HDD -- std windows commands -- you are automatically in Windows Admin / elevated mode
Diskpart
select disk xxx
clean
convert gpt
create partition efi size=100
format fs=fat32
assign letter=S
create partition msr size=128
create partition primary
format fs=ntfs quick
list disk
select disk xx where xx is the complete "big disk"
assign letter=g (unless letter is assigned automatically)
now create vhdx files for each windows system you want to install
create vdisk file=g:\W10.VHDX maximum=50000 type=fixed
attach vdisk
list disk
select disk=yyy where yyy is the "vdisk" just attached and create single std partition - no efi or anything needed
create partition primary
format fs=ntfs quick
assign letter=w
exit.
Now install Windows on it -- assume the iso is mounted on E and assuming the image file is nr 1 (check though via) imageinfo if you have more than 1 image
dism /Apply-Image /ImageFile:e:\sources\install.wim /index:1 /ApplyDir:w:\
after that completes you need to apply the boot loader
cd w:\windows\system32
cd w: to ensure the bcdboot command is run from the windows system you want to install
bcdboot w:\windows /s S: /f UEFI
exit
shut down the VM, switch boot from ISO image to the HDD and boot
you should then boot into the default Windows build if only one file, otherwise you'll see the boot choices as per standard windows.
Note the actual "Physical" disk on the HOST doesn't need itself to be formatted GPT - in fact better not to. The "Big Virtual disk" needs an EFI partition (and will work even if the HOST is a MBR only machine).
note for secure boot (Windows 11) and efi generally in the VM install package edmk on the host.
If you download the latest virtio drivers just install them on the GUEST - note the latest version also has W11 drivers too.
Incidentally if you add another partition to the "Big Disk" there's no reason why you can't also use GRUB to boot Linux VM's as well.
I only use this for Windows VM's -- works brilliantly IMO. One VM config for all those Windows builds -- just change / add / delete the vhdx files as per choice.
Have fun !!
Cheers
jimbo
Last edited by jimbo45; 23 Jan 2022 at 09:38. Reason: added screenshot of Windows multiboot with inVM