** VIDEO GUIDE How to dual boot baremetal windows and unRAID then boot the same windows as a vm **


Recommended Posts

This video is a tutorial on how to dual boot a bare metal windows 10 with unRAID. Then when in unRAID being able to run the same windows install as a VM. Often windows will not like being installed as bare metal and a VM due to its activation on the physical and virtual hardware. However, if we copy the UUID from the bare metal install and then use that in the VM xml then activation isn't a problem.

Hope its useful!  :)

 

 

 

Link to comment

Love it!

 

Is there a way to take a backup of an existing VM that is not running on a passthrough physical disk, restore it to the physical disk, and make this magic happen without loosing all the installed apps and configurations from the current VM? Since a lot of people already have a Win10 VM configured, this would be very helpful and avoid relicensing Windows and other components. Maybe a future video?? :) 

Link to comment

Thanks @SSD  glad you liked the guide. I am not sure how it would go from VM to physical with the activation. Getting the VM from a vdisk to a physical disk would be easy but the problem is the windows would have been activated with the uuid generated by the unraid template manager. So then when loaded as bare metal the uuid would then be from the MB. So it would need to be activated again then the uuid copied back from bare metal to the VM XML. I am not sure if windows would allow the activating with the new uuid from the bare metal. I will have a go sometime and see what happens...

Edited by gridrunner
Link to comment
21 hours ago, gridrunner said:

Thanks @SSD  glad you liked the guide. I am not sure how it would go from VM to physical with the activation. Getting the VM from a vdisk to a physical disk would be easy but the problem is the windows would have been activated with the uuid generated by the unraid template manager. So then when loaded as bare metal the uuid would then be from the MB. So it would need to be activated again then the uuid copied back from bare metal to the VM XML. I am not sure if windows would allow the activating with the new uuid from the bare metal. I will have a go sometime and see what happens...

 

Even if there was a need for a second Windows 10 license - if one had a spare license, or was willing to purchase an OEM license (which can be had pretty inexpensively), instructions to go from VM to physical, maintaining all (most) installed apps, that might be very helpful. 

 

Something like Acronis might help. It has a way to do a backup/restore to dissimilar hardware. And if you could get the VM install restored onto the physical disk, you could follow this video to get it dual booting as a VM also.

 

I had another need that might make for a useful video although it might need a new plugin (@Squid). I would like is to be able to schedule a backup of my VM image, e.g., monthly. And unRAID would shutdown (or maybe just suspend) the VM, compress the image file, and store it to a defined path on an array disk or user share, and when done start the VM back up. If the VM were suspended, it should come up exactly as it was when the VM was taken down, and not lose data in open apps. Not sure a backup of a suspended VM would be easy to restore. Might need a suspend file to be backed up as well as the .img file for it to restore cleanly in the future? Could schedule during overnight hours and it could run very stealthily - user should not even realize it ran.

Link to comment
3 minutes ago, SSD said:

I would like is to be able to schedule a backup of my VM image

Thought about it many times, and I don't want to go there

 

  • Seems to me, there are too many "what-ifs" on shutting down / hibernating a VM in order to properly handle a backup of the vdisk.
  • KVM / QEMU does support snapshots, so this should ultimately get integrated within unRaid itself
Link to comment
1 hour ago, Squid said:

Thought about it many times, and I don't want to go there

  • Seems to me, there are too many "what-ifs" on shutting down / hibernating a VM in order to properly handle a backup of the vdisk.

 

Certainly if the risk exceeds the benefit I would agree. Can you give a problematic use case so I can better understand the risks you see? I think with the hibernation, the risk is very low. Maybe if you are in the middle of doing a ROM update, or in the middle of downloading a file via HTTP or FTP (which would probably timeout and not resume when the VM is resumed) you could have issues. But DLs from torrents and nzbget type tools (I think these are the most common for large file download for most users) should resume just fine. And if you consider this would enable much more frequent backups than most people do (my last backup from in February as I was taking a fresh backup today for a specific purpose) which would put the user in a much better position if a corruption occurred in the VM image.

 

1 hour ago, Squid said:
  • KVM / QEMU does support snapshots, so this should ultimately get integrated within unRaid itself

 

I'm not clear that a snapshot is what is really needed here. Not the same as a backup.

Link to comment
13 minutes ago, SSD said:

Can you give a problematic use case so I can better understand the risks you see?

I've had baremetal machines that don't want to hibernate and/or shutdown under certain weird circumstances.

 

If danioj's script ever becomes foolproof and/or rock solid then that's a different story.

Link to comment
12 minutes ago, Squid said:

I've had baremetal machines that don't want to hibernate and/or shutdown under certain weird circumstances.

 

I've had this happen also. But I believe that KVM can flawlessly suspend any running VM. I haven't done it a ton of times, but have done at last 5 times, and each time worked perfectly. I confirmed that DLing files resumed when VM was resumed.

 

