WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] snapshot - backup for xen vm's

To: "Fajar A. Nugraha" <fajar@xxxxxxxxxxxxx>
Subject: Re: [Xen-users] snapshot - backup for xen vm's
From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
Date: Fri, 25 May 2007 00:19:38 +0100
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 24 May 2007 16:15:19 -0700
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=an//eAJHrb8rhz6Xsw4Slc6jgQZaHy1zt9GXGOiiHCZbDeMqB1WjjLbRzaqQgVSYCPtWRmUEWn2G9Mzwmp3G/ptuTBCmWOSYMCOYnTSn5Fu0BcIGPuGkv1o6KoRYRmUh0xsCYPwN7BFr3kQnUFAYlhLy4s0Ur4US7bWuLS1+cy4=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; b=ir0iMoAFfYxXhGXIn/4M3fDiXtZj/vJTbsWK5fuFIfWCYM/ozyV71mr83HmLzQicsy3TJ+VLvCk3lkyqEimKdsdKjJDR+02Qhc63F1Kw4WgCu5IWjhb7kBqN6L93isojPupufvnr0ARmk8GfZjOytyYlh0BiLnpbZyIP7iItAPA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <465502AF.6030602@xxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <A5CDEDEDBFC9C14487B8EAE8BA0EF69FB616B9@xxxxxxxxxxxxxxxxxxxxxxxx> <465502AF.6030602@xxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Thunderbird 1.5.0.10 (Windows/20070221)
Fajar A. Nugraha wrote:
it-news (Josef Lahmer) wrote:
is there a way to make a lvm-snapshot of an running xen-vm to implement a function like 
"snapshot-backup"?

#) make snapshot
#) mount snapshot
#) copy files
#) umount snapshot
#) remove snapshot

eg (http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html)

regards
josy

interessting: How to mount a XenVM filesystem on XenServer Host:
http://kb.xensource.com/entry.jspa?categoryID=14&externalID=162


If you :
- use an LV (NOT files) on dom0 as storage for domU's block device
- use partitions on domU (NOT LVM)

Then both link are applicable right away, in the sense that :
- you create an LVM-snapshot of the LV used by domU
- use kpartx to create block device nodes for partitions on that
LVM-snapshot
- mount the partitions
- copy files
- umount partitions
- remove LVM snapshot

Personally, I prefer using dom0-LVM directly as partitions on domU (i.e.
all partitioning and LVM is handled by dom0). But that will also mean I
can't install domU using Anaconda (in the case of RHEL), I have to
manually copy it form an exisisting physical machine.
yum --installroot should work, but you need to do some extra
configurations afterwards.
Yast install to directory on SUSE should also work.
Unfortunately, that piece of over-hyped installatiion obscurity known as libvirt does not allow you options to do this, and mandates the use of pygrub. This means that you must have a /dev/xdva device, and grub itself only works if you have a disk, not if you only have partitions.

Anaconda is also not your friend: but it's possible to do RPM or yum installs into a target directory to build your initial OS images on a partition, edit your configuration files there, and boot that. Just beware that "touch" commands in certain RPM post-install scripts will hang and need to be slapped in the head to allow the yum installation to complete.

I'll publish my widget for this when I have a few cycles. It's also very, very helpful to have enough disk in the partiton to mirror the *whole* RedHat or Fedora installation directory. But doing things this way also allows you to do all your updates at the same time, with a chroot command, which I consider a *huge* bonus.

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users