1. 29 1月, 2015 1 次提交
    • M
      qemu: Allow UEFI paths to be specified at compile time · bc03a231
      Michal Privoznik 提交于
      Up until now there are just two ways how to specify UEFI paths to
      libvirt. The first one is editing qemu.conf, the other is editing
      qemu_conf.c and recompile which is not that fancy. So, new
      configure option is introduced: --with-loader-nvram which takes a
      list of pairs of UEFI firmware and NVRAM store. This way, the
      compiled in defaults can be passed during compile time without
      need to change the code itself.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      bc03a231
  2. 27 1月, 2015 3 次提交
    • D
      qemu: report TAP device indexes to systemd · f7afeddc
      Daniel P. Berrange 提交于
      Record the index of each TAP device created and report them to
      systemd, so they show up in machinectl status for the VM.
      f7afeddc
    • D
      Removing probing of secondary drivers · 55ea7be7
      Daniel P. Berrange 提交于
      For stateless, client side drivers, it is never correct to
      probe for secondary drivers. It is only ever appropriate to
      use the secondary driver that is associated with the
      hypervisor in question. As a result the ESX & HyperV drivers
      have both been forced to do hacks where they register no-op
      drivers for the ones they don't implement.
      
      For stateful, server side drivers, we always just want to
      use the same built-in shared driver. The exception is
      virtualbox which is really a stateless driver and so wants
      to use its own server side secondary drivers. To deal with
      this virtualbox has to be built as 3 separate loadable
      modules to allow registration to work in the right order.
      
      This can all be simplified by introducing a new struct
      recording the precise set of secondary drivers each
      hypervisor driver wants
      
      struct _virConnectDriver {
          virHypervisorDriverPtr hypervisorDriver;
          virInterfaceDriverPtr interfaceDriver;
          virNetworkDriverPtr networkDriver;
          virNodeDeviceDriverPtr nodeDeviceDriver;
          virNWFilterDriverPtr nwfilterDriver;
          virSecretDriverPtr secretDriver;
          virStorageDriverPtr storageDriver;
      };
      
      Instead of registering the hypervisor driver, we now
      just register a virConnectDriver instead. This allows
      us to remove all probing of secondary drivers. Once we
      have chosen the primary driver, we immediately know the
      correct secondary drivers to use.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      55ea7be7
    • M
      tests: Check for virQEMUDriverConfigNew return value · c6ec7c6b
      Michal Privoznik 提交于
      The function may return NULL if something went wrong. In some places
      in the tests we are not checking the return value rather than
      accessing the pointer directly resulting in SIGSEGV.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      c6ec7c6b
  3. 26 1月, 2015 1 次提交
  4. 23 1月, 2015 2 次提交
    • J
      Fix build with older gcc · d66e136b
      Ján Tomko 提交于
      My commit af1c98e4 broke the build on RHEL-6:
      vircgrouptest.c: In function 'testCgroupGetPercpuStats':
      vircgrouptest.c:566: error: nested extern declaration of
      '_gl_verify_function2' [-Wnested-externs]
      
      The only thing that needs checking is that the array size
      is at least EXPECTED_NCPUS, to prevent access beyond the array.
      
      We can ensure the minimum size also by specifying the array
      size upfront.
      d66e136b
    • J
      Fix virCgroupGetPercpuStats with non-continuous present CPUs · af1c98e4
      Ján Tomko 提交于
      Per-cpu stats are only shown for present CPUs in the cgroups,
      but we were only parsing the largest CPU number from
      /sys/devices/system/cpu/present and looking for stats even for
      non-present CPUs.
      This resulted in:
      internal error: cpuacct parse error
      af1c98e4
  5. 21 1月, 2015 2 次提交
    • J
      qemu: format server interface without a listen address · 280ece4a
      Ján Tomko 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1130390
      
      The listen address is not mandatory for <interface type='server'>
      but when it's not specified, we've been formatting it as:
      -netdev socket,listen=(null):5558,id=hostnet0
      which failed with:
      Device 'socket' could not be initialized
      
      Omit the address completely and only format the port in the listen
      attribute.
      
      Also fix the schema to allow specifying a model.
      280ece4a
    • J
      tests: fix xlconfigtest build failure · e274d588
      Jim Fehlig 提交于
      When libvirt is configured --without-xen, building the xlconfigtest
      fails with
      
        CCLD   xlconfigtest
        /usr/lib/gcc/x86_64-linux-gnu/4.7/../../../x86_64-linux-gnu/crt1.o
        In function `_start': (.text+0x20): undefined reference to `main'
        collect2: error: ld returned 1 exit status
      
      Introduced in commit 4ed5fb91 by too much copy and paste from
      xmconfigtest.
      e274d588
  6. 20 1月, 2015 1 次提交
    • J
      network: Let domains be restricted to local DNS · 298fa485
      Josh Stone 提交于
      This adds a new "localOnly" attribute on the domain element of the
      network xml.  With this set to "yes", DNS requests under that domain
      will only be resolved by libvirt's dnsmasq, never forwarded upstream.
      
      This was how it worked before commit f69a6b98, and I found that
      functionality useful.  For example, I have my host's NetworkManager
      dnsmasq configured to forward that domain to libvirt's dnsmasq, so I can
      easily resolve guest names from outside.  But if libvirt's dnsmasq
      doesn't know a name and forwards it to the host, I'd get an endless
      forwarding loop.  Now I can set localOnly="yes" to prevent the loop.
      Signed-off-by: NJosh Stone <jistone@redhat.com>
      298fa485
  7. 19 1月, 2015 2 次提交
  8. 16 1月, 2015 5 次提交
  9. 15 1月, 2015 2 次提交
  10. 14 1月, 2015 4 次提交
    • 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
    • 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
  11. 13 1月, 2015 2 次提交
  12. 12 1月, 2015 1 次提交
  13. 08 1月, 2015 2 次提交
    • G
      vmx: Fix a VMX parsing problem · bb072e8a
      Geoff Hickey 提交于
      VMware ESX does not always set the "serialX.fileType" tag in VMX files. The
      default value for this tag is "device", and when adding a new serial port
      of this type VMware will omit the fileType tag. This caused libvirt to
      fail to parse the VMX file. Fixed by making this tag optional and using
      "device" as a default value. Also updated vmx2xmltest to test for this
      case.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bb072e8a
    • S
      nwfilter: Add support for icmpv6 filtering · 3a3b3691
      Stefan Berger 提交于
      Make use of the ebtables functionality to be able to filter certain
      parameters of icmpv6 packets. Extend the XML parser for icmpv6 types,
      type ranges, codes, and code ranges. Extend the nwfilter documentation,
      schema, and test cases.
      
      Being able to filter icmpv6 types and codes helps extending the DHCP
      snooper for IPv6 and filtering at least some parameters of IPv6's NDP
      (Neighbor Discovery Protocol) packets. However, the filtering will not
      be as good as the filtering of ARP packets since we cannot
      check on IP addresses in the payload of the NDP packets.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      3a3b3691
  14. 06 1月, 2015 6 次提交
  15. 05 1月, 2015 1 次提交
    • C
      Add tests to xmconfigtest · 262d913f
      Chunyan Liu 提交于
      Add tests to testing HVM default features (pae, acpi, apic)
      conversion from xm config to libvirt xml. If no pae|acpi|apic
      specified in xm config, after conversion, libvirt xml should
      by default include:
       <features>
         <pae/>
         <apic/>
         <acpi/>
       </features>
      Signed-off-by: NChunyan Liu <cyliu@suse.com>
      262d913f
  16. 04 1月, 2015 1 次提交
  17. 25 12月, 2014 1 次提交
  18. 23 12月, 2014 2 次提交
  19. 19 12月, 2014 1 次提交
    • M
      qemu: Create memory-backend-{ram,file} iff needed · f309db1f
      Michal Privoznik 提交于
      Libvirt BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1175397
      QEMU BZ:    https://bugzilla.redhat.com/show_bug.cgi?id=1170093
      
      In qemu there are two interesting arguments:
      
      1) -numa to create a guest NUMA node
      2) -object memory-backend-{ram,file} to tell qemu which memory
      region on which host's NUMA node it should allocate the guest
      memory from.
      
      Combining these two together we can instruct qemu to create a
      guest NUMA node that is tied to a host NUMA node. And it works
      just fine. However, depending on machine type used, there might
      be some issued during migration when OVMF is enabled (see QEMU
      BZ). While this truly is a QEMU bug, we can help avoiding it. The
      problem lies within the memory backend objects somewhere. Having
      said that, fix on our side consists on putting those objects on
      the command line if and only if needed. For instance, while
      previously we would construct this (in all ways correct) command
      line:
      
          -object memory-backend-ram,size=256M,id=ram-node0 \
          -numa node,nodeid=0,cpus=0,memdev=ram-node0
      
      now we create just:
      
          -numa node,nodeid=0,cpus=0,mem=256
      
      because the backend object is obviously not tied to any specific
      host NUMA node.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      f309db1f