recovery of virtual machines on KVM

Alvin info at alvin.be
Thu Feb 10 08:10:57 UTC 2011


On Wednesday 09 February 2011 19:39:57 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.

Before your reinstall, dump the configuration of your virtual machines like 
this:
$ virsh dumpxml vm1 > vm1.xml
After reinstall, redefine the machines
$ virsh define vm1.xml

It's that simple, but of course you have to leave your LVM volumes in place 
and make sure your host has the same network interfaces (as defined in the 
xml).




More information about the ubuntu-server mailing list