12 minutes ago, Squid said:

 

If danioj's script ever becomes foolproof and/or rock solid then that's a different story.

 

Thanks for the pointer to this script. I searched community applications and didn't find anything.

 

Here is the link for anyone searching.

 

 

Seems it will stop, and even force stop, a running VM. But has no logic to suspend a VM. Might be a simple change.

Link to comment
  • 1 month later...

Hi Squid and others,

 

Thank you for the great video. I followed your guide to the T and it worked fine for my secondary GPU, but because i wanted to make some room for a nic i tried doing this with my primary GPU and i ran into the dreaded code 43, even though i inputted the bios i pulled from my own card and set hyper-v to no, i booted unraid in legacy and uefi, all to no prevail.

Have you noticed this behavior on your system(s)? 

What should i do to fix this?

Thanks in advance

Link to comment

A few thoughts r.e. backing up a Windows 10 system -- regardless of whether it's bare metal or a VM ...

 

=>  There are really two different things to back up -- (a)  the actual OS, and (b)  all of your data.

 

=>  The OS doesn't really need backup very often … an image backup once/quarter (or even every 6 months) is probably fine.    This is what you need to actually restore the OS should something catastrophic happen … but if it's a few months behind all you need to do is run a couple cycles of Windows Update to get it back up-to-date.    You DO want to update the image if you make significant changes to the programs installed, but other than that it only needs to be updated a few times a year.    Given that, it's simple enough to just shut down the system and make an image (for bare metal) or copy the VHD (for a VM).    I don't see a problem with an occasional shutdown to do this; although you can also do the image from a "live imager" … such as Acronis, Image for Windows, etc.     I've been very happy with Image for Windows on my bare metal systems, but haven't tried it on a VM (too simple to just copy the VHD, so no need).    And I DO minimize activity on the system whenever I'm running the image utility (basically don't use it for anything while it's imaging).     Regardless of the reliability of modern "live imagers", I'm "old school" when it comes to creating an image -- I like the system to be completely dormant during that process.

 

=>  Your data should be backed up VERY regularly (daily or even more frequently).   But this can easily be done from within the running OS using any desired synchronization utility (e.g. SyncBack)      Doesn't require shutting down the OS or even the running apps, although depending on the utility used for the backups it may fail to backup open files (i.e. files currently being modified/created) -- but this isn't a big deal, as they'll be backed up the first time the utility runs after the file activity has been finished.

 

As long as you have an image and a current data backup, recovery is very simple:  (a)  restore the image; and (b) restore all of your current data  [If you're using SyncBack, (b) is simply a matter of running your restore profiles in "Restore" mode immediately after you've restored the image].     Then (c) do all windows updates to get the OS up-to-date.

 

 

Link to comment

A note on forcing a UUID value on virtual machines.      It's probably obvious, but in addition to allowing you to use the same license on a physical and virtual machine, this also allows you to use the VM on other hardware.    This has the BIG advantage of protecting your system from hardware failure without the need to reload anything.     If the physical machine you're running a VM on fails, just move the VM to a new system and it will run just fine -- no activation;  no programs to reinstall; etc.   

Link to comment
  • 2 weeks later...
On 7/29/2018 at 4:35 PM, garycase said:

This has the BIG advantage of protecting your system from hardware failure without the need to reload anything.     If the physical machine you're running a VM on fails, just move the VM to a new system and it will run just fine -- no activation;  no programs to reinstall; etc.   

 

I did a server update update and was able to move my Windows VM over and it ran perfectly.

 

But the VM was setup for on the old 4 core server, and I wanted to update it for my new 12 core processor. So I created a VM on the new server, and looked at its XML concerning the CPU config (topology, cores, etc.) and used that to manually edit my real VM's XML. Worked fine, but afterwards, Office 2016 complained and wanted to me to re-register. Because my licenses were OEM and tied to the machine, I had issues. Windows, also an OEM license, did not complain.

 

I was thinking that a VM would completely shield me from these types of issues as it would appear to use the same motherboard, chipset, etc., and this seems true it you don't touch its config, but you can run into licensing issues when upgrading a server and reconfiguring the VM to match your new CPU.

 

Just FYI

Link to comment
  • 4 months later...
1 hour ago, Chamzamzoo said:

Brill guide, again just what I was looking for.

 

I have a question, in your video you mention that you're keeping half the NVMe for vdisks, which I assume must be accessible by unraid?

 

When I pass through the NVMe via the vifo driver stub, I lose access to it in unraid. Am I missing something?

If you are using vdisks, then you are not passing through the nvme.    Instead you are specifying the file to be used for the vdisk.

Link to comment

In the guide SI1 said that he shrank the volume to make use of the unused space for Vdisks..

 

I don't want to use vdisks, but just wondering how he was intending to have the NVMe drive accessible to unraid while it was passed through.

 

