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] Guest - slow response to keystroke.

To: Stephen Liu <satimis@xxxxxxxxx>
Subject: Re: [Xen-users] Guest - slow response to keystroke.
From: Thomas Halinka <lists@xxxxxxxxx>
Date: Fri, 28 Nov 2008 15:15:51 +0100
Cc: Xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 28 Nov 2008 06:16:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <817055.34136.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <817055.34136.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hi Stephen,

> Thanks for your advice.
> 
> 
> --- Thomas Halinka <lists@xxxxxxxxx> wrote:
> 
> > Am Freitag, den 28.11.2008, 09:09 +0800 schrieb Stephen Liu:
> > > Hi folks,
> > > 
> > > 
> > > Host - Debian Etch
> > > Guests - Debian Etch.
> > > 
> > > 
> > > Performed following steps to create duplicate guest, a mail server.
> > 
> > i hope you stopped the server before copying...
> > > 
> > > 
> > > 1)
> > > # cp /etc/xen/guest-1.cfg /etc/xen/guest-2.cfg
> > > 
> > > 
> > > edit guest-2.cfg changing the settings of:-
> > > disk = ['file:/vserver/domains/guest-2_directory/disk.img,hda1,w',
> > > 'file:/vserver/domains/guest-2_directory/swap.img,hda2,w']
> > > 
> > > #  Hostname
> > > name = 'guest-2_hostname'
> > > 
> > > #  Networking
> > > vif = ['ip=guest-2_localIP, mac=00:16:3E:C2:AA:77']
> > 
> > did you alter the mac-address?
> 
> 
> No, I did not make any change on MAC.  I have been playing round on
> this practice sometimes to duplicate guest image.  IIRC touching MAC
> resulting in other guests/host can't ping this guest.

so - guest01 and 02 have the same MAC-Adress? It is not a goog idea to
have identical Mac-adresses.

> 
> > > 2)
> > > # mkdir /vserver/domains/guest-2_directory
> > > 
> > > # cp /vserver/domains/guest-1_directory/disk.img
> > > /vserver/domains/guest-2_directory/
> > > 
> > > # cp /vserver/domains/guest-1_directory/swap.img
> > > /vserver/domains/guest-2_directory/
> > > 
> > > 
> > > 3)
> > > Start guest-2 and login with password of guest-1
> > > 
> > > Edit /etc/hosts, /etc/hostname, /etc/network/interfaces,
> > root_password,
> > > user_passwords, etc.
> > 
> > instead of this you could also loopback-mount in dom0
> > 
> > mount -o loop /vserver/domains/guest-2_directory/disk.img /mnt
> > chroot /mnt && do your stuff
> > exit && xm create xyz
> 
> 
> Whether editing the data on chroot environment.  On exiting a new
> disk.img will be created with all new data included?  What about the
> swap.img?
> 
> 
> > > 4)
> > > Restart guest-2 and login with new data.  The new mail server,
> > guest-2,
> > > is working.
> > > 
> > > 
> > > But occasionally I found running both guest-1 and guest-2
> > > simultaneously slow response to keystroke will occur on either of
> > them.
> > 
> > sounds strange :)
> 
> 
> I still can't explain.  It happens occasionally.  If only running the
> new guest or its master it never happens.
> 
> 
> 
> > >  I have to sit back and wait.  Please advise where shall I check
> > and
> > > how to fix this problem?  TIA
> > > 
> > > 
> > > Besides, is there a better way to clone a guest on the same Xen
> > box?
> > 
> > use lvm and snapshots.... i often prepare master-images in lvols and
> > each guest works on a snapshot of this. 
> 
> 
> Could you please explain in more detail?  Thanks.  There is no
> partition on the Xen box using the entire HD.
> 
> 
> > I love this CoW-Stuff :)
> 
> 
> Whether you meant;
> 
> Copy-on-write;
> http://en.wikipedia.org/wiki/Copy_on_write

.... nd should not be used to replace backups.

COW may also be used as the underlying mechanism for snapshots provided
by logical volume management and Microsoft Volume Shadow Copy Service.

The copy-on-write technique can be used to emulate a read-write storage
on media that require wear levelling or are physically Write Once Read
Many.

> 
> http://www.etherboot.org/wiki/cow

Just imagine you have lvm running.

you create a new lvol
mount it to /mnt eg.
debootstrap xyz /mnt
umount /mnt

lvcreate -s creates a snapshot of this image, which is writeable.
so you can assign this snapshot to your xen-guest.

> 
> 
> Pointers would be appreciated.  TIA

http://tldp.org/HOWTO/LVM-HOWTO/

> 
> 
> B.R.
> Stephen

Thomas


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