Softaculous


Topic : How to recover Deleted KVM Virtual machine


Posted By: ah.foroozani on February 11, 2019, 8:25 pm
I need to recover one of virtual machine which has been deleted last weekI have recover the logical volume that used by vm
what could do now?i don't know how to register this LV drive to a new machine
Code
ACTIVE            '/dev/VG1/vsv1090-dwqclbich2ejkutl-onlidrk6mworbknp' [100.00 GiB] inherit

Posted By: wolke on February 11, 2019, 10:27 pm | Post: 1
I never tried this but I would go and create a new vm at the same node with the exact same config. Then shutdown and replace the lv name in the vm´s xml configfile with the old one and start the vm.

Edited by wolke : February 11, 2019, 10:28 pm

Posted By: ah.foroozani on February 11, 2019, 10:31 pm | Post: 2
Quote From : wolke February 11, 2019, 10:27 pm
I never tried this but I would go and create a new vm at the same node with the exact same config. Then shutdown and replace the lv name in the vm´s xml configfile with the old one and start the vm.
where is that xml file?

Posted By: wolke on February 12, 2019, 5:14 am | Post: 3
use

Code
virsh edit vm-id

where vm-id is the VID of your dummy vm. (e.g. like v1019)

Posted By: ah.foroozani on February 12, 2019, 5:55 am | Post: 4
Quote From : wolke February 12, 2019, 5:14 am
use

Code
virsh edit vm-id

where vm-id is the VID of your dummy vm. (e.g. like v1019)

so i need to change it like this?
Code
    <disk type='block' device='disk'>
      <driver name='qemu'  cache='none' />
      <source dev='/dev/VG1/vsv1090-dwqclbich2ejkutl-onlidrk6mworbknp'/>
      <target dev='hda' bus='ide' />


Posted By: jevingala on February 12, 2019, 7:42 am | Post: 5
Hi,
You will also need to update the lv name in disks table from phpmyadmin on panel.You can identify vps in disks table using vps_uuid found in vps table.


-----------------------
Regards,
Virtualizor Team.
http://virtualizor.com/

Posted By: ah.foroozani on February 13, 2019, 7:52 am | Post: 6
Quote From : jevingala February 12, 2019, 7:42 am
Hi,
You will also need to update the lv name in disks table from phpmyadmin on panel.You can identify vps in disks table using vps_uuid found in vps table.
thanks I have successfully recover my VM from LVM disk.

Posted By: jevingala on February 13, 2019, 8:01 am | Post: 7
Hi,
Did you tried to edit the vps and increase its size by 1Gb for test ?


-----------------------
Regards,
Virtualizor Team.
http://virtualizor.com/

Posted By: cmivps on March 9, 2022, 5:51 am | Post: 8
Hi sir
may i ask you how to recover the logical volume?

Powered By AEF 1.0.8 © 2007-2008 Electron Inc.