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-api

[Xen-API] Running XCP in a VM

To: Xen-API List <xen-api@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-API] Running XCP in a VM
From: Magnus Therning <magnus.therning@xxxxxxxxxx>
Date: Wed, 8 Sep 2010 14:21:01 +0100
Delivery-date: Wed, 08 Sep 2010 06:21:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.20 (2009-06-14)
I'm not sure whether it's widely known that it's possible to install XCP in a
VM on an XCP host.  It's rather easy, put main.iso on an SR, create a new VM
from the "Xen API SDK" template, attach main.iso to its DVD drive and go.

Note that the template specifies an answer file, which looks like this:

<?xml version="1.0"?>
<installation>
    <keymap>us</keymap>
    <primary-disk gueststorage="no">xvda</primary-disk>
    <root-password>Citrix</root-password>
    <source type="local"></source>
    <admin-interface name="eth0" proto="dhcp" />
    <timezone>Etc/UTC</timezone>
</installation>

In some cases it's very useful to have a few XCP hosts around for testing
purposes, but it's a bit time consuming to do a fresh install each time.
Unfortunately it's not possible to just create a template from a vanilla
installation and have things work as expected (especially joining several XCP
clones into a pool requires a bit of care and manual work).

The attached script attempts to make this a bit easier.  Copy it over to a
fresh install of XCP in a VM, run it, shut down, and then convert the VM into
a template.  The scripts removes a few cookies that are dropped on first boot
(to force the actions to happen again), deletes the identity of the XCP host
and its control domain, the database is wiped, and finally two new startup
scripts are added to make sure that things are put back in order for xapi on
first boot.

Let me know if you have any feedback, or make any improvements to the script.

Cheers,
M

-- 
Magnus Therning
magnus.therning@xxxxxxxxxxxxx          Jabber: magnusth@eng

There does not now, nor will there ever, exist a programming language
in which it is the least bit hard to write bad programs.
     -- Flon's Axiom

I invented the term Object-Oriented, and I can tell you I did not have
C++ in mind.
     -- Alan Kay

Attachment: sysprep.sh
Description: Bourne shell script

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-API] Running XCP in a VM, Magnus Therning <=