1. 12 4月, 2016 1 次提交
    • J
      tests: fix xen-related tests · 4b35a715
      Ján Tomko 提交于
      My commit 6879be48 moved the addition of the implicit video device
      from the XML parser to the PostParse function, but did not regenerate
      all the tests.
      4b35a715
  2. 23 2月, 2016 2 次提交
    • J
      xenconfig: support xl<->xml conversion of rbd disk devices · 6604a3dd
      Jim Fehlig 提交于
      The target= setting in xl disk configuration can be used to encode
      meta info that is meaningful to a backend. Leverage this fact to
      support qdisk network disk types such as rbd. E.g. <disk> config
      such as
      
         <disk type='network' device='disk'>
           <driver name='qemu' type='raw'/>
           <source protocol='rbd' name='pool/image'>
             <host name='mon1.example.org' port='6321'/>
             <host name='mon2.example.org' port='6322'/>
             <host name='mon3.example.org' port='6322'/>
           </source>
           <target dev='hdb' bus='ide'/>
           <address type='drive' controller='0' bus='0' target='0' unit='1'/>
         </disk>
      
      can be converted to the following xl config (and vice versa)
      
        disk = [ "format=raw,vdev=hdb,access=rw,backendtype=qdisk,
                  target=rbd:pool/image:auth_supported=none:mon_host=mon1.example.org\\:6321\\;mon2.example.org\\:6322\\;mon3.example.org\\:6322"
               ]
      
      Note that in xl disk config, a literal backslash in target= must
      be escaped with a backslash. Conversion of <auth> config is not
      handled in this patch, but can be done in a follow-up patch.
      
      Also add a test for the conversions.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      6604a3dd
    • J
      xenconfig: produce key=value disk config syntax in xl formatter · a44f1f85
      Jim Fehlig 提交于
      The most formal form of xl disk configuration uses key=value
      syntax to define each configuration item, e.g.
      
      format=raw, vdev=xvda, access=rw, backendtype=phy, target=disksrc
      
      Change the xl disk formatter to produce this syntax, which allows
      target= to contain meta info needed to setup a network-based
      disksrc (e.g. rbd, nbd, iscsi). For details on xl disk config
      format, see  $xen-src/docs/misc/xl-disk-configuration.txt
      
      Update the disk config in the tests to use the formal syntax.
      But add tests to ensure disks specified with the positional
      parameter syntax are correctly converted to <disk> XML.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      a44f1f85
  3. 19 2月, 2016 1 次提交
    • C
      domain: add implicit controllers from post parse · 4066c734
      Cole Robinson 提交于
      Seems like the natural fit, since we are already adding other XML bits
      in the PostParse routine.
      
      Previously AddImplicitControllers was only called at the end of XML
      parsing, meaning code that builds a DomainDef by hand had to manually
      call it. Now those PostParse callers get it for free.
      
      There's some test churn here; xen xm and sexpr test suite bits weren't
      calling this before, but now they are, so you'll see new IDE controllers.
      I don't think this will cause problems in practice, since the code already
      needs to handle these implicit controllers like in the case when a user
      defines their own XML.
      4066c734
  4. 18 12月, 2015 1 次提交
  5. 09 12月, 2015 1 次提交
  6. 14 1月, 2015 1 次提交
  7. 10 9月, 2014 1 次提交
    • M
      conf: Extend <loader/> and introduce <nvram/> · 68bf13db
      Michal Privoznik 提交于
      Up to now, users can configure BIOS via the <loader/> element. With
      the upcoming implementation of UEFI this is not enough as BIOS and
      UEFI are conceptually different. For instance, while BIOS is ROM, UEFI
      is programmable flash (although all writes to code section are
      denied). Therefore we need new attribute @type which will
      differentiate the two. Then, new attribute @readonly is introduced to
      reflect the fact that some images are RO.
      
      Moreover, the OVMF (which is going to be used mostly), works in two
      modes:
      1) Code and UEFI variable store is mixed in one file.
      2) Code and UEFI variable store is separated in two files
      
      The latter has advantage of updating the UEFI code without losing the
      configuration. However, in order to represent the latter case we need
      yet another XML element: <nvram/>. Currently, it has no additional
      attributes, it's just a bare element containing path to the variable
      store file.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Acked-by: NLaszlo Ersek <lersek@redhat.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      68bf13db
  8. 19 2月, 2014 1 次提交
  9. 09 5月, 2012 1 次提交
    • O
      numad: Always output 'placement' of <vcpu> · d70f2e11
      Osier Yang 提交于
      <vcpu> is not an optional node. The value for its 'placement'
      actually always defaults to 'static' in the underlying codes.
      (Even no 'cpuset' and 'placement' is specified, the domain
      process will be pinned to all the available pCPUs).
      d70f2e11
  10. 02 4月, 2012 1 次提交
    • P
      Xen: Fix <clock> handling · 11ec6bd8
      Philipp Hahn 提交于
      XenD-3.1 introduced managed domains. HV-domains have rtc_timeoffset
      (hgd24f37b31030 from 2007-04-03), which tracks the offset between the
      hypervisors clock and the domains RTC, and is persisted by XenD.
      In combination with localtime=1 this had a bug until XenD-3.4
      (hg5d701be7c37b from 2009-04-01) (I'm not 100% sure how that bug
      manifests, but at least for me in TZ=Europe/Berlin I see the previous
      offset relative to utc being applied to localtime again, which manifests
      in an extra hour being added)
      
      XenD implements the following variants for clock/@offset:
      - PV domains don't have a RTC → 'localtime' | 'utc'
      - <3.1: no managed domains → 'localtime' | 'utc'
      - ≥3.1: the offset is tracked for HV → 'variable'
              due to the localtime=1 bug → 'localtime' | 'utc'
      - ≥3.4: the offset is tracked for HV → 'variable'
      
      Current libvirtd still thinks XenD only implements <clock offset='utc'/>
      and <clock offset='localtime'/>, which is wrong, since the semantic of
      'utc' and 'localtime' specifies, that the offset will be reset on
      domain-restart, while with 'variable' the offset is kept. (keeping the
      offset over "virsh edit" is important, since otherwise the clock might
      jump, which confuses certain guest OSs)
      
      xendConfigVersion was last incremented to 4 by the xen-folks for
      xen-3.1.0. I know of no way to reliably detect the version of XenD
      (user space tools), which may be different from the version of the
      hypervisor (kernel) version! Because of this only the change from
      'utc'/'localtime' to 'variable' in XenD-3.1 is handled, not the buggy
      behaviour of XenD-3.1 until XenD-3.4.
      
      For backward compatibility with previous versions of libvirt Xen-HV
      still accepts 'utc' and 'localtime', but they are returned as 'variable'
      on the next read-back from Xend to libvirt, since this is what XenD
      implements: The RTC is NOT reset back to the specified time on next
      restart, but the previous offset is kept.
      This behaviour can be turned off by adding the additional attribute
      adjustment='reset', in which case libvirt will report an error instead
      of doing the conversion. The attribute can also be used as a shortcut to
      offset='variable' with basis='...'.
      
      With these changes, it is also necessary to adjust the xen tests:
      
      "localtime = 0" is always inserted, because otherwise on updates the
      value is not changed within XenD.
      
      adjustment='reset' is inserted for all cases, since they're all <
      XEND_CONFIG_VERSION_3_1_0, only 3.1 introduced persistent
      rtc_timeoffset.
      
      Some statements change their order because code was moved around.
      Signed-off-by: NPhilipp Hahn <hahn@univention.de>
      11ec6bd8
  11. 08 3月, 2012 1 次提交
    • E
      xml: output memory unit for clarity · 26545784
      Eric Blake 提交于
      Make it obvious to 'dumpxml' readers what unit we are using,
      since our default of KiB for memory (1024) differs from qemu's
      default of MiB; and differs from our use of bytes for storage.
      
      Tests were updated via:
      
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(memory\|currentMemory\|hard_limit\|soft_limit\|min_guarantee\|swap_hard_limit\)>/<\1 unit='"'KiB'>/"
      $ find tests/*data tests/*out -name '*.xml' | \
        xargs sed -i 's/<\(capacity\|allocation\|available\)>/<\1 unit='"'bytes'>/"
      
      followed by a few fixes for the stragglers.
      
      Note that with this patch, the RNG for <memory> still forbids
      validation of anything except unit='KiB', since the code silently
      ignores the attribute; a later patch will expand <memory> to allow
      scaled input in the code and update the RNG to match.
      
      * docs/schemas/basictypes.rng (unit): Add 'bytes'.
      (scaledInteger): New define.
      * docs/schemas/storagevol.rng (sizing): Use it.
      * docs/schemas/storagepool.rng (sizing): Likewise.
      * docs/schemas/domaincommon.rng (memoryKBElement): New define; use
      for memory elements.
      * src/conf/storage_conf.c (virStoragePoolDefFormat)
      (virStorageVolDefFormat): Likewise.
      * src/conf/domain_conf.h (_virDomainDef): Document unit used
      internally.
      * src/conf/storage_conf.h (_virStoragePoolDef, _virStorageVolDef):
      Likewise.
      * tests/*data/*.xml: Update all tests.
      * tests/*out/*.xml: Likewise.
      * tests/define-dev-segfault: Likewise.
      * tests/openvzutilstest.c (testReadNetworkConf): Likewise.
      * tests/qemuargv2xmltest.c (blankProblemElements): Likewise.
      26545784
  12. 29 7月, 2011 1 次提交
    • L
      conf: add <listen> subelement to domain <graphics> element · ef79fb5b
      Laine Stump 提交于
      Once it's plugged in, the <listen> element will be an optional
      replacement for the "listen" attribute that graphics elements already
      have. If the <listen> element is type='address', it will have an
      attribute called 'address' which will contain an IP address or dns
      name that the guest's display server should listen on. If, however,
      type='network', the <listen> element should have an attribute called
      'network' that will be set to the name of a network configuration to
      get the IP address from.
      
      * docs/schemas/domain.rng: updated to allow the <listen> element
      
      * docs/formatdomain.html.in: document the <listen> element and its
        attributes.
      
      * src/conf/domain_conf.[hc]:
      
        1) The domain parser, formatter, and data structure are modified to
           support 0 or more <listen> subelements to each <graphics>
           element. The old style "legacy" listen attribute is also still
           accepted, and will be stored internally just as if it were a
           separate <listen> element. On output (i.e. format), the address
           attribute of the first <listen> element of type 'address' will be
           duplicated in the legacy "listen" attribute of the <graphic>
           element.
      
        2) The "listenAddr" attribute has been removed from the unions in
           virDomainGRaphicsDef for graphics types vnc, rdp, and spice.
           This attribute is now in the <listen> subelement (aka
           virDomainGraphicsListenDef)
      
        3) Helper functions were written to provide simple access
           (both Get and Set) to the listen elements and their attributes.
      
      * src/libvirt_private.syms: export the listen helper functions
      
      * src/qemu/qemu_command.c, src/qemu/qemu_hotplug.c,
        src/qemu/qemu_migration.c, src/vbox/vbox_tmpl.c,
        src/vmx/vmx.c, src/xenxs/xen_sxpr.c, src/xenxs/xen_xm.c
      
        Modify all these files to use the listen helper functions rather
        than directly referencing the (now missing) listenAddr
        attribute. There can be multiple <listen> elements to a single
        <graphics>, but the drivers all currently only support one, so all
        replacements of direct access with a helper function indicate index
        "0".
      
      * tests/* - only 3 of these are new files added explicitly to test the
        new <listen> element. All the others have been modified to reflect
        the fact that any legacy "listen" attributes passed in to the domain
        parse will be saved in a <listen> element (i.e. one of the
        virDomainGraphicsListenDefs), and during the domain format function,
        both the <listen> element as well as the legacy attributes will be
        output.
      ef79fb5b
  13. 05 12月, 2009 1 次提交
  14. 24 4月, 2009 1 次提交
  15. 25 7月, 2008 1 次提交
  16. 08 5月, 2008 1 次提交
  17. 10 8月, 2007 1 次提交
  18. 19 7月, 2007 1 次提交
  19. 17 7月, 2007 1 次提交
  20. 08 6月, 2007 1 次提交
  21. 07 6月, 2007 1 次提交
  22. 20 1月, 2007 1 次提交
  23. 09 10月, 2006 1 次提交
  24. 12 9月, 2006 1 次提交
  25. 24 8月, 2006 1 次提交