1. 16 1月, 2015 1 次提交
  2. 15 1月, 2015 13 次提交
  3. 14 1月, 2015 11 次提交
    • K
      libxl: Add support for parsing/formating Xen XL config · cec71a6b
      Kiarie Kahurani 提交于
      Now that xenconfig supports parsing and formatting Xen's
      XL config format, integrate it into the libxl driver's
      connectDomainXML{From,To}Native functions.
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      cec71a6b
    • K
      tests: Tests for the xen-xl parser · 4ed5fb91
      Kiarie Kahurani 提交于
      Add disk and spice config tests for the xen_xl config parser
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      4ed5fb91
    • J
      Introduce support for parsing/formatting Xen xl config format · 4689cdf7
      Jim Fehlig 提交于
      Introduce a parser/formatter for the xl config format.  Since the
      deprecation of xm/xend, the VM config file format has diverged as
      new features are added to libxl.  This patch adds support for parsing
      and formating the xl config format.  It supports the existing xm config
      format, plus adds support for spice graphics and xl disk config syntax.
      
      Disk config is specified a bit differently in xl as compared to xm.  In
      xl, disk config consists of comma-separated positional parameters and
      keyword/value pairs separated by commas. Positional parameters are
      specified as follows
      
         target, format, vdev, access
      
      Supported keys for key=value options are
      
        devtype, backendtype
      
      The positional paramters can also be specified in key/value form.  For
      example the following xl disk config are equivalent
      
          /dev/vg/guest-volume,,hda
          /dev/vg/guest-volume,raw,hda,rw
          format=raw, vdev=hda, access=rw, target=/dev/vg/guest-volume
      
      See $xen_sources/docs/misc/xl-disk-configuration.txt for more details.
      
      xl disk config is parsed with the help of xlu_disk_parse() from
      libxlutil, libxl's utility library.  Although the library exists
      in all Xen versions supported by the libxl virt driver, only
      recently has the corresponding header file been included.  A check
      for the header is done in configure.ac.  If not found, xlu_disk_parse()
      is declared externally.
      Signed-off-by: NKiarie Kahurani <davidkiarie4@gmail.com>
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      4689cdf7
    • P
      qemu_process: detect updated video ram size values from QEMU · ce745914
      Pavel Hrdina 提交于
      QEMU internally updates the size of video memory if the domain XML had
      provided too low memory size or there are some dependencies for a QXL
      devices 'vgamem' and 'ram' size. We need to know about the changes and
      store them into the status XML to not break migration or managedsave
      through different libvirt versions.
      
      The values would be loaded only if the "vgamem_mb" property exists for
      the device.  The presence of the "vgamem_mb" also tells that the
      "ram_size" and "vram_size" exists for QXL devices.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      ce745914
    • P
      qemu_monitor: introduce new function to get QOM path · cc41c648
      Pavel Hrdina 提交于
      The search is done recursively only through QOM object that has a type
      prefixed with "child<" as this indicate that the QOM is a parent for
      other QOM objects.
      
      The usage is that you give known device name with starting path where to
      search.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      cc41c648
    • P
      qemu_driver: fix setting vcpus for offline domain · e105dc98
      Pavel Hrdina 提交于
      Commit e3435caf fixed hot-plugging of vcpus with strict memory pinning
      on NUMA hosts, but unfortunately it also broke updating number of vcpus
      for offline guests using our API.
      
      The issue is that we try to create a cpu cgroup for non-running guest
      which fails as there are no cgroups for that domain. We should create
      cgroups and update cpuset.mems only if we are hot-plugging.
      Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
      e105dc98
    • M
      qemu, lxc: Warn if setting QoS on unsupported vNIC types · 04cf99a6
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1165993
      
      So, there are still plenty of vNIC types that we don't know how to set
      bandwidth on. Let's warn explicitly in case user has requested it
      instead of pretending everything was set.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      04cf99a6
    • S
      qemu: snapshot: inactive external snapshot can't work after libvirtd restart · 9f974858
      Shanzhi Yu 提交于
      When create inactive external snapshot, after update disk definitions,
      virDomainSaveConfig is needed, if not after restart libvirtd the new snapshot
      file definitions in xml will be lost.
      
      Reproduce steps:
      
      1. prepare a shut off guest
      $ virsh domstate rhel7 && virsh domblklist rhel7
      shut off
      
      Target     Source
      ------------------------------------------------
      vda        /var/lib/libvirt/images/rhel7.img
      
      2. create external disk snapshot
      $ virsh snapshot-create rhel7 --disk-only && virsh domblklist rhel7
      Domain snapshot 1417882967 created
      Target     Source
      ------------------------------------------------
      vda        /var/lib/libvirt/images/rhel7.1417882967
      
      3. restart libvirtd then check guest source file
      $ service  libvirtd restart && virsh domblklist rhel7
      Redirecting to /bin/systemctl restart  libvirtd.service
      Target     Source
      ------------------------------------------------
      vda        /var/lib/libvirt/images/rhel7.img
      
      This was first reported by Eric Blake
      http://www.redhat.com/archives/libvir-list/2014-December/msg00369.htmlSigned-off-by: NShanzhi Yu <shyu@redhat.com>
      9f974858
    • M
      conf: Increase virNetDevBandwidthParse intelligence · a605025c
      Michal Privoznik 提交于
      There's this function virNetDevBandwidthParse which parses the
      bandwidth XML snippet. But it's not clever much. For the
      following XML it allocates the virNetDevBandwidth structure even
      though it's completely empty:
      
          <bandwidth>
          </bandwidth>
      
      Later in the code there are some places where we check if
      bandwidth was set or not. And since we obtained pointer from the
      parsing function we think that it is when in fact it isn't.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a605025c
    • D
      Give virDomainDef parser & formatter their own flags · 0ecd6851
      Daniel P. Berrange 提交于
      The virDomainDefParse* and virDomainDefFormat* methods both
      accept the VIR_DOMAIN_XML_* flags defined in the public API,
      along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags
      defined in domain_conf.c.
      
      This is seriously confusing & error prone for a number of
      reasons:
      
       - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and
         VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the
         formatting operation
       - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply
         to parse or to format, but not both.
      
      This patch cleanly separates out the flags. There are two
      distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_*
      flags that are used by the corresponding methods. The
      VIR_DOMAIN_XML_* flags received via public API calls must
      be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where
      needed.
      
      The various calls to virDomainDefParse which hardcoded the
      use of the VIR_DOMAIN_XML_INACTIVE flag change to use the
      VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
      0ecd6851
    • D
      Decouple CPU XML formatting from domain XML public API flags · e34473c1
      Daniel P. Berrange 提交于
      The virCPUDefFormat* methods were relying on the VIR_DOMAIN_XML_*
      flag definitions. It is not desirable for low level internal
      functions to be coupled to flags for the public API, since they
      may need to be called from several different contexts where the
      flags would not be appropriate.
      e34473c1
  4. 13 1月, 2015 15 次提交