[SOLVED] How to clone a Raspberry sdcard onto a new VM

Sceletus

Member
Jun 15, 2020
2
0
6
61
I have a couple of Raspberry not using gpio at all. I would like to virtulize it on Proxmox.
What should I do if this is possible?

Thanks in advance.

Patrice
 
hi,

firstly create a raw image of the sdcard (using dd for example)
example: dd if=/path/to/sd/device of=sdcard.raw status=progress

and then use qemu-img tool to convert raw image to qcow2:
qemu-img convert -f raw -O qcow2 /path/to/your/hdd/sdcard.raw /path/to/your/hdd/sdcard.qcow2

afterwards you willl be able to use the qcow2 disks by attaching it to a VM
 
  • Like
Reactions: tdoubleb
you're welcome. if the solution worked please mark the thread as [SOLVED] so others can know what to expect :)
 
hi,

firstly create a raw image of the sdcard (using dd for example)
example: dd if=/path/to/sd/device of=sdcard.raw status=progress

and then use qemu-img tool to convert raw image to qcow2:
qemu-img convert -f raw -O qcow2 /path/to/your/hdd/sdcard.raw /path/to/your/hdd/sdcard.qcow2

afterwards you willl be able to use the qcow2 disks by attaching it to a VM
I am following this solution but the converted & imported HW is not booting
 
Raspberry Pi is ARM based. As far as I know PVE only virtualizes x86 or AMD64 hardware. So you would also have the problem that non of your software would work anyway because they were compiled for ARM hardware. So should be fine to look at the files or run some bash/python scripts but it won't boot.
 
Last edited:
Raspberry Pi is ARM based. As far as I know PVE only virtualizes x86 or AMD64 hardware. So you would also have the problem that non of your software would work anyway because they were compiled for ARM hardware. So should be fine to look at the files or run some bash/python scripts but it won't boot
Yes - you are 100% right.
 
hi,

firstly create a raw image of the sdcard (using dd for example)
example: dd if=/path/to/sd/device of=sdcard.raw status=progress

and then use qemu-img tool to convert raw image to qcow2:
qemu-img convert -f raw -O qcow2 /path/to/your/hdd/sdcard.raw /path/to/your/hdd/sdcard.qcow2

afterwards you willl be able to use the qcow2 disks by attaching it to a VM
Yes - you are 100% right.
should I attach it as SATA / SCASI or IDE?
 
should I attach it as SATA / SCASI or IDE?
that depends, but SCSI should be a safe bet generally. if it won't work you can always try IDE
 
hi,

firstly create a raw image of the sdcard (using dd for example)
example: dd if=/path/to/sd/device of=sdcard.raw status=progress
Hi, that interests me too Or two three RPI4s and I'd be happy to convert Ri4 systems to VMs on ProxMox so maybe I can run more raspian on a single Rpi4 or I would be happier if we could also ewmulate it to start on x86 servers I don't know this dd how to use it ? I could raw the RPI4 sd by removing sd and creating the raw with HDDRawCopy1.10Portable or not good Is it possible to convert also raspian img to convert it as disk seen by ProxMox ?
 
Hello everyone, I own a raspberry pi4b 8GB with a 64gb sd card and it is working as a little mule/nas storage with a 500gb HDD USB 3.0. Because i recently discovered proxmox was possible to be installed in pi with pimox, i have got another sd card and flashed this system, now I do want to get the original OS be virtualized into proxmox, i did already image the sdcard into raw, but i am having issues in configuring the VM itself, also made a conversion to qcow2, my VM doesnt boot, stuck at 25% cpu usage and 30MB RAM usage
UPDATE as soon as i posted this lol, https://i.imgur.com/v8i0SdH.png managed to boot by changing the BIOS to UEIF mode but im stuck here. I know that pi SD Card has 2 partitions, one being bootfs and the other one is rootfs. How can i solve this? What do i have to do with the disk?
 
Last edited:
As far as I understand running VMs on Pimox is a bad idea, as you can't enable "KVM hardware virtualization" as ARM SoCs doens't support that, so performance should be terrible.
 
Hello everyone, I own a raspberry pi4b 8GB with a 64gb sd card and it is working as a little mule/nas storage with a 500gb HDD USB 3.0. Because i recently discovered proxmox was possible to be installed in pi with pimox, i have got another sd card and flashed this system, now I do want to get the original OS be virtualized into proxmox, i did already image the sdcard into raw, but i am having issues in configuring the VM itself, also made a conversion to qcow2, my VM doesnt boot, stuck at 25% cpu usage and 30MB RAM usage
UPDATE as soon as i posted this lol, https://i.imgur.com/v8i0SdH.png managed to boot by changing the BIOS to UEIF mode but im stuck here. I know that pi SD Card has 2 partitions, one being bootfs and the other one is rootfs. How can i solve this? What do i have to do with the disk?
I too have the same error it stays in the shell and nothing starts I hope someone can help us1677147789259.png
 
As far as I understand running VMs on Pimox is a bad idea, as you can't enable "KVM hardware virtualization" as ARM SoCs doens't support that, so performance should be terrible.
Pi4 is capable of KVM virtualization, they made it possible thanks to the higher RAM capacity of the board
 
Pi4 is capable of KVM virtualization, they made it possible thanks to the higher RAM capacity of the board
Ah ok. But then the VMs OS needs to be compiled for ARM CPUs to make use of KVM hardware virtualization?
 
Ah ok. But then the VMs OS needs to be compiled for ARM CPUs to make use of KVM hardware virtualization?
Yeah well, as I said already, i am trying to virtualized its own OS from the starting SD card with a NAS system in it
 

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!