is there a way to convert Physical Machine to VM in 2021


Recommended Posts

hi i read article from 2016 on here ppl wanted it done but couldnt

 

but is there a way to setup a Windows machine then i run a program to convert it to a Unraid  img file to read in VM.  

 

i still having issues trying to get VMs to work right for X570 board..  but id like to least convert  my setup to a VM  so i have a template for later  or backup 

Link to comment
6 minutes ago, comet424 said:

hi i read article from 2016 on here ppl wanted it done but couldnt

 

but is there a way to setup a Windows machine then i run a program to convert it to a Unraid  img file to read in VM.  

 

i still having issues trying to get VMs to work right for X570 board..  but id like to least convert  my setup to a VM  so i have a template for later  or backup 

 

From minute 12:30

Basically it's a single qemu-img convert to convert the physical disc to a raw image file.

  • Like 1
Link to comment

ok thanks..  i still havent got an answer for getting a clean VM  without unraid crashing...  so i figured i wanted to try 

as no one answered my questions so i guess X570 boards are incapable without crashes

 

so i figured i wanted to try a reversal  from a physical machine   then VM it  to see if i get the same problems

as i wanted to have a Gaming maching and a Daily driver.. but i have gotten virus's that bypassed windows defender  from legitment searchs on google and i tired my windows get buggereed up.. so i wanted a vm   but 

it just doesnt like AMD  maybe

so hopefully video will help  its a try.. other then that i guess i should had a Intel lol

but thanks for the help so far 🙂 i appreciate it it and the quick reply so ill look it up now

 

 

Link to comment
1 hour ago, comet424 said:

ok thanks..  i still havent got an answer for getting a clean VM  without unraid crashing...  so i figured i wanted to try 

as no one answered my questions so i guess X570 boards are incapable without crashes

 

so i figured i wanted to try a reversal  from a physical machine   then VM it  to see if i get the same problems

as i wanted to have a Gaming maching and a Daily driver.. but i have gotten virus's that bypassed windows defender  from legitment searchs on google and i tired my windows get buggereed up.. so i wanted a vm   but 

it just doesnt like AMD  maybe

so hopefully video will help  its a try.. other then that i guess i should had a Intel lol

but thanks for the help so far 🙂 i appreciate it it and the quick reply so ill look it up now

 

 

Well, what I described and what the videos describes from minute 12:30 is how to convert a physical disk to a raw image, so to use it in a virtual machine; however you can create a virtual machine and passthrough directly the physical disk, or the controller to which it's attached.

However, I would convert the disk to an image, and use that image in the virtual machine, because in that disk there are installed all the drivers to boot from the real hardware; with a virtual machine you are emulating other hardware, so windows will need to install additional drivers, windows activation should end (change in hardware): if you are lucky windows will boot and automatically install the missing drivers, otherwise you may need to add a virtual cdrom to your vm, pointing to the iso of windows, boot from it, with the virtual disk attached, and "repair" the windows installation from the cdrom.

Take also into account how you installed windows: if windows is installed in uefi mode, choose ovmf bios for the vm, otherwise seabios, which boots legacy.

As far as machine type, I would prefer q35 over i440fx.

Edited by ghost82
Link to comment

ah ok  how do you know which to choose  seabios over ovmf  and the q35 1440fx 

 

i know i have to set up seabios  and sucks unraid doesnt let u change seabios to ovmf and vice versa   they gray it out u gotta delete the VM and start over

but i know if i do the windows ISO install i gotta do Seabios  when doing vnc  i  get these  bunch of lines of stuff and then a prompt  white and yellow text... not sure what that ever is

 

so i just learned how to dump  vbios of my 2 cards.. as i found  which no one could help me is  if i reboot in VM  it reboots unraid server  completely.. or how do u force  Keyboard to Attach always   i gotta do the detach and attach  everytime its a pain but no one had answers..  

so i figure maybe  just maybe it work better if i start from physical machine and then to the VM img  