On my system it vanishes, it's not available in unassigned drives or anywhere until you remove it from the vifo driver on the flash USB disk.

 

Not a big issue, everything works as expected. just you lose access to any of the NVMe from unraid unless you're booted into it.

Link to comment
  • 2 weeks later...

anyone have issues with out of memory errors and the Nvidia control panel not being availabe until reinstalling drivers after booting between the VM and SSD?

 

In device manager it looks like the driver has also rolled back to 388.59 from 2017 when I just (re)installed 417.35 from this december afterbooting between the SSD directly and the VM version.

 

Very odd.

 

Link to comment
  • 2 weeks later...

I have attempted to dual boot my computer setup.
I Spent an hour on the phone to get microsoft to fix my product key, I think I activated it once on a VM.... Anyways I have a 500gb SSD that is passed through unraid for my windows 10 pro.
I booted my system directly from the drive "bare metal" and activated windows, i took the UUID from cmd on my bare metal with --- wmic csproduct get UUID
Then I copy/pasted this into the XML for my windows 10 VM using the same SSD being passed through as a SATA drive.
Windows is not activated in the VM, I am hesitant to try to enter my product key while in the VM.|

What do I do?

Link to comment
  • 11 months later...

Thank you for the video. Very useful guide. I just have one tiny question : is it possible to modify the unRaid config to add the option of booting from Windows 10 Baremetal directly from the menu at the start instead of having to change in the BIOS between USB / SSD boot priority ? I've seen in another video you modified it to add a custom unraid version with isolated cores. I'd like to know if it's possible to do something similar here ?

Link to comment
  • 2 months later...

Hi,
 

Is there any solution to spin down server Hard disks when using baremetal Windows? I'm loving the silence when using vm on Unraid from SSD and HDDs spinned down. On baremetal Windows HDDs will make annoying hum at all time... HDDs are needed only as Unraid vault drives.

Link to comment
  • 1 year later...
On 6/21/2018 at 12:54 AM, SpaceInvaderOne said:

This video is a tutorial on how to dual boot a bare metal windows 10 with unRAID. Then when in unRAID being able to run the same windows install as a VM. Often windows will not like being installed as bare metal and a VM due to its activation on the physical and virtual hardware. However, if we copy the UUID from the bare metal install and then use that in the VM xml then activation isn't a problem.

Hope its useful!  :)

 

 

 

Hi Spaceinvader. First of I'm new to Unraid and started on the trail for a few days now and way before been going through -and downloaded-your videos on necessary topics I'm interested in especially VMs. You , Sir, are a God given gift! 😃. Now, onto my issue: i tried this and it worked for a minute but then the VM shuts down. The windows in on a SATA SSD. What could be the issue?

Link to comment
12 hours ago, Kich902 said:

Hi Spaceinvader. First of I'm new to Unraid and started on the trail for a few days now and way before been going through -and downloaded-your videos on necessary topics I'm interested in especially VMs. You , Sir, are a God given gift! 😃. Now, onto my issue: i tried this and it worked for a minute but then the VM shuts down. The windows in on a SATA SSD. What could be the issue?

Its very hard to say without more info. Please post the xml of the vm here. Try a different machine type ie if using i440fx try q35 and vice versa

Link to comment
On 4/12/2021 at 12:38 PM, SpaceInvaderOne said:

Its very hard to say without more info. Please post the xml of the vm here. Try a different machine type ie if using i440fx try q35 and vice versa

I figured it out; issue was the max memory allocation. Had set to 8Gb but reducing to 4Gb worked. Strange though🤔. Initial memory is set to 2Gb.

Link to comment
  • 2 months later...

Greetings SpaceInvaderOne,

First, really big fan, thank you for your contributions in the community. I've been working on creating your dual boot scenario for a week... honestly everyday for hours and hours but the windows vm never actually starts. When I start the VM(After creating the VM and then transplanting the UUID as instructed) I only see an image of the docker "thinking" with the circular arrows and the word "stopped" next to it, under the docker symbol. I've never actually seen it start up. What I'm working with: my windows copy is not activated because I copied it from a 2TB HDD to a NVME SSD and so now my UUID is 00000000-0000-0000-0000-"then a configuration of numbers and letters". So obviously I lost my activation in the transfer. So I've been using that unactivated UUID in my VM. My bios say that the NVME is in a LEGACY+UEFI boot so I don't know if that counts as UEFI or not. Because I'm trying to boot from the NVME SSD I attempted to passthrough my controller by putting "vfio-pci.ids=..........." in the syslinux configuration and after rebooting it get the error (in Fix Common Problems) the "vfio-pci.ids=.........." is not compatible with 6.9.2. I figured that was probably because the give you the option to bind it in system devices. My. controller is individual in the list so I don't need to separate it from a group. So I took it out and used that feature of the new UNRAID and it still did the exact same thing. I'm pretty new as you can probably tell but eager to learn. Thank you in advance for any help you can give.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.