* Tool to migrate xm/xend managed domains into xl.cfg files
@ 2014-04-02 11:49 Stefan Bader
2014-04-02 13:42 ` Pasi Kärkkäinen
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Bader @ 2014-04-02 11:49 UTC (permalink / raw)
To: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 361 bytes --]
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 from the
config.sxp ones.
Just was wondering whether there might be a need of having something similar for
those that used to use xm/xend managed domains without anything else than the
xen-utils.
-Stefan
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Tool to migrate xm/xend managed domains into xl.cfg files
2014-04-02 11:49 Tool to migrate xm/xend managed domains into xl.cfg files Stefan Bader
@ 2014-04-02 13:42 ` Pasi Kärkkäinen
2014-04-02 13:56 ` Stefan Bader
0 siblings, 1 reply; 7+ messages in thread
From: Pasi Kärkkäinen @ 2014-04-02 13:42 UTC (permalink / raw)
To: Stefan Bader; +Cc: xen-devel@lists.xen.org
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 from the
> config.sxp ones.
> Just was wondering whether there might be a need of having something similar for
> those that used to use xm/xend managed domains without anything else 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 compatible with xl cfgfiles.
> -Stefan
>
-- Pasi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Tool to migrate xm/xend managed domains into xl.cfg files
2014-04-02 13:42 ` Pasi Kärkkäinen
@ 2014-04-02 13:56 ` Stefan Bader
2014-04-02 14:33 ` George Dunlap
0 siblings, 1 reply; 7+ messages in thread
From: Stefan Bader @ 2014-04-02 13:56 UTC (permalink / raw)
To: Pasi Kärkkäinen; +Cc: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 1122 bytes --]
On 02.04.2014 15:42, Pasi Kärkkäinen 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 from the
>> config.sxp ones.
>> Just was wondering whether there might be a need of having something similar for
>> those that used to use xm/xend managed domains without anything else 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 compatible with xl cfgfiles.
Right, you also could do a domxml-from-native xen-sxpr <file> 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 whether I can
offer a nice way of don some of that automatically for people on upgrade (and
there might be some that don't have libvirt installed as well).
>
>> -Stefan
>>
>
> -- Pasi
>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Tool to migrate xm/xend managed domains into xl.cfg files
2014-04-02 13:56 ` Stefan Bader
@ 2014-04-02 14:33 ` George Dunlap
2014-04-02 14:38 ` Stefan Bader
2014-04-02 15:45 ` Ian Campbell
0 siblings, 2 replies; 7+ messages in thread
From: George Dunlap @ 2014-04-02 14:33 UTC (permalink / raw)
To: Stefan Bader; +Cc: xen-devel@lists.xen.org
On Wed, Apr 2, 2014 at 2:56 PM, Stefan Bader <stefan.bader@canonical.com> wrote:
> On 02.04.2014 15:42, Pasi Kärkkäinen 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 from the
>>> config.sxp ones.
>>> Just was wondering whether there might be a need of having something similar for
>>> those that used to use xm/xend managed domains without anything else 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 compatible with xl cfgfiles.
>
> Right, you also could do a domxml-from-native xen-sxpr <file> 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 whether I can
> offer a nice way of don some of that automatically for people on upgrade (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, and
then once you had a structure with all the configuration in it, write
that out into a .cfg file. I'm sure that would be a useful tool to
have in-tree, particularly if we manage to actually get rid of xend
this release cycle.
-George
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Tool to migrate xm/xend managed domains into xl.cfg files
2014-04-02 14:33 ` George Dunlap
@ 2014-04-02 14:38 ` Stefan Bader
2014-04-02 15:45 ` Ian Campbell
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Bader @ 2014-04-02 14:38 UTC (permalink / raw)
To: George Dunlap; +Cc: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 2287 bytes --]
On 02.04.2014 16:33, George Dunlap wrote:
> On Wed, Apr 2, 2014 at 2:56 PM, Stefan Bader <stefan.bader@canonical.com> wrote:
>> On 02.04.2014 15:42, Pasi Kärkkäinen 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 from the
>>>> config.sxp ones.
>>>> Just was wondering whether there might be a need of having something similar for
>>>> those that used to use xm/xend managed domains without anything else 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 compatible with xl cfgfiles.
>>
>> Right, you also could do a domxml-from-native xen-sxpr <file> 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 whether I can
>> offer a nice way of don some of that automatically for people on upgrade (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. :-)
I would only create files of a certain name if they do not exist. :)
>
> 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, and
> then once you had a structure with all the configuration in it, write
> that out into a .cfg file. I'm sure that would be a useful tool to
> have in-tree, particularly if we manage to actually get rid of xend
> this release cycle.
Yeah, that is exactly wht I started off. It is a bit erm difficult to dig into
it and I might be missing the easy why of getting the output from the list of
domains' XendConfig objects. But basically thats where I am right now and just
wanted to ensure I am not inventing yet another wheel.
If I get something I am happy with I'll let the list know. :)
-Stefan
>
> -George
>
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Tool to migrate xm/xend managed domains into xl.cfg files
2014-04-02 14:33 ` George Dunlap
2014-04-02 14:38 ` Stefan Bader
@ 2014-04-02 15:45 ` Ian Campbell
2014-04-02 18:34 ` Stefan Bader
1 sibling, 1 reply; 7+ messages in thread
From: Ian Campbell @ 2014-04-02 15:45 UTC (permalink / raw)
To: George Dunlap; +Cc: Stefan Bader, xen-devel@lists.xen.org
On Wed, 2014-04-02 at 15:33 +0100, George Dunlap wrote:
> On Wed, Apr 2, 2014 at 2:56 PM, Stefan Bader <stefan.bader@canonical.com> wrote:
> > On 02.04.2014 15:42, Pasi Kärkkäinen 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 from the
> >>> config.sxp ones.
> >>> Just was wondering whether there might be a need of having something similar for
> >>> those that used to use xm/xend managed domains without anything else 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 compatible with xl cfgfiles.
> >
> > Right, you also could do a domxml-from-native xen-sxpr <file> 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 whether I can
> > offer a nice way of don some of that automatically for people on upgrade (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,
Does xend store its managed domains as sxp? I thought I'd seem piles of
XML relating to the XenAPI (== managed domains) under /var somewhere...
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Tool to migrate xm/xend managed domains into xl.cfg files
2014-04-02 15:45 ` Ian Campbell
@ 2014-04-02 18:34 ` Stefan Bader
0 siblings, 0 replies; 7+ messages in thread
From: Stefan Bader @ 2014-04-02 18:34 UTC (permalink / raw)
To: Ian Campbell, George Dunlap; +Cc: xen-devel@lists.xen.org
[-- Attachment #1.1: Type: text/plain, Size: 2311 bytes --]
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 <stefan.bader@canonical.com> wrote:
>>> On 02.04.2014 15:42, Pasi Kärkkäinen 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 from the
>>>>> config.sxp ones.
>>>>> Just was wondering whether there might be a need of having something similar for
>>>>> those that used to use xm/xend managed domains without anything else 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 compatible with xl cfgfiles.
>>>
>>> Right, you also could do a domxml-from-native xen-sxpr <file> 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 whether I can
>>> offer a nice way of don some of that automatically for people on upgrade (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,
>
> Does xend store its managed domains as sxp? I thought I'd seem piles of
> XML relating to the XenAPI (== managed domains) under /var somewhere...
>
> Ian.
>
There is a bit of that but the files themselves
/var/lib/xend/domains/<uuid>/config.sxp are sxp. And for something useful only
with a basic xen install the output should be xm format. Libvirt uses some 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 to grep
that away.
-Stefan
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-04-02 18:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-02 11:49 Tool to migrate xm/xend managed domains into xl.cfg files Stefan Bader
2014-04-02 13:42 ` Pasi Kärkkäinen
2014-04-02 13:56 ` Stefan Bader
2014-04-02 14:33 ` George Dunlap
2014-04-02 14:38 ` Stefan Bader
2014-04-02 15:45 ` Ian Campbell
2014-04-02 18:34 ` Stefan Bader
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.