or its a AMD Ryzn X570  problem with Vms and that intel is better 

 

so  what do you notice  seabios vs ovmf     or what do you notice  q35 vs 1440fx  as i seen ppl doing either or 

i dont even know are there beneifits etc

 

 

Link to comment
16 minutes ago, comet424 said:

ah ok  how do you know which to choose  seabios over ovmf  and the q35 1440fx 

Seabios and ovmf are two types of bios.

In general you can install an operating system in two ways: older hardware support legacy boot, newer hardware support uefi boot.

With an uefi installation an additional fat32 partition (EFI partition) is created and used to boot the operating system: this is how modern hardware works.

Seabios in a virtual machine boots legacy systems, ovmf boots UEFI systems.

If you set a virtual machine to use seabios and you install the os from scratch, the os will be installed in legacy mode, if you choose ovmf it will be installed in uefi mode.

i440fx and q35 are 2 types of chipsets: i440fx is older than q35.

The xml template differs, i440fx uses a pci-root bus 0, to which devices (virtual and vfio) are attached; to have more buses you need pci-to-pci-bridge, to which you can attach again other devices.

i440fx is better for pci devices.

q35 uses a pcie-root bus 0 (note the 'e' in 'pcie'), to which you can attach pcie devices (integrated endpoints, virtual and vfio), pcie-root-port, to have different buses, to attach again other pcie devices, pcie-expander-bus, to increase the number of available buses, and pcie-to-pci-bridge, to attach legacy pci devices.

Clicking on a button in the gui to convert from q35 to i440fx and the other way will not work, but editing manually the xml is possible: however, most of the time it's a lot faster to create a new vm pointing to the same disk and let libvirt and qemu to add all the buses automatically.

If you have modern hardware and you use passthrough you should use q35+ovmf.

Edited by ghost82
  • Like 1
Link to comment

ok learning alot now

so how do i know if i booting in UEFI on a physical machine

all i know is my Gaming/Day use computer

is 

AMD Ryzen 3700x cpu

16GB ram

Asus X570 TUF Gaming Case

with the 2 older GPU i posted in the other topic i asked helped for but no one had answers 

they AMD something

so i wanted to run Unraid on it   but i find its glitchy reason i figure i try from a real physical machine

 

and my Unraid Server 

is 

AMD Ryzen 3600 CPU

32gb ram

Asus X570 Tuf Gaming Case

LSI HBA card

Expander Card 4 port

 

so so i dont use the Expander or LSI  for vms  for my Unraid Main Server..  so it doesnt matter

 

but for my gaming   machine

both Video cards are PCIE

so i want to use Q35 and OVMF

 

but how come  when i install Windows 10 VM  from  ISO file  

i can not install windows 10  i get that screen  and i have to switch to SeaBios

and then once  i install it if i delete the VM template i can choose OVMF  or the Seabios  it will boot to both

so does that mean OVFM  will boot legacy installs then?

 

and ya i was hoping unraid would make it toggle  back and forth from Seabios to OVMF  but deletiing the VM and then re adding it only worked like that..  i even looked in the XML for Seabios  or OVMF  never oculd find it figure just change the word lol

 

but ya i have had 0 luck  installing OVMF  is it the WINDOWS10.ISO  file that could be the problem?

and how do i know my physical machine is booting  for the Asus TUF ..  i just know i changed something because it would boot from a USB  vs Windows when i setup unraid and i cant remeber what that was it was a while ago... ugh wish i remembered..

i just installed it and just worked go figure lol

but learning more   as i go along 

 

oh and can i check while in windows  if i in eufi  or standard boot up

i guess eufi is what you always want for new hardware?  same for the unraid install?

Edited by comet424
Link to comment
2 hours ago, comet424 said:

so how do i know if i booting in UEFI on a physical machine

Look with a disk utility if you have the EFI partition, if you have it you are booting uefi, if it's not you are booting legacy.

There are also other ways to check uefi vs legacy, see here for example:

