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] problem on cloing guest

To: "Stephen Liu" <satimis@xxxxxxxxx>
Subject: Re: [Xen-users] problem on cloing guest
From: "Antoine Benkemoun" <antoine.benkemoun@xxxxxx>
Date: Mon, 15 Sep 2008 22:58:56 +0200
Cc: xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 15 Sep 2008 13:59:37 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=mnl4FNq00aiAeTsefvhFDuAnE5A48mbfenK+/SKAp2U=; b=ieYvBXES0fEkbQMCVppxX6j1pMdTS6RHf+WdkV4nRmpJtP/XMtT2ZXL3d/MRshmnOf VQ49z0SkCYH2prClSZwC0sy6+Zzj1jYOf9P+h1UD7kfbww9XxPNEE4WM12siDK5hruw8 SZKejrC/WZiaHGao9YHnp1YNGOlPj+yEeKl+o=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=CHsK9kEcO+i6vDG6yMDgvGEsInQsoxGWl68lWe8hAYVEN2VRQt8S19uqULPnTfpJpO W2AkfgGhxeRgF0rm6IKqhTGKch4gKbSIXZl62cR0vBwJ8RgBOOpO9zFGEDfiTruZ+LDf HK4/6xmowhXrrWjONoV30Y5+CsDBl1wIFsprk=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <472183.30516.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: <fc1cbedb0809150017s29e418cal29ce370795993cd3@xxxxxxxxxxxxxx> <472183.30516.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Hello,

I don't think I was clear in my previous message but that's because I was on my PDA.

Basically, xen-tools and, in your case xen-create-image, is used to create images of ready-to-use Linux OS's. In your case, you already have that image since you copied it. If you already have it, you do not need to create it again therefore you do not need to use xen-tools.

You will find a file extremely likely named xen1.satimis.com.cfg in /etc/xen which is the file that Xen uses to start your VM. When xen-tools creates an image, it also creates this file for you :) But since you're not using xen-tools, there is no file for your new VM. So you copy paste xen1.satimis.com.cfg to xen2.satimis.com.cfg in the same directory. Afterwards, you will just need to modify the file according to the location of the images.

Afterwards you should just have to issue a standard xm create command to start it.

There you go, don't hesitate if you have more questions. I think this was much clearer.

Cheers,
Antoine

On Mon, Sep 15, 2008 at 2:09 PM, Stephen Liu <satimis@xxxxxxxxx> wrote:
Hi Antoine,


Thanks for your advice


antoine.benkemoun@xxxxxx wrote:

> the error is most likely because you deleted some lines in
> xen-tools.cfg.


Here is xen-tools.conf


# cat /etc/xen-tools/xen-tools.conf

size   = 4Gb      # Disk image size.
memory = 128Mb    # Memory size
swap   = 128Mb    # Swap size
# noswap = 1      # Don't use swap at all for the new system.
fs     = ext3     # use the EXT3 filesystem for the disk image.
dist   = sarge    # Default distribution to install.
image  = sparse   # Specify sparse vs. full disk images.

passwd = 1

mirror = http://ftp.au.debian.org/debian/
* end *


> You don't need to use xen-create-image because you
> already have the image since you copied it from a previous guest.
> The solution is to directly create the .cfg file located in /etc/xen
> in order to tell it to use your image :-)


# ls /etc/xen/
auto                  xen1.satimis.com.cfg    xend-pci-permissive.sxp
xmexample1
qemu-ifup             xen2.satimis.com.cfg    xend-pci-quirks.sxp
xmexample2
scripts               xend-config.sxp         xm-config-xenapi.xml
xmexample.hvm
xen1.example.com.cfg  xend-config-xenapi.sxp  xm-config.xml
xmexample.vti
* end *


Whether you meant running;

# cp -p /etc/xen/xen1.satimis.com.cfg /etc/xen/xen3.satimis.com.cfg

then changing the content on the newly created xen3.satimis.com.cfg for
xen3?


And then;

# mkdir /vserver/domains/xen3.satimis.com/

# cp -p /vserver/domains/xen1.satimis.com/swap.img
/vserver/domains/xen3.satimis.com/

# cp -p /vserver/domains/xen1.satimis.com/disk.img
/vserver/domains/xen3.satimis.com/



> You shoild be able to find
> an example file easily.


I have been googling around unable to find an example.  All come across
are running lvcreate.   Unfortunately I don't have partition on HD nor
running LVM.


B.R.
Stephen L


> On 9/15/08, Stephen Liu <satimis@xxxxxxxxx> wrote:
> > Hi folks,
> >
> >
> > Host - Debian Etch
> >
> >
> > Encountered problem on cloing guest.
> >
> > Remark: No partition on HD nor have LVM
> >
> >
> > Steps performed as follows;
> >
> >
> > # find / -name *.img
> > /initrd.img
> > /vserver/domains/xen1.satimis.com/swap.img
> > /vserver/domains/xen1.satimis.com/disk.img
> > /vserver/domains/xen2.satimis.com/swap.img
> > /vserver/domains/xen2.satimis.com/disk.img
> >
> >
> > # mount -o loop /vserver/domains/xen2.satimis.com/disk.img /mnt
> > No complaint
> >
> >
> > # xen-create-image --copy=/mnt --hostname=xen3.satimis.com
> > --ip=192.168.0.113 --dist=etch
> >
> > General Infomation
> > --------------------
> > Hostname       :  xen3.satimis.com
> > Distribution   :  etch
> > Fileystem Type :  ext3
> >
> > Size Information
> > ----------------
> > Image size     :  4Gb
> > Swap size      :  128Mb
> > Image type     :  sparse
> > Memory size    :  128Mb
> > Kernel path    :  /boot/vmlinuz-2.6.18-xen
> >
> > Networking Information
> > ----------------------
> > IP Address 1   : 192.168.0.113
> > Netmask        : 255.255.255.0
> > Gateway        : 192.168.0.1
> >
> > Error:  No recognised installation type.
> >
> > Logfile produced at:
> >          /var/log/xen-tools/xen3.satimis.com.log
> > * end *
> >
> >
> > # tail /var/log/xen-tools/xen3.satimis.com.log
> > Image type     :  sparse
> > Memory size    :  128Mb
> > Kernel path    :  /boot/vmlinuz-2.6.18-xen
> >
> > Networking Information
> > ----------------------
> > IP Address 1   : 192.168.0.113
> > Netmask        : 255.255.255.0
> > Gateway        : 192.168.0.1
> > Error:  No recognised installation type.
> > * end *
> >
> >
> > What does it mean "Error:  No recognised installation type"?
> >
> >
> > Please advise how to fix the problem.  TIA
> >
> >
> > B.R.
> > Stephen L
> >
> > Send instant messages to your online friends
> http://uk.messenger.yahoo.com
> >
> > _______________________________________________
> > Xen-users mailing list
> > Xen-users@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-users
> >
>
>
> --
> Antoine Benkemoun
> Tel : 03.51.53.57.00
> Port : 06.32.88.59.35
>


Send instant messages to your online friends http://uk.messenger.yahoo.com



--
Antoine Benkemoun
Tel : 03.51.53.57.00
Port : 06.32.88.59.35
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users