Jump to content

how to dual boot and virtualize that os

Go to solution Solved by brwainer,

Just to add more wrinkles to this - Windows can be set up to boot from a VHD/VHDX - this is mainly used in WindowsToGo, but there is a supported use case to take a VHD from a VM and boot it directly on real hardware, e.g. during disaster recovery. This is sort of the opposite of what you are asking, but maybe the option will help you out in some way.

i have a windows os and want to dualboot with a linux flavor is there a way to be able to natively run the os but then in windows run it as a vm. so that way i can dualboot but if i need something i an open it as a vm. a easier way to explain this is can a vm tool boot from partition.

Link to comment
Share on other sites

Link to post
Share on other sites

I think there may be a way to do this, but I'd imagine that it would be a freaking nightmare with drivers. 

Main System: Phobos

AMD Ryzen 7 2700 (8C/16T), ASRock B450 Steel Legend, 16GB G.SKILL Aegis DDR4 3000MHz, AMD Radeon RX 570 4GB (XFX), 960GB Crucial M500, 2TB Seagate BarraCuda, Windows 10 Pro for Workstations/macOS Catalina

 

Secondary System: York

Intel Core i7-2600 (4C/8T), ASUS P8Z68-V/GEN3, 16GB GEIL Enhance Corsa DDR3 1600MHz, Zotac GeForce GTX 550 Ti 1GB, 240GB ADATA Ultimate SU650, Windows 10 Pro for Workstations

 

Older File Server: Yet to be named

Intel Pentium 4 HT (1C/2T), Intel D865GBF, 3GB DDR 400MHz, ATI Radeon HD 4650 1GB (HIS), 80GB WD Caviar, 320GB Hitachi Deskstar, Windows XP Pro SP3, Windows Server 2003 R2

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Turtleinahafshel said:

i have a windows os and want to dualboot with a linux flavor is there a way to be able to natively run the os but then in windows run it as a vm. so that way i can dualboot but if i need something i an open it as a vm. a easier way to explain this is can a vm tool boot from partition.

i don't think this is possible, VM programs tend to treat their "storage devices" as proprietary files so i can't imagine a VM could boot a real partition from a real drive. Although i can see a longwinded solution of constantly backing up your real linux partition into a VM image on a regular basis with some RAID/backup tool

Home PC:

CPU: i7 4790s ~ Motherboard: Asus B85M-E ~ RAM: 32GB Ballistix Sport DDR3 1666 ~ GPU: Sapphire R9 390 Nitro ~ Case: Corsair Carbide Spec-03 ~ Storage: Kingston Predator 240GB   PCIE M.2 Boot, 2TB HDD, 3x 480GB SATA SSD's in RAID 0 ~ PSU:    Corsair CX600
Display(s): Asus PB287Q , Generic Samsung 1080p 22" ~ Cooling: Arctic T3 Air Cooler, All case fans replaced with Noctua NF-B9 Redux's ~ Keyboard: Logitech G810 Orion ~ Mouse: Cheap Microsoft Wired (i like it) ~ Sound: Radial Pro USB DAC into 250w Powered Speakers ~ Operating System: Windows 10 Enterprise x64
 

Work PC:

CPU: Intel Xeon E3 1275 v3 ~ Motherboard: Asrock E3C226D2I ~ RAM: 16GB DDR3 ~ GPU: GTX 460 ~ Case: Silverstone SG05 ~ Storage: 512GB SATA SSD ~ Displays: 3x1080p 24" mix and matched Dell monitors plus a 10" 1080p lilliput monitor above ~ Operating System: Windows 10 Enterprise x64

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, DnFx91 said:

i don't think this is possible, VM programs tend to treat their "storage devices" as proprietary files so i can't imagine a VM could boot a real partition from a real drive. Although i can see a longwinded solution of constantly backing up your real linux partition into a VM image on a regular basis with some RAID/backup tool

this is not ideal because then if i change something in the vm it would have to reapply the image to the partition and it would be a pain to setup and maintain

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, DnFx91 said:

i don't think this is possible, VM programs tend to treat their "storage devices" as proprietary files so i can't imagine a VM could boot a real partition from a real drive. Although i can see a longwinded solution of constantly backing up your real linux partition into a VM image on a regular basis with some RAID/backup tool

I saw one time. somewhere in the depths of the internet, how to boot a real drive from a virtual machine, but I still think drivers would be a huge pain in the ass. 

Main System: Phobos

AMD Ryzen 7 2700 (8C/16T), ASRock B450 Steel Legend, 16GB G.SKILL Aegis DDR4 3000MHz, AMD Radeon RX 570 4GB (XFX), 960GB Crucial M500, 2TB Seagate BarraCuda, Windows 10 Pro for Workstations/macOS Catalina

 