https://www.tenforums.com/tutorials/85195-check-if-windows-10-using-uefi-legacy-bios.html

 

2 hours ago, comet424 said:

i can not install windows 10  i get that screen  and i have to switch to SeaBios

Which screen?

2 hours ago, comet424 said:

and then once  i install it if i delete the VM template i can choose OVMF  or the Seabios  it will boot to both

so does that mean OVFM  will boot legacy installs then?

Not clear sorry, I'm not a master in english language :D but your english is very difficult to understand, at least for me ahah

ovmf cannot boot legacy: ovmf searches for the uefi partition, if it doesn't find it it boots to a uefi shell.

 

2 hours ago, comet424 said:

but ya i have had 0 luck  installing OVMF  is it the WINDOWS10.ISO  file that could be the problem?

If you downloaded the iso directly from microsoft, that iso is compatible with both uefi and legacy installs, if you downloaded somewhere else, maybe that's the problem.

 

2 hours ago, comet424 said:

and how do i know my physical machine is booting  for the Asus TUF ..  i just know i changed something because it would boot from a USB  vs Windows when i setup unraid and i cant remeber what that was it was a while ago... ugh wish i remembered..

This is even more cryptic, sorry but I can't decipher (need a master key to decrypt :D ), can you rephrase?

2 hours ago, comet424 said:

can i check while in windows  if i in eufi  or standard boot up

Yes, see the first link

 

2 hours ago, comet424 said:

i guess eufi is what you always want for new hardware?  same for the unraid install?

well, I would say yes, but it depends.

For example, I have 2 gpu in my system, the primary one, a very old gpu, without uefi support, dedicated to unraid, and a newer gtx titan black passed through the my mac os vm.

Since my primary gpu doesn't support uefi I need to boot my workstation in legacy mode for the bios, otherwise I have some issue with the webgui for unraid. But for my mac os vm I'm using ovmf to boot it in uefi mode.

 

Last note: there's an utility to convert a legacy install to a uefi install for windows 10, which works directly in windows. I have 2 identical workstations, both had windows 10 installed in legacy mode; on the primary workstation I used that utility to convert the install to uefi without issues.

Also note that legacy installations have the mbr partition table and to convert it to uefi that table must be converted to gpt:

https://www.windowscentral.com/how-convert-mbr-disk-gpt-move-bios-uefi-windows-10

 

Important: save all your data before eventually playing with partition tables: wrong commands can destroy all your data.

Edited by ghost82
Link to comment

sorry with my dislexia it all sounds ok to me  but not always to someone else

 

so the screen i get  ins the uefi interactive 

thats if i set it to OVMF   i get that in the VNC   on a ISO Windows 10..  now if i change it to Seabios  it will boot into the install

 

what i meant about the ovmf and seabios booting..  i can install windows 10  in seabios but if i delete the VM  keeping the vm file..   and i cant boot from OVMF.. so thats what i ment as i didnt know what was better.. but i cant install unless its seabios

 

so i guess my physical install is EFI?  since it says in diskpartition there EFI..  

 

 

what i ment about the BIOS  of the Asus TUF and the usb..    there is an option trying to remember from memory.. Fast boot legacy something.

if you set it on   You cant Boot into Linux  it disables USBs  like Part Magic, Puppy Linux wont even let you boot Unraid.. it only sees  Windows Partitions..  But  if you turn it off or something  then you can boot Puppy Linux or Unraid  from the usb..  it will see that .. its some windows thing  you have in the bios  i cant remember off hand... but thats what i ment

 

so my 2 GPUS are 

AMD Radeon HD 7700 Series

AMD Radeon HD 7900 Series

thats what windows says.. and i have troubles like i posted in the forum..  if i do a reboot with these Video cards in the Windows VM  it actualyl reboots Unraid  so it reboots teh whole thing.. and i gotta do that frigin  Detach Attach button.. everytime drives me nuts lol

