How to copy\move vm disk(raw format) from already dead Proxmox 4.4

Yaroslav

New Member
Apr 28, 2017
2
0
1
39
Hi! I have Proxmox 4.4. with native "local-lvm" storage with raw virtual disks.
I need a backup plans for different emergency situation.
For example one such situation:
My server with Proxmox 4.4 can't boot(and I can't forced it).Reinstall Proxmox and restore VM's from backups is a good idea, but if the data on virtual disks has changed a lot since the last backup then this decision is not very elegant.
My question is:
1. How to reinstall proxmox and not damage virtual disks on "local-lvm" storage?
2. How to move raw virtual disks to another proxmox installation from already dead proxmox?
Please help with the decision of such recovery plan. I think this situation can happen to everyone, so the problem is urgent.
Thank you colleague!
 
Last edited:
My question is:
1. How to reinstall proxmox and not damage virtual disks on "local-lvm" storage?
Hi,
reinstall removed the "normal" local-lvm!
2. How to move raw virtual disks to another proxmox installation from already dead proxmox?
quite easy: boot an live-cd like grml, activate the lvm + network and use dd/nc for lvm-volumes and scp/rsync for raw-files to copy them to another host.
You need an copy of the configs too (make an backup of /etc/pve before, or recreate or read the wiki about pmxcfs).

Udo
 
In normal situation, proxmox can't boot by hardware issues, or, if you doing something on OS by hand.
If you have critical data on VMs, backup it frequently.

1. IMHO it not possible (without problems and underwater rocks)
2. Boot from CD/USB Debian Live resque system (like this), and after what, you can try this:

before copy logical disk of stopped VM, activate it:

vgchange -a y

gzip and transfer:
dd if=/dev/pve/vm-301-disk-1 bs=1M | gzip | ssh pve-host2 dd of=/srv/backup/storage/vm-301-disk-0.raw.gz

from lvm disk to lvm disk:
dd if=/dev/pve/vm-202-disk-1 bs=1M | ssh pve-host2 dd of=/dev/pve/vm-302-disk-1

with gzip to reduce network traffic:
dd if=/dev/pve/vm-301-disk-1 bs=1M | gzip | ssh pve-host2 'gunzip | dd of=/dev/pve/vm-301-disk-1'

And, don't attach old pve system HDD to new pve system without rename VG, if you don't want some adventures with LVM.
 
  • Like
Reactions: BeWu and Yaroslav

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!