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


SpaceInvaderOne

21 posts in this topic Last Reply

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 post

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 post

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 post
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 post
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 post
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 post
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 post
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 post
  • 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 post

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 post

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 post
  • 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 post
  • 4 months later...

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?

Link to post
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 post

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 post
  • 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 post
  • 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 post
  • 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 post
  • 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 post

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.