Wednesday, December 08, 2021

Turn OS installed on actual physical disk into a virtual machine

Hmm... this looks like an idea...

So i was thinking of doing:
- create a VM with a VirstIO SCSI + regular virtual disk (say scsi0)
- Shell: 'qm set VM-ID -scsi1 /dev/disk/by-id/<my-transplanted-ssd-id>'
- Then from the webui, make scsi1 the VM boot device and probably get rid of the scsi0 created when the VM was created.

1) Since i don't know at all what i am doing, i would like confirmation, comments or pointers.
2) If things go side way with the old hardware running PVE, could i take the SSD, install it back on my other PC and boot from it and run happily?

Thank you in advance.

EDIT:
I did pretty much as above but used 'qm set <VM-ID> -sata0 /dev/disk/by-id/<my-transplanted-ssd-id>', made sata0 the boot device, detach&delete the scsi1 created when creating the VM. And it all seems to work fine. 

Maybe I should convert my current desktop into a Proxmox server, with my current Linux Mint installation (on a SSD) as a VM...

Or maybe create a virtual machine with enough space to copy the entire SSD's onto the virtual disk, and use Clonezilla to turn the SSD's contents into a VM. Ideas... but first, I need a new CPU with integrated graphics, because my current AMD Ryzen 5 3600 processor is on a mini-ITX motherboard that only has one PCI-E slot, so if my graphics card gets passed to a VM, the Proxmox host would be left without any video output.

Additional note: I guess one possibility is to install Proxmox with a desktop environment, then run my existing Linux Mint as a virtual machine.

No comments: