2

I have Xen set up and working quite nicely.

When I reboot and use:

xm list

I get this output:

Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  4096     4     r-----    153.6
busiserver                                      2048     2                26.0
testserver0                                     2048     2              1596.1
ubuntuserver                                    1024     2                47.8

This is because I created 3 vms through the xm command line by using something like

xm create create /dev/null ramdisk=initrd.img \
   kernel=/boot/vmlinuz-2.6.12.6-xenU \
   name=ramdisk vif='' vcpus=1 \
   memory=64 root=/dev/ram0

I also created one vm through a regular configuration file. This vm does not appear in the output of xm list, and cannot be interacted with in any way unless I use

xm create missingvm.cfg

At which point, it functions as expected, and all data from previous sessions is restored. I would like to know

  1. Where are "xm create" configuration files located when you use the pure command line option(so that I may edit/remove them)?
  2. If they are not stored anywhere since I used the command line options, is there a way to export/infer what the configuration file would look like for an existing vm?
slm
  • 7,615
  • 16
  • 56
  • 76
aclave1
  • 123
  • 5

1 Answers1

0

You can find the .sxp configurations used by xen in /var/lib/xend/domains/. You can create a machine from a .sxp file by using xm create -F=FILE (see man xm).

However, if you want to edit them I'd reccomend you to use libvirt's API or using virsh: virsh edit VMNAME.

Alvaro
  • 261
  • 1
  • 2
  • 1
    This is exactly what I wanted. Thank you. Is there a way to add a vm created from a configuration file to this list? Or should I ask that in a separate question? – aclave1 Aug 01 '13 at 13:13
  • Those are files managed directly by xen, so you have to use `xm new ` to add a new domain to the Xen managed domains. – Alvaro Aug 05 '13 at 08:41