Re: [libvirt] [PATCH 2/2] Take domain type into account when looking up default machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 12, 2009 at 11:00:31AM +0100, Mark McLoughlin wrote:
> 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
> ---
>  src/conf/capabilities.c                            |   31 ++++++++++++++++---
>  src/conf/capabilities.h                            |    3 +-
>  src/conf/domain_conf.c                             |    3 +-
>  src/xen/xm_internal.c                              |    3 +-
>  .../qemuxml2argv-machine-aliases2.xml              |    4 +-
>  5 files changed, 34 insertions(+), 10 deletions(-)

ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]