[SOLVED] Convert a physical system to a VM?

Izarduy

New Member
Dec 30, 2023
2
0
0
I am brand new to Proxmox. My goal was to have two VM's of Ubuntu on Proxmox so that I can have one as a test and the other as the existing working version I already had. So I wanted to convert the existing system to a VM. I have a Ubuntu desktop SSD that I created a .raw file of but I am confused on why I can't get it to work in a VM. I have searched for hours and I have tried multiple commands but I still can't figure out how to point the VM to the .raw file as the drive to boot from.

I followed the YT guide by ElectronicsWizardry called Converting a Physical system to a Proxmox VM. I created a VM per his instructions. I named mine UbuntuOld with a VM ID of 100. I have the working Ubuntu on a 480 GB SSD as sda and a larger 1TB HDD with Proxmox as sdb. I ran dd if=/dev/sda of=driveImage.img bs=1M then mv driveImage.img driveImage.raw

It is at this point I get confused. I assume he did nano /etc/pve/local/qemu-server/100.conf to edit the config file of the VM to add the driveImage.raw. If I edit the config file with sata1: local-lvm:100/driveImage.raw I get TASK ERROR: lvm name '100/driveImage.raw' contains illegal characters. If I use sata1: local-lvm:100-driveImage.raw I get TASK ERROR: unable to parse lvm volume name '100-driveImage.raw'

I have also tried qm disk import 100 driveImage.raw local-lvm and now I see vm-100-disk-1 but I can't figure out how to point to that with the assumption that it should work.

I remember something about "unused" but now I can't find it. I also saw where someone else posted about a similar problem but now I can't find that post.

What am I doing wrong? How can I simplify all of this? Should I just try and passthrough the SDD? How can I remove anything left over in Proxmos that I no longer need?
 
I found what I need at in the YT guide IMPORT a Virtual Machine Template (OVA, VMDK, RAW, ...) into Proxmox! by apalrd's adventures here. I had to detach what I had attached then I got unused disk again then I mounted it by double clicking on it and assigning SATA 0 . The rest was the same as the original guide.

In conclusion what I had to do different from the first YT guide is import disk with qm disk import 100 driveImage.raw local-lvm in shell then mount the disk in the GUI as just mentioned.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!