Secondary System: York

Intel Core i7-2600 (4C/8T), ASUS P8Z68-V/GEN3, 16GB GEIL Enhance Corsa DDR3 1600MHz, Zotac GeForce GTX 550 Ti 1GB, 240GB ADATA Ultimate SU650, Windows 10 Pro for Workstations

 

Older File Server: Yet to be named

Intel Pentium 4 HT (1C/2T), Intel D865GBF, 3GB DDR 400MHz, ATI Radeon HD 4650 1GB (HIS), 80GB WD Caviar, 320GB Hitachi Deskstar, Windows XP Pro SP3, Windows Server 2003 R2

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Turtleinahafshel said:

this is not ideal because then if i change something in the vm it would have to reapply the image to the partition and it would be a pain to setup and maintain

exactly, never said it would be easy, but what you are trying to do is rather obscure. I don't pretend to understand unRAID but this sounds like something that could be done in that environment.

 

Home PC:

CPU: i7 4790s ~ Motherboard: Asus B85M-E ~ RAM: 32GB Ballistix Sport DDR3 1666 ~ GPU: Sapphire R9 390 Nitro ~ Case: Corsair Carbide Spec-03 ~ Storage: Kingston Predator 240GB   PCIE M.2 Boot, 2TB HDD, 3x 480GB SATA SSD's in RAID 0 ~ PSU:    Corsair CX600
Display(s): Asus PB287Q , Generic Samsung 1080p 22" ~ Cooling: Arctic T3 Air Cooler, All case fans replaced with Noctua NF-B9 Redux's ~ Keyboard: Logitech G810 Orion ~ Mouse: Cheap Microsoft Wired (i like it) ~ Sound: Radial Pro USB DAC into 250w Powered Speakers ~ Operating System: Windows 10 Enterprise x64
 

Work PC:

CPU: Intel Xeon E3 1275 v3 ~ Motherboard: Asrock E3C226D2I ~ RAM: 16GB DDR3 ~ GPU: GTX 460 ~ Case: Silverstone SG05 ~ Storage: 512GB SATA SSD ~ Displays: 3x1080p 24" mix and matched Dell monitors plus a 10" 1080p lilliput monitor above ~ Operating System: Windows 10 Enterprise x64

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Jamiec1130 said:

I saw one time. somewhere in the depths of the internet, how to boot a real drive from a virtual machine, but I still think drivers would be a huge pain in the ass. 

why?

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Turtleinahafshel said:

why?

cos a VM always wants to use it's own drivers, because all it's devices are virtual. Using real hardware drivers would make the world melt

Home PC:

CPU: i7 4790s ~ Motherboard: Asus B85M-E ~ RAM: 32GB Ballistix Sport DDR3 1666 ~ GPU: Sapphire R9 390 Nitro ~ Case: Corsair Carbide Spec-03 ~ Storage: Kingston Predator 240GB   PCIE M.2 Boot, 2TB HDD, 3x 480GB SATA SSD's in RAID 0 ~ PSU:    Corsair CX600
Display(s): Asus PB287Q , Generic Samsung 1080p 22" ~ Cooling: Arctic T3 Air Cooler, All case fans replaced with Noctua NF-B9 Redux's ~ Keyboard: Logitech G810 Orion ~ Mouse: Cheap Microsoft Wired (i like it) ~ Sound: Radial Pro USB DAC into 250w Powered Speakers ~ Operating System: Windows 10 Enterprise x64
 

Work PC:

CPU: Intel Xeon E3 1275 v3 ~ Motherboard: Asrock E3C226D2I ~ RAM: 16GB DDR3 ~ GPU: GTX 460 ~ Case: Silverstone SG05 ~ Storage: 512GB SATA SSD ~ Displays: 3x1080p 24" mix and matched Dell monitors plus a 10" 1080p lilliput monitor above ~ Operating System: Windows 10 Enterprise x64

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, DnFx91 said:

cos a VM always wants to use it's own drivers, because all it's devices are virtual. Using real hardware drivers would make the world melt

right that makes sense maybe ill try the backup and reapply method 

Link to comment
Share on other sites

Link to post
Share on other sites

 

1 minute ago, DnFx91 said:

cos a VM always wants to use it's own drivers, because all it's devices are virtual. Using real hardware drivers would make the world melt

but maybe it would be like removing and adding a device every boot so it could work

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Turtleinahafshel said:

 

but maybe it would be like removing and adding a device every boot so it could work

No, it's the fact that stuff like the GPU is virtualized. 

Main System: Phobos

AMD Ryzen 7 2700 (8C/16T), ASRock B450 Steel Legend, 16GB G.SKILL Aegis DDR4 3000MHz, AMD Radeon RX 570 4GB (XFX), 960GB Crucial M500, 2TB Seagate BarraCuda, Windows 10 Pro for Workstations/macOS Catalina

 

