Restoring of KVM guest from RAW

netbone

Member
Feb 5, 2009
93
0
6
Hello!

One of my server has crashed, but I have a copy of the RAW-File from my KVM guest.

Now I have transfered the RAM-File to a new server:

-rw-r--r-- 1 root root 536870912000 Jan 30 20:18 vm-104-disk-1.raw

How can I start the KVM guest now on the new server with these RAW-File?

Thank you.
 
Well
I would do it in the following way:

create a new vm (KVM) with the same data as your old one. And create a Harddisk.

If your Harddiskimage was on the local storage, just go to the hardware tab, delete the harddisk that you created and choose your old one as harddisk.

If your harddisk image was on a SAN or NAS, make a

dd if=<your raw file> of=/dev/pve1/<image that you created for new VM> bs=1024k
 
I tried, but I can't enter the hardware section. Every time I try to edit hardware options (for a running or for the crashed VM) I get an error pointing to the IP of the crashed engine. When I click on master on hardware the error occours for the crashed and not running VM .6 as you see in the following lines. So I can't edit anything on the hardware tab for any VM:



https://yyy.xxx.230.175/qemu/2-181/hardware.htm

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root and inform them of the time the error occurred, and anything you might have done that may have caused the error.
[4012]ERR: 24: Error in Perl code: command '/bin/mount -t nfs yyy.xxx.230.6:/mnt/storage/ /mnt/pve/main' failed with exit code 32

Apache Embperl 2.2.0 [Tue Feb 2 09:24:41 2010]
 
I tried, but I can't enter the hardware section. Every time I try to edit hardware options (for a running or for the crashed VM) I get an error pointing to the IP of the crashed engine. When I click on master on hardware the error occours for the crashed and not running VM .6 as you see in the following lines. So I can't edit anything on the hardware tab for any VM:



https://yyy.xxx.230.175/qemu/2-181/hardware.htm

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, root and inform them of the time the error occurred, and anything you might have done that may have caused the error.
[4012]ERR: 24: Error in Perl code: command '/bin/mount -t nfs yyy.xxx.230.6:/mnt/storage/ /mnt/pve/main' failed with exit code 32

Apache Embperl 2.2.0 [Tue Feb 2 09:24:41 2010]

is the NFS server online?
 
No. The NFS is not online, because the NFS was crashed and that's the VM I want to restore ;)
 
No. The NFS is not online, because the NFS was crashed and that's the VM I want to restore ;)

edit the /etc/qemu-server/VMID.conf file (remove the line where the virtual disk is specified)

also, take a look on /etc/pve/storage.cfg (remove the lost NFS server, on all nodes)
 
Thanks Tom. That works well. I can now edit the hardware settings and the engine has booted. :D

Now I can start reconfigure my FREENAS VM.