so i can pass through both GPUS  but i find  Windows is glitchy  so i havent stuck with the VM.. thats why i plan to do that what you mentioned i can do  convert my new windows physical Install. to a VM

 

as i want to do what i saw before you can have 2 VMS  and 1 mouse 1 Keyboar and u can slide over to the 2nd VM   and back i saw that on Linus Tech Video a year or so ago i forget but i thought thats cool..

 

and i dunno if my Video cards support UEFI...  would that be the reason maybe   when i do a reboot  it reboots unraid..

 

and you know when you make the unraid USB  you can choose UEFI  how do i know its actualyl Booting into UEFI?  as you said thats for newer hardware...  

when i was younger i was into computers and memorized things like linus did i knew so much but then i got a gf at the time lol  and father passed away then gf came an ex  but i so left myself behind in technology.. so i basiclly starting over in my 40s... so  i just relearning things

all i know is now Video cards are soooooo expensive 20 yrs ago wasnt soo bad  lol..2000 bucks for a 2080 or 3080 sutff Ray tracing etc lol

if i can get retropie to work too that be good

 

but ya  so for my cards possibly causing Windows to reboot the Entire system is frustrating i tried googling it it didnt help.. and like i posted in my other 2 posts no help  i guess i the only person that when you reboot a VM it reboots the whole system and i gotta do that damn de attach  reattach  the Keyboard.. yet  the Mouse  doesnt have to and they pluged into the same USB hub  go figure lol

 

out of my friends that we used to invent Water cooling 20 yrs ago  and case Moding etc..  they all go out of it.. and i the only one that still into computers  they all go wives  or drink lol

 

and sorry about my writting..  i do alot of run on sentences etc and i can explain it but sometimes i screw it up damn dislexia etc..  but ill have to try to proof read before i send thanks for trying so far to read what i mean 🙂

 

 

win10.PNG

win10a.PNG

Edited by comet424
Link to comment
9 hours ago, comet424 said:

sorry with my dislexia it all sounds ok to me

I'm sorry too, no problem, most of what you write is understandable :)

9 hours ago, comet424 said:

so the screen i get  ins the uefi interactive 

thats if i set it to OVMF   i get that in the VNC   on a ISO Windows 10..  now if i change it to Seabios  it will boot into the install

Ok, now I understand.

Just to make sure the settings are correct:

make sure that as soon as you start the windows virtual machine you are fast enough to access it with the built-in vnc so you can see the "press a key to boot from cd rom": without pressing a key to boot from cd rom the vm will fall back to the uefi interactive shell. Try multiple times, it can be a bit tricky, because you have to be fast enough.

Try also to press the esc key multiple times as soon as you start the vm: this will show the ovmf bios menu: go to boot maintenance manager --> boot options --> change boot order, click enter, the with the arrow keys select your cd rom and move it to the top with the + key; press f10 to save, go back with esc till the first page, then click reset.

10 hours ago, comet424 said:

i can install windows 10  in seabios but if i delete the VM  keeping the vm file..   and i cant boot from OVMF

Correct, this is normal, seabios doesn't create a EFI partition on your hard drive, when you switch to ovmf the bios cannot find the efi partition, so it doesn't know what to boot.

10 hours ago, comet424 said:

so i guess my physical install is EFI?  since it says in diskpartition there EFI

If there is an efi partition your installation is uefi.

10 hours ago, comet424 said:

what i ment about the BIOS  of the Asus TUF and the usb..    there is an option trying to remember from memory.. Fast boot legacy something.

Usually I switch off in the pc bios both fast boot and secure boot.

10 hours ago, comet424 said:

and i dunno if my Video cards support UEFI

the amd HD 7770 should not support uefi, see here:

https://www.techpowerup.com/vgabios/115032/ati-hd7770-1024-120119

It says uefi supported: no

 

And also the amd 7950 should not support uefi:

https://www.techpowerup.com/vgabios/124572/ati-hd7950-3072-120706

 

