libvirt/src/xen
Mark McLoughlin 73c901a807 Take domain type into account when looking up default machine
If one has e.g.

  <guest>
    <os_type>hvm</os_type>
    <arch name='x86_64'>
      <wordsize>64</wordsize>
      <emulator>/usr/bin/qemu-system-x86_64</emulator>
      <machine>pc-0.11</machine>
      <machine canonical='pc-0.11'>pc</machine>
      <machine>pc-0.10</machine>
      <machine>isapc</machine>
      <domain type='qemu'>
      </domain>
      <domain type='kvm'>
        <emulator>/usr/bin/kvm</emulator>
        <machine>pc</machine>
        <machine>isapc</machine>
      </domain>
    </arch>
  </guest>

and start a guest with:

  <domain type='kvm'>
    ...
    <os>
      <type arch='x86_64'>hvm</type>
      ...
    </os>
  </domain>

then the default machine type should be 'pc' and not 'pc-0.11'

Issue was reported by Anton Protopopov.

* src/capabilities.[ch]: pass the domain type to
  virCapabilitiesDefaultGuestArch() and use it to look up the default
  machine type from a specific guest domain if needed.

* src/conf/domain_conf.c, src/xen/xm_internal.c: update

* tests/qemuxml2argvdata/qemuxml2argv-machine-aliases2.xml: update
  the domain type to 'kvm' and remove the machine type to check
  that the default gets looked up correctly
2009-10-12 10:57:35 +01:00
..
block_stats.c Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
block_stats.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
proxy_internal.c Introduce virStrncpy. 2009-09-22 20:10:00 +02:00
proxy_internal.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
sexpr.c Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
sexpr.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xen_driver.c Support a new peer-to-peer migration mode & public API 2009-10-09 12:35:07 +01:00
xen_driver.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xen_hypervisor.c Introduce virStrncpy. 2009-09-22 20:10:00 +02:00
xen_hypervisor.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xen_inotify.c Fix xen driver refcounting. 2009-09-22 15:12:48 +02:00
xen_inotify.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xend_internal.c Support a new peer-to-peer migration mode & public API 2009-10-09 12:35:07 +01:00
xend_internal.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xm_internal.c Take domain type into account when looking up default machine 2009-10-12 10:57:35 +01:00
xm_internal.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xs_internal.c Fix xen driver refcounting. 2009-09-22 15:12:48 +02:00
xs_internal.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00