2

I've configured some virtual machine under Xen on Debian Squeeze using libvirt with virsh. Now I want to get rid of the libvirt layer, because I need to configure some specific parameters on the DomUs that are not supported by libvirt.

  1. How can I export my config ?
  2. How can I import the native config file to Xen ?

Thank you for any suggestion !

GabrieleV
  • 1,659

3 Answers3

2

You would export the xml config and then convert it to XEN Configs:

virsh -c xen:/// domxml-to-native xen-xm rhel5pv.xml

http://libvirt.org/drvxen.html#xmlexport

Rilindo
  • 5,088
2

An update: Newer versions of Xen have a new toolstack: xen-light, so from xen 4.1 onwards the xm command is superceded by xl.

While xl's domain configuration files are backwards compatible, to make sure all domain parameters are correctly mapped into the latest configuration during conversion I would suggest to use:

virsh -c xen:/// domxml-to-native --format xen-xl \
    /path/to/libvirt/vm.domxml.cfg > vm.xenxl.cfg

(note the use of xen-xl instead of xen-xm).

Then, you can create the vm directly on Xen using the generated file:

xl create -f vm.xenxl.cfg

(Documenting it here, as the virsh command reference section for domxml-to-native says "Options: Needs to be written")

Pablo
  • 450
0

If u just want to edit domU's configuration, try below,

virsh edit vm-name

It will use vi to open xml by default