Secondary System: York

Intel Core i7-2600 (4C/8T), ASUS P8Z68-V/GEN3, 16GB GEIL Enhance Corsa DDR3 1600MHz, Zotac GeForce GTX 550 Ti 1GB, 240GB ADATA Ultimate SU650, Windows 10 Pro for Workstations

 

Older File Server: Yet to be named

Intel Pentium 4 HT (1C/2T), Intel D865GBF, 3GB DDR 400MHz, ATI Radeon HD 4650 1GB (HIS), 80GB WD Caviar, 320GB Hitachi Deskstar, Windows XP Pro SP3, Windows Server 2003 R2

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Turtleinahafshel said:

right that makes sense maybe ill try the backup and reapply method 

assuming there is a method, i can see the process train, but have no idea how to constantly inject OS changes into a VM image mirror of that OS.

 

I have a similar problem with clonezilla, where if i want to update an image, i have to clone that image onto a machine, make my changes, then replace the image with a new one which takes forever, i need a way to inject changes into a clone without having to put it on a machine first.

Home PC:

CPU: i7 4790s ~ Motherboard: Asus B85M-E ~ RAM: 32GB Ballistix Sport DDR3 1666 ~ GPU: Sapphire R9 390 Nitro ~ Case: Corsair Carbide Spec-03 ~ Storage: Kingston Predator 240GB   PCIE M.2 Boot, 2TB HDD, 3x 480GB SATA SSD's in RAID 0 ~ PSU:    Corsair CX600
Display(s): Asus PB287Q , Generic Samsung 1080p 22" ~ Cooling: Arctic T3 Air Cooler, All case fans replaced with Noctua NF-B9 Redux's ~ Keyboard: Logitech G810 Orion ~ Mouse: Cheap Microsoft Wired (i like it) ~ Sound: Radial Pro USB DAC into 250w Powered Speakers ~ Operating System: Windows 10 Enterprise x64
 

Work PC:

CPU: Intel Xeon E3 1275 v3 ~ Motherboard: Asrock E3C226D2I ~ RAM: 16GB DDR3 ~ GPU: GTX 460 ~ Case: Silverstone SG05 ~ Storage: 512GB SATA SSD ~ Displays: 3x1080p 24" mix and matched Dell monitors plus a 10" 1080p lilliput monitor above ~ Operating System: Windows 10 Enterprise x64

Link to comment
Share on other sites

Link to post
Share on other sites

6 minutes ago, DnFx91 said:

i don't think this is possible, VM programs tend to treat their "storage devices" as proprietary files so i can't imagine a VM could boot a real partition from a real drive. Although i can see a longwinded solution of constantly backing up your real linux partition into a VM image on a regular basis with some RAID/backup tool

theoretically a bootloader could mount the HDD at boot and load the virtual hard drive file, but that's theoretically - I don't think something exists like that in practice. 

idk

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Turtleinahafshel said:

You can try whatever that is, then. 

Main System: Phobos

AMD Ryzen 7 2700 (8C/16T), ASRock B450 Steel Legend, 16GB G.SKILL Aegis DDR4 3000MHz, AMD Radeon RX 570 4GB (XFX), 960GB Crucial M500, 2TB Seagate BarraCuda, Windows 10 Pro for Workstations/macOS Catalina

 

Secondary System: York

Intel Core i7-2600 (4C/8T), ASUS P8Z68-V/GEN3, 16GB GEIL Enhance Corsa DDR3 1600MHz, Zotac GeForce GTX 550 Ti 1GB, 240GB ADATA Ultimate SU650, Windows 10 Pro for Workstations

 

Older File Server: Yet to be named

Intel Pentium 4 HT (1C/2T), Intel D865GBF, 3GB DDR 400MHz, ATI Radeon HD 4650 1GB (HIS), 80GB WD Caviar, 320GB Hitachi Deskstar, Windows XP Pro SP3, Windows Server 2003 R2

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Turtleinahafshel said:

oh boy......... manual GRUB configuration lol

 

i'm out

Home PC:

CPU: i7 4790s ~ Motherboard: Asus B85M-E ~ RAM: 32GB Ballistix Sport DDR3 1666 ~ GPU: Sapphire R9 390 Nitro ~ Case: Corsair Carbide Spec-03 ~ Storage: Kingston Predator 240GB   PCIE M.2 Boot, 2TB HDD, 3x 480GB SATA SSD's in RAID 0 ~ PSU:    Corsair CX600
Display(s): Asus PB287Q , Generic Samsung 1080p 22" ~ Cooling: Arctic T3 Air Cooler, All case fans replaced with Noctua NF-B9 Redux's ~ Keyboard: Logitech G810 Orion ~ Mouse: Cheap Microsoft Wired (i like it) ~ Sound: Radial Pro USB DAC into 250w Powered Speakers ~ Operating System: Windows 10 Enterprise x64
 

