1. 15 4月, 2014 1 次提交
    • E
      conf: better <disk> interleaving in schema · a9efe2d7
      Eric Blake 提交于
      In general, we try to make virt-xml-validate tolerant of input
      elements in any order when possible.  However, as written, the
      RNG grammar did not permit <source> unless there was an explicit
      type= attribute (even though the C code manages just fine by
      defaulting to type='file').  After making the attribute optional
      on the 'file' branch, I noticed that the use of diskspec was now
      redundant with the branch when no <source> was supplied.
      
      View this patch with 'git diff -b' for a better picture of the
      schema change.
      
      * docs/schemas/domaincommon.rng (disk): Hoist 'diskspec' out of
      choice, make type='file' default, and still preserve interleave.
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-source-pool.xml:
      * tests/qemuxml2xmloutdata/qemuxml2xmlout-disk-drive-discard.xml:
      New files.
      * tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-discard.xml:
      Reorder XML.
      * tests/qemuxml2xmltest.c (mymain): Cover new files.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a9efe2d7
  2. 22 1月, 2014 1 次提交
  3. 02 12月, 2013 1 次提交
  4. 25 4月, 2013 1 次提交
    • J
      qemu: auto-add pci-root controller for pc machine types · b33eb0dc
      Ján Tomko 提交于
      <controller type='pci' index='0' model='pci-root'/>
      is auto-added to pc* machine types.
      Without this controller PCI bus 0 is not available and
      no PCI addresses are assigned by default.
      
      Since older libvirt supported PCI bus 0 even without
      this controller, it is removed from the XML when migrating.
      b33eb0dc
  5. 08 4月, 2013 3 次提交
    • O
      Support seclabels for volume type disk · 664270b8
      Osier Yang 提交于
      "seclabels" is only valid for 'file' or 'block' type storage volume.
      664270b8
    • O
      Support startupPolicy for 'volume' disk · 43404fee
      Osier Yang 提交于
      "startupPolicy" is only valid for file type storage volume, otherwise
      it fails on starting the domain.
      43404fee
    • O
      Introduce new XMLs to specify disk source using libvirt storage · 4bc331c8
      Osier Yang 提交于
      With this patch, one can specify the disk source using libvirt
      storage like:
      
        <disk type='volume' device='disk'>
          <driver name='qemu' type='raw' cache='none'/>
          <source pool='default' volume='fc18.img'/>
          <target dev='vdb' bus='virtio'/>
        </disk>
      
      "seclabels" and "startupPolicy" are not supported for this new
      disk type ("volume"). They will be supported in later patches.
      
      docs/formatdomain.html.in:
        * Add documents for new XMLs
      docs/schemas/domaincommon.rng:
        * Add rng for new XMLs;
      src/conf/domain_conf.h:
        * New struct for 'volume' type disk source (virDomainDiskSourcePoolDef)
        * Add VIR_DOMAIN_DISK_TYPE_VOLUME for enum virDomainDiskType
      src/conf/domain_conf.c:
        * New helper virDomainDiskSourcePoolDefParse to parse the 'volume'
          type disk source.
        * New helper virDomainDiskSourcePoolDefFree to free the source def
          if 'volume' type disk.
      tests/qemuxml2argvdata/qemuxml2argv-disk-source-pool.xml:
      tests/qemuxml2xmltest.c:
        * New test
      4bc331c8
  6. 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
  7. 17 4月, 2012 1 次提交
    • O
      qemu: Split ide-drive into ide-cd and ide-hd · a4cda054
      Osier Yang 提交于
      A "ide-drive" device can be either a hard disk or a CD-ROM,
      if there is ",media=cdrom" specified for the backend, it's
      a CD-ROM, otherwise it's a hard disk.
      
      Upstream qemu splitted "ide-drive" into "ide-hd" and "ide-cd"
      since commit 1f56e32, and ",media=cdrom" is not required for
      ide-cd anymore. "ide-drive" is still supported for backwards
      compatibility, but no doubt we should go foward.
      a4cda054
  8. 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
  9. 28 2月, 2012 1 次提交
    • O
      conf: Introduce new attribute for device address format · 4288b22f
      Osier Yang 提交于
      * src/conf/domain_conf.h: Add new member "target" to struct
        _virDomainDeviceDriveAddress.
      
      * src/conf/domain_conf.c: Parse and format "target"
      
      * Lots of tests (.xml) in tests/domainsnapshotxml2xmlout,
        tests/qemuxml2argvdata, tests/qemuxml2xmloutdata, and
        tests/vmx2xmldata/ are modified for newly introduced
        attribute "target" for address of "drive" type.
      4288b22f
  10. 10 2月, 2012 1 次提交
    • M
      domain: add implicit USB controller · 42043afc
      Marc-André Lureau 提交于
      Some tools, such as virt-manager, prefers having the default USB
      controller explicit in the XML document. This patch makes sure there
      is one. With this patch, it is now possible to switch from USB1 to
      USB2 from the release 0.9.1 of virt-manager.
      
      Fix tests to pass with this change.
      42043afc
  11. 29 1月, 2011 1 次提交
    • M
      Add VIR_DIV_UP to divide memory or storage request sizes with round up · d9ad8ac3
      Matthias Bolte 提交于
      Use it in all places where a memory or storage request size is converted
      to a larger granularity. This avoids requesting too small memory or storage
      sizes that could result from the truncation done by a simple division.
      
      This extends the round up fix in 6002e040
      to the whole codebase.
      
      Instead of reporting errors for odd values in the VMX code round them up.
      
      Update the QEMU Argv tests accordingly as the original memory size 219200
      isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change
      it to 219100 and 219136. Use two different values intentionally to make
      sure that rounding up works.
      
      Update virsh.pod accordingly, as rounding down and rejecting are replaced
      by rounding up.
      d9ad8ac3
  12. 29 7月, 2010 1 次提交
  13. 21 7月, 2010 1 次提交
    • D
      Explicitly represent balloon device in XML and handle PCI address · b2f18635
      Daniel P. Berrange 提交于
      To allow compatibility with older QEMU PCI device slot assignment
      it is necessary to explicitly track the balloon device in the
      XML. This introduces a new device
      
         <memballoon model='virtio|xen'/>
      
      It can also have a PCI address, auto-assigned if necessary.
      
      The memballoon will be automatically added to all Xen and QEMU
      guests by default.
      
      * docs/schemas/domain.rng: Add <memballoon> element
      * src/conf/domain_conf.c, src/conf/domain_conf.h: parsing
        and formatting for memballoon device. Always add a memory
        balloon device to Xen/QEMU if none exists in XML
      * src/libvirt_private.syms: Export memballoon model APIs
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Honour the
        PCI device address in memory balloon device
      * tests/*: Update to test new functionality
      b2f18635
  14. 18 1月, 2010 1 次提交
    • D
      Auto-add disk controllers based on defined disks · b030084f
      Daniel P. Berrange 提交于
      Existing applications using libvirt are not aware of the disk
      controller concept. Thus, after parsing the <disk> definitions
      in the XML, it is neccessary to create <controller> elements
      to satisfy all requested disks, as per their defined drive
      addresses
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h,
        src/libvirt_private.syms: Add virDomainDefAddDiskControllers()
        method for populating disk controllers, and call it after
        parsing disk definitions.
      * src/qemu/qemu_conf.c: Call virDomainDefAddDiskControllers()
        when doing ARGV -> XML conversion
      * tests/qemuxml2argvdata/qemuxml2argv*.xml: Add disk controller
        data to all data files which don't have it already
      b030084f
  15. 16 1月, 2010 1 次提交
    • D
      Set default disk controller/bus/unit props · 776e37e1
      Daniel P. Berrange 提交于
      When parsing the <disk> element specification, if no <address>
      is provided for the disk, then automatically assign one based on
      the <target dev='sdXX'/> device name. This provides for backwards
      compatability with existing applications using libvirt, while also
      allowing new apps to have complete fine grained control.
      
      * src/conf/domain_conf.h, src/conf/domain_conf.c,
        src/libvirt_private.syms: Add virDomainDiskDefAssignAddress()
        for assigning a controller/bus/unit address based on disk target
      * src/qemu/qemu_conf.c: Call virDomainDiskDefAssignAddress() after
        generating XML from ARGV
      * tests/qemuxml2argvdata/*.xml: Add in drive address information
        to all XML files
      776e37e1
  16. 10 5月, 2008 1 次提交
  17. 19 7月, 2007 1 次提交