From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Bader Subject: Re: Tool to migrate xm/xend managed domains into xl.cfg files Date: Wed, 02 Apr 2014 20:34:51 +0200 Message-ID: <533C584B.1070809@canonical.com> References: <533BF95C.9000302@canonical.com> <20140402134224.GX3200@reaktio.net> <533C171C.60904@canonical.com> <1396453526.8667.358.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4207182368401164894==" Return-path: In-Reply-To: <1396453526.8667.358.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell , George Dunlap Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============4207182368401164894== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="m1VwsjHWgn6HIhmlqaiU6KSJTWatlxQ9M" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --m1VwsjHWgn6HIhmlqaiU6KSJTWatlxQ9M Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02.04.2014 17:45, Ian Campbell wrote: > On Wed, 2014-04-02 at 15:33 +0100, George Dunlap wrote: >> On Wed, Apr 2, 2014 at 2:56 PM, Stefan Bader wrote: >>> On 02.04.2014 15:42, Pasi K=C3=A4rkk=C3=A4inen wrote: >>>> On Wed, Apr 02, 2014 at 01:49:48PM +0200, Stefan Bader wrote: >>>>> Does anybody have such a tool which could be shared? I know with a = recent patch >>>>> in libvirt (1.2.3~rc1) it is possible to create libvirt xml files f= rom the >>>>> config.sxp ones. >>>>> Just was wondering whether there might be a need of having somethin= g similar for >>>>> those that used to use xm/xend managed domains without anything els= e than the >>>>> xen-utils. >>>>> >>>> >>>> With libvirt you can do at least: >>>> >>>> virsh dumpxml vm_name > /tmp/a.xml >>>> virsh domxml-to-native xen-xm /tmp/a.xml > vmname.cfg >>>> >>>> Which gives you xm/xend text config files.. which should be mostly c= ompatible with xl cfgfiles. >>> >>> Right, you also could do a domxml-from-native xen-sxpr and re-= export that >>> with domxml-to-native xen-xm as you said. >>> The reason I am asking or looking into it is trying to figure out whe= ther I can >>> offer a nice way of don some of that automatically for people on upgr= ade (and >>> there might be some that don't have libvirt installed as well). >> >> Would users really want that translation done automatically? I'd >> rather be told how to do it myself so I can check the outcome; but >> maybe I'm a bit strange that way. :-) >> >> In theory it seems like someone who knew what they were doing with >> python should be able to rip out the sxp parsing stuff from xend, >=20 > Does xend store its managed domains as sxp? I thought I'd seem piles of= > XML relating to the XenAPI (=3D=3D managed domains) under /var somewher= e... >=20 > Ian. >=20 There is a bit of that but the files themselves /var/lib/xend/domains//config.sxp are sxp. And for something useful= only with a basic xen install the output should be xm format. Libvirt uses som= e kind of xml but we are in a better place there as import export functions are = easy to access. There is only one minor oddness right now that you end up with an= xml that defines a vif#.# interface as a target for a bridge but its simple t= o grep that away. -Stefan --m1VwsjHWgn6HIhmlqaiU6KSJTWatlxQ9M Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJTPFhMAAoJEOhnXe7L7s6jSeYQAKUN6jsjNspUTmgRM4msvcBN SWqE2MyO2f5LPKRaraKNHv2EmR7w6rUCpid3DfEdUqawWiflwhW699DkkFeXWUcY bv/FxwJhBs0Foe2rhbBlQjeNOxtOI/NMEVfAa9gopQnBiP6dCoWBbOCVsFk5V83x L7n8kaMFgJcMUz63Ja8lB2tvw3A5qWiO7t5jh1lWGBnJoN0OvsmiHBAVFl2kBCPB st7mYkzYcj+bpP7M8y9Y5K6mAvjHY+PjHoFKdxwoV+hcQSY12hinqeEPOj1t/9cV dY8V50V/FJkb3fkq6qmvuOiMzDs668CMiSz/ntT37uTbGn+tXAV+6XdBYuH+RLVS JopiRFVohh9HWmT8hjAfxZg0gkRvQrYdN8QEIP4kk4iC6FpMlO7ORfyKSOLyGFcd cqEwj2pJ4PhBZ88HwKw73eA51QX/zfBD815//d0HRqQ0HeP+XlqO0cxMRxGM1HyD wU5dXcWhy7q0FWpgTp/2VCKB9jsRLqtf3okDOjdgSfUkTkkwE32euP4VtsjpFwJZ PcImLsxivLD7SOoGroFkuk5wijEHBKOK/rDJXENlVmpulxnWTWLSbteThwyBOX0z p/CPvR++vQ+sMB0+S/RegbrXYBnc98K0arAfZKQvG9KEe3EcX1RYRAK11cJBUKz7 fqcf1SbdA6AyixmNHyBX =mJyo -----END PGP SIGNATURE----- --m1VwsjHWgn6HIhmlqaiU6KSJTWatlxQ9M-- --===============4207182368401164894== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============4207182368401164894==--