Work PC:

CPU: Intel Xeon E3 1275 v3 ~ Motherboard: Asrock E3C226D2I ~ RAM: 16GB DDR3 ~ GPU: GTX 460 ~ Case: Silverstone SG05 ~ Storage: 512GB SATA SSD ~ Displays: 3x1080p 24" mix and matched Dell monitors plus a 10" 1080p lilliput monitor above ~ Operating System: Windows 10 Enterprise x64

Link to comment
Share on other sites

Link to post
Share on other sites

You can run a VM as a direct bootable OS, without the need to boot into your host OS, but not the other way around. The feature is built right into the Pro version of the OS. All you need to do is head over to disk management and click on  Action and select "Attach a VHD". It only works with Windows Virtual Hard Disk, so when you create a VM, make sure to select VHD as your drive format.

Intel Xeon E5 1650 v3 @ 3.5GHz 6C:12T / CM212 Evo / Asus X99 Deluxe / 16GB (4x4GB) DDR4 3000 Trident-Z / Samsung 850 Pro 256GB / Intel 335 240GB / WD Red 2 & 3TB / Antec 850w / RTX 2070 / Win10 Pro x64

HP Envy X360 15: Intel Core i5 8250U @ 1.6GHz 4C:8T / 8GB DDR4 / Intel UHD620 + Nvidia GeForce MX150 4GB / Intel 120GB SSD / Win10 Pro x64

 

HP Envy x360 BP series Intel 8th gen

AMD ThreadRipper 2!

5820K & 6800K 3-way SLI mobo support list

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Droidbot said:

theoretically a bootloader could mount the HDD at boot and load the virtual hard drive file, but that's theoretically - I don't think something exists like that in practice. 

thats a good idea ill try that also

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, NumLock21 said:

You can run a VM as a direct bootable OS, without the need to boot into your host OS, but not the other way around. The feature is built right into the Pro version of the OS. All you need to do is head over to disk management and click on  Action and select "Attach a VHD". It only works with Windows Virtual Hard Disk, so when you create a VM, make sure to select VHD as your drive format.

yes i knew that but i is not the most helpful thing every

Link to comment
Share on other sites

Link to post
Share on other sites

i realized hyper v has a real disk feature that lets you install a os to a real disk and you can boot from it but the catch is you have to put it offline so i i set up the grub to boot from that disk then i could work. but can hyper v use linux

Link to comment
Share on other sites

Link to post
Share on other sites

Just to add more wrinkles to this - Windows can be set up to boot from a VHD/VHDX - this is mainly used in WindowsToGo, but there is a supported use case to take a VHD from a VM and boot it directly on real hardware, e.g. during disaster recovery. This is sort of the opposite of what you are asking, but maybe the option will help you out in some way.

Looking to buy GTX690, other multi-GPU cards, or single-slot graphics cards: 

 

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, brwainer said:

Just to add more wrinkles to this - Windows can be set up to boot from a VHD/VHDX - this is mainly used in WindowsToGo, but there is a supported use case to take a VHD from a VM and boot it directly on real hardware, e.g. during disaster recovery. This is sort of the opposite of what you are asking, but maybe the option will help you out in some way.

no thanks you this is exactly what i wanted ill try it

Link to comment
Share on other sites

Link to post
Share on other sites

I've been wanting to be able to do something similar for a while, just haven't made any real effort to get it working.  For example, I might want to boot Windows & virtualize Linux simultaneously, or boot the same Linux & virtualize the same Windows.

 

One thing I've thought would be interesting would be a very lightweight bare-metal hypervisor, like a mini lightweight OS strictly for virtualization.  It would be light enough to only need a few hundred kHz of CPU, a few dozen kb of RAM, and use a couple hundred kb of storage on its own, leaving the rest of the resources for the guest OSs.

 

A while ago I was looking up those hypervisors, and none really met my needs.  Either they cost money, or they take too much system resources (maybe requiring a 1 GHz CPU & 1 GB RAM or something, I'd prefer it only take 0.000000001% of a 4790K + 32GB RAM), or they require a host OS, or other things. :/

 

While I think it should support VHDs & other virtual drives, I'd prefer it mostly use native OS installs as guests.  (Save the VHDs for ones that aren't natively supported by the hardware.)

Link to comment
Share on other sites

Link to post
Share on other sites

I remember seeing this a long time ago in either the arch wiki or forum but I can't find it. all I can find is migrating a native install to vm. 

I think if I were to do it now I would just setup windows in a xen hypervisor

             ☼

ψ ︿_____︿_ψ_   

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×