recovery of virtual machines on KVM

Tapas Mishra mightydreams at gmail.com
Sat Feb 12 16:47:14 UTC 2011


On Sat, Feb 12, 2011 at 10:15 PM, Tapas Mishra <mightydreams at gmail.com> wrote:
> On Thu, Feb 10, 2011 at 4:39 AM, Ahmed Kamal <ahmed.kamal at canonical.com> wrote:
>> On 02/09/2011 08:39 PM, Tapas Mishra wrote:
>>>
>>> I  am having a virtualization setup via KVM on a Ubuntu 10.04 64 bit
>>> server.
>>>
>>> A recent dbus update cause a crash of my Host OS.It was a post install
>>> script of dbus which ultimately brought everything down.
>>>
>>> Now I have to basically format the host OS.My cause of concern are the
>>> virtual machines which were running on it when the environment was
>>> stable.Which were in separate LVM partitions.
>>>
>>> Some thing like
>>>
>>> /dev/virtualization/vm1
>>> /dev/virtualization/vm2
>>> /dev/virtualization/vm3
>>> /dev/virtualization/vm4
>>> If some one has experienced recovery of this sort in past let me know
>>> what did they do to get things back. All my Virtual Machines were on
>>> separate partition and in same VolumeGroup this volume group was on
>>> Host OS. Will formatting of HOST os clear the Virtual Machines also in
>>> my situation or just be re installing the host and importing the
>>> Virtual Machines via a tool such as virt-manager I will be able to get
>>> them back.
>>
>> It depends, if the VG is stored on the same disk and you reinstall you might
>> indeed destroy the VMs. Please don't proceed until you're sure of what
>> you're doing
>>
>
> Well I can not escape from restoring the production environment Ahmed.
>
> How ever by the time of writing this message I have restored every thing.
> I am sharing it here might help some one who are into similar mess.
>
> When you insert the Ubuntu CD it will ask you for partitioning schemes
> chose the guided partitioning scheme  what you have to make sure is
> not to format the volume group on which all the virtual machines
> reside.
>
> While creating these guests their locations were
> /etc/libvirt/qemu/*.xml
>
> To restore the Virtual Machine go to the /etc/libvirt/ directory of
> USB backup and which ever file  you find missing on the fresh install
> copy it after you have copied them
>
> virsh define /path/to/vm.xml to define that VM in new environment (you
> will see the VM might run without this but it is
> advisable to do above thing)
> My problem was a bit more difficult as the back I had was even buggy
> so the restoration did not      went very smooth.When  you are restoring
> the VMs then I noticed  some how permissions and        softlinks had
> broken.
>
>        Once you have finished copying the virtual machines permissions of
> xml files in
>        /etc/libvirt/qemu/
>        should be changed to 644 any other file if you see has permission 777
> needs to be 644 but the
>        same does not applies to directories.
Sorry here the permissions need to be 700 and  644 as I previously told.




More information about the ubuntu-server mailing list