Restore a disk image ?

Sep 21, 2012
30
0
6
Hello,
i have a problem:
i have a disk-image: vm-100-disk-1.raw of an old proxmox server (2.3) - is there any possible way to restore this disk image to a VM on a new update2date node?
I dont have any way to to create a usual backup from the old proxmox server.

Thanks for your help
 
i am now copying the raw image file to a newly created VM on the new server with dd:
dd if=vm-100-disk-1.raw of=/dev/vg1/vm-101-disk-1
- the OS on that raw image format was debian squeeze
- i hope i can start the vm after the copy finishes, since this was a live system which is now offline

any help is appreciated
 
another question:
in case i cannot boot the raw image incase of corruption (the VM on the old srever was stopped without shutdown - server outtage): Can i partly recover files from that raw image?
It was a debian system running several websites, mysql db and a mailserver. thats why i need at least some of the contents.

again, thanks for any help!
 
one way to recover filesystem files could be put that .raw on pve filesystem storage (not lvm), create a dummy vm edit vm .conf to make it use that .raw disk, then boot that vm from livecd .iso, mount .raw into livecd filesystem, and move all content you need elsewhere through network.

Marco
 
Hi m.ardito,
I already found some advice from you of the same type on the forums, you recommended the grml live cd some years ago to do that. i will try that.
could you explain a little further how i would do that step: "mount .raw into livecd filesystem" - standard mount to /dev/xyz of the diskimage?

Thank you alot!
 
try something like

#modprobe nbd max_part=63
#qemu-nbd -c /dev/nbd0 vm-100-disk-1.raw

now you should have one or more nbd0* devices

try
#ls -l /dev/nbd0*

there should be devices like /dev/nbd0p1 or similar
all those are partitions on the .raw disk, and now you should be able to mount each by

#mount /dev/nbd0p1 /mnt/image

if your live cd has no qemu-nbd, IIRC what you need to get should be the package "qemu-utils".

with a debian based livecd is as simple as

#sudo apt-get install qemu-utils -y

Marco
 
Last edited:
old server is running again from power outtage...
i cannot start the vm on the old nor on the new server, seems the filesystem of the raw image file is corrupted. any advice but running fsck?
 
running fsck fixes it in so far that i can mount the vda again, but the main part of data then is "recovered" to the lost+found folder...
i guess i cannot do anything now to recover the data of the raw image file?
 
running fsck fixes it in so far that i can mount the vda again, but the main part of data then is "recovered" to the lost+found folder...
i guess i cannot do anything now to recover the data of the raw image file?
Hi,
this sounds that you have heavy trouble with you old VM?!
Was the underlaying storage corrupt?

To recover things in lost+found are only happens with strong errors (disks issues...).

You are sure to completly copying the raw disk to the new host?

Normaly copy the image; create an new VM; use the copied image for the new VM; boot - all up again (perhaps change network/udev to have the right eth0).

Udo
 

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!