Copying Harddrives for KVM VM

ejc317

Member
Oct 18, 2012
263
0
16
Hi,

So we've done our testing and are at our last "trial" which is templating. We've gotten the whole dd block copy working but that method is very slow and taxing on system resources so we have been trying to just copy harddrive contents but it does not seem to take.

These are the steps that we take

1) Create VM with iSCSI storage
2) FDISK the iSCSI LV and create a partition (we did starting at 2048 to end)
3) Extract 512bytes of a KVM image and then Copy first 446 bytes of a MBR (have tried copying 2047 bytes as well)
4) KPARTX -av to open the LV
5) mkfs.ext4 on the partition created above in /dev/mapper
6) mount it to a folder
7) copy the contents of a KVM .raw image mounted to the folder above
8) unmount all

and restart server - it keeps saying "booting from hard drive and just waits ... clearly it's not seeing grub or the bootloader - anything we can do here?
 

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!