:(

 

So, most probably ovmf+gpu passthrough will not work, ovmf+vnc will work.

In a bare installation (no vm), with one of that gpu, note that the uefi installation could work: for example in my case I have several options in the bios of the pc, I can choose only the video part to operate as legacy instead of uefi, but let the other options as uefi; ovmf bios doesn't have that options.

10 hours ago, comet424 said:

as i want to do what i saw before you can have 2 VMS  and 1 mouse 1 Keyboar and u can slide over to the 2nd VM   and back

Yes, I think you are referring to "Synergy": never tried but saw a couple of videos.

10 hours ago, comet424 said:

and you know when you make the unraid USB  you can choose UEFI  how do i know its actualyl Booting into UEFI?

If you explore your unraid usb drive you can see a folder with name EFI or -EFI (with a '-' in from of EFI) :  if you see the folder "EFI" unraid boots in uefi mode.

10 hours ago, comet424 said:

all i know is now Video cards are soooooo expensive 20 yrs ago wasnt soo bad  lol..2000 bucks for a 2080 or 3080 sutff Ray tracing etc lol

gpu prices are too crazy..I would like a navi 21 or better 22, but I don0t want to spend all that money..I'm sticking with my gtx titan black which is still good for what I'm doing..

10 hours ago, comet424 said:

and sorry about my writting

Again no problem, at most if I don't understand I will ask you to rephrase again :)

 

Link to comment

sorry for delay  

so far i havent gotten into the setup fast enough keeps getting that screen i posted.. why does that screen pop up?  is there a way to slow down vm  install so i can press any key for the usb/dvd install?  its a pain  how come i dont have a problem going seabios but ovfm i do?

 

ill keep trying 

or i was thinking of doing a regular install on Bare machine and then convert it to a VM?  so   i can run 2 machines at once.. or is it really worth it???

 

so ovmf creates the efi partition and seabios doesnt.. so  windows will still boot using non efi  if there is a efi there.. just the efi offers more features basiclly is that how that works

 

ah ok ya the fast boot and secure.. what really is that.. all i know is i needed to turn it on and off to get either linux to work  or to get windows to work .. you have to flip on or off  to get either one to work..  i been out of the game for years going into bios  stuff..  so i not upto date  on what it all really means

 

what improvements do you see for gpu  efi?    

so  then i can get it to work as a seabios gpu vms  going to both cards.. i can run 2 VMS  1 video card to each vm  in a sea bios  1 with 8 gig ram other i did 6  so i had 2 gig left for unraid.

 

and i had to do that BIOS dump to work properly  it was blank screen at times.. but when i did that it works every time.. but i find  if i reboot Windows  in the VM  it reboots the whole damn  Unraid server.. so thats frigin ticking me off lol..  and i hate this  Detach attach for the keyboard thats friging frustrating i dont get it

 

and ill have to look up synergy  then as id like the 2 VMS working from my older cards and slide over from one to another..    

 

but ya i seen video cards is nuts  like come on  i need to sell my body to afford it.. and i would take forever lol

 

crazy stupid prices

 

gpu-z  frig i havent used that program in like 10 yrs  they didnt have eufi  back then  ill have to try that program

 

so basiclly  i need to run Seabios and the GPUs

 

or should i still try to install windows via OVFM and then run the Gpus with the BIOS file.

 

i just like then some help to get it to run stable  and keyboard and the rebooting issue  driving me mad

 

 

 

Link to comment

@Lex1145im no expert but can you take some screen shots..    i have it running  i just have issues with the rebooting unraid and such..

 

and what you do you mean you get a loop.. i can try to help you best i can.. but then i get to a point where im stuck with issues..  

Edited by comet424
Link to comment
14 hours ago, comet424 said:

so far i havent gotten into the setup fast enough keeps getting that screen i posted.. why does that screen pop up?  is there a way to slow down vm  install so i can press any key for the usb/dvd install?  its a pain  how come i dont have a problem going seabios but ovfm i do?

See also this:

 

I think you can start the installer from the uefi shell too.

14 hours ago, comet424 said:

so ovmf creates the efi partition and seabios doesnt.. so  windows will still boot using non efi  if there is a efi there

If there's an efi pa rtition windows boots with ovmf, if there isn't windows boots with seabios.

 

14 hours ago, comet424 said:

fast boot and secure.. what really is that

Fast boot is to boot faster but it can be a pain..it works like a sort of hibernation.

Secure boot prevents tampering of the bootloader and system files and it check digital signatures of option roms, again also this can be a pain..

So I disabled them all.

 

14 hours ago, comet424 said:

so  then i can get it to work as a seabios gpu vms  going to both cards

Exact: if you have a uefi gpu, most probably it's a hybrid firmware, that means that you can boot both with uefi and legacy (ovmf and seabios), but if the gpu doesn't support uefi you can only boot legacy (seabios).

 

14 hours ago, comet424 said:

Detach attach for the keyboard thats friging frustrating i dont get it

I don't know what's happening here..

 

14 hours ago, comet424 said:

but i find  if i reboot Windows  in the VM  it reboots the whole damn  Unraid server

Maybe related to the amd gpu reset bug: the gpu doesn't reset its state if you reboot the vm, so the whole unraid may crash.

Linux and unraid have a patch for this:

 

 

The "vendor reset" patch, but if I look here:

https://github.com/gnif/vendor-reset

there's no trace of your gpus in the supported devices table.

 

14 hours ago, comet424 said:

i need to run Seabios and the GPUs

Yes

 

14 hours ago, comet424 said:

or should i still try to install windows via OVFM and then run the Gpus with the BIOS file

No, it will not work, even if you specify the video bios path it will not support uefi.

Link to comment

@ghost82 so i struggling

i getting frustrated with it..  

i kinda got it to work for a little bit.. and rebooting in windows VM  worked only after i installed this guest-qeum  program which i saw in a space invader video 

but its not working right

 

1... i couldnt do the quem convert program when i did my windows install to a img  and added it to the VM..

all the screen says is  Booting from Hard Dirve...

 

it does nothing after that 

 

2..

i did a VM  using VNC as a template..    

and then   copied the vm twice  1. for each card..

and then i set to Seabios,  Q35,  all SATA settings,  Videocard, BIOS Video card, 

for both

 

i set the VM Managers  Flow played from Multi-function To Down stream to Both

 

nothing workds right

 

on the older card.. i  get a vertical hold issue.. like the olden days  when your picture  would just scroll up ..  and you adjusted a knob.

well its doing it too.

 

on the new/older card...    it would work then gets to windows and then went Black..

or it would boot but crash

or when starting the VM it restarts  unraid totally.

or it crash Unraid.. and disables the VM managers after the reboot you gotta turn it back to YES  

 

i have linked the 4 VFIO settings in system devices.. i checked off the 4   2 video cards and 2 sound cards 

but really doesnt it link all 4 together as 1?  

 

i tried it on and off the VFIO  i just getting frustrated..

 

is it a AMD issue.. is it a X570 issue...

in the end its almost  better not to bother doing VMS  just a 2nd computer but i wanted 2 computers  in 1..

 

least i never went the NAS/Gaming Rig..  the NAS would keep rebooting too  

so i stuck....what to do.. 

not even worth buying new cards    like Linus Tech tips wan show  showing what 2080 or so going for 1500-2000 usd so thats like 2500+ canadian for a stupid video card

dont need the best for world of warcraft lol  but i wanted an everyday user or Gaming   or a Windows 98 machine as i got games from high school days

 

Link to comment
  • 2 years later...
On 6/2/2021 at 10:47 AM, ghost82 said:

 

From minute 12:30

Basically it's a single qemu-img convert to convert the physical disc to a raw image file.

 

Thanks very much for the reference to SpaceInvader's youtube video. It was very insightful. Many thanks and all the very best during Christmas and the Holidays..

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.