1. 14 7月, 2015 3 次提交
  2. 24 6月, 2015 1 次提交
    • L
      Improve some errors for openconsole/channel · 898e76f0
      Luyao Huang 提交于
      Functions like virDomainOpenConsole() and virDomainOpenChannel() accept
      NULL as a dev_name parameter.  Try using alias for the error message if
      dev_name is not specified.
      
      Before:
        error: internal error: character device <null> is not using a PTY
      
      After:
        error: internal error: character device serial0 is not using a PTY
      Signed-off-by: NLuyao Huang <lhuang@redhat.com>
      898e76f0
  3. 24 4月, 2015 2 次提交
  4. 21 4月, 2015 4 次提交
  5. 02 4月, 2015 1 次提交
    • J
      Remove unused macros · a0482396
      Ján Tomko 提交于
      In the order of appearance:
      
      * MAX_LISTEN - never used
        added by 23ad665c (qemud) and addec57 (lock daemon)
      
      * NEXT_FREE_CLASS_ID - never used, added by 07d1b6b5
      
      * virLockError - never used, added by eb8268a4
      
      * OPENVZ_MAX_ARG, CMDBUF_LEN, CMDOP_LEN
        unused since the removal of ADD_ARG_LIT in d8b31306
      
      * QEMU_NB_PER_CPU_STAT_PARAM - unused since 897808e7
      
      * QEMU_CMD_PROMPT, QEMU_PASSWD_PROMPT - unused since 1dc10a7b
      
      * TEST_MODEL_WORDSIZE - unused since c25c18f7
      
      * TEMPDIR - never used, added by 714bef5b
      
      * NSIG - workaround around old headers
        added by commit 60ed1d2a
        unused since virExec was moved by commit 02e86910
      
      * DO_TEST_PARSE - never used, added by 9afa0060
      
      * DIFF_MSEC, GETTIMEOFDAY - unused since eee6eb66
      a0482396
  6. 23 3月, 2015 2 次提交
    • P
      conf: Add interface to parse and format memory device information · 3e4230d2
      Peter Krempa 提交于
      This patch adds code that parses and formats configuration for memory
      devices.
      
      A simple configuration would be:
      <memory model='dimm'>
        <target>
          <size unit='KiB'>524287</size>
          <node>0</node>
        </target>
      </memory>
      
      A complete configuration of a memory device:
      <memory model='dimm'>
        <source>
          <pagesize unit='KiB'>4096</pagesize>
          <nodemask>1-3</nodemask>
        </source>
        <target>
          <size unit='KiB'>524287</size>
          <node>1</node>
        </target>
      </memory>
      
      This patch preemptively forbids use of the <memory> device in individual
      drivers so the users are warned right away that the device is not
      supported.
      3e4230d2
    • P
      conf: Add support for parsing and formatting max memory and slot count · bffb9163
      Peter Krempa 提交于
      Add a XML element that will allow to specify maximum supportable memory
      and the count of memory slots to use with memory hotplug.
      
      To avoid possible confusion and misuse of the new element this patch
      also explicitly forbids the use of the maxMemory setting in individual
      drivers's post parse callbacks. This limitation will be lifted when the
      support is implemented.
      bffb9163
  7. 16 3月, 2015 1 次提交
    • P
      conf: Replace access to def->mem.max_balloon with accessor functions · 4f9907cd
      Peter Krempa 提交于
      As there are two possible approaches to define a domain's memory size -
      one used with legacy, non-NUMA VMs configured in the <memory> element
      and per-node based approach on NUMA machines - the user needs to make
      sure that both are specified correctly in the NUMA case.
      
      To avoid this burden on the user I'd like to replace the NUMA case with
      automatic totaling of the memory size. To achieve this I need to replace
      direct access to the virDomainMemtune's 'max_balloon' field with
      two separate getters depending on the desired size.
      
      The two sizes are needed as:
      1) Startup memory size doesn't include memory modules in some
      hypervisors.
      2) After startup these count as the usable memory size.
      
      Note that the comments for the functions are future aware and document
      state that will be present after a few later patches.
      4f9907cd
  8. 06 2月, 2015 1 次提交
  9. 27 1月, 2015 2 次提交
    • 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
    • D
      Remove use of nwfilterPrivateData from nwfilter driver · 7b1ba956
      Daniel P. Berrange 提交于
      The nwfilter driver can rely on its global state instead
      of the connect private data.
      7b1ba956
  10. 16 1月, 2015 1 次提交
  11. 14 1月, 2015 1 次提交
    • 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
  12. 13 1月, 2015 1 次提交
  13. 06 1月, 2015 1 次提交
  14. 03 12月, 2014 1 次提交
    • J
      Replace virNetworkFree with virObjectUnref · 121c09a9
      John Ferlan 提交于
      Since virNetworkFree will call virObjectUnref anyway, let's just use that
      directly so as to avoid the possibility that we inadvertently clear out
      a pending error message when using the public API.
      121c09a9
  15. 15 11月, 2014 1 次提交
  16. 29 10月, 2014 1 次提交
    • E
      maint: avoid static zero init in drivers · ec81cf89
      Eric Blake 提交于
      C guarantees that static variables are zero-initialized.  Some older
      compilers (and also gcc -fno-zero-initialized-in-bss) create larger
      binaries if you explicitly zero-initialize a static variable.
      
      * src/libxl/libxl_driver.c: Fix initialization.
      * src/lxc/lxc_controller.c: Likewise.
      * src/openvz/openvz_util.c (openvzKBPerPages): Likewise.
      * src/phyp/phyp_driver.c: Likewise.
      * src/remote/remote_driver.c: Likewise.
      * src/test/test_driver.c: Likewise.
      * src/uml/uml_driver.c: Likewise.
      * src/vbox/vbox_XPCOMCGlue.c: Likewise.
      * src/vbox/vbox_tmpl.c: Likewise.
      * src/xen/xen_driver.c: Likewise.
      * src/xen/xen_hypervisor.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ec81cf89
  17. 23 10月, 2014 1 次提交
  18. 15 10月, 2014 1 次提交
  19. 26 9月, 2014 1 次提交
  20. 25 9月, 2014 1 次提交
  21. 16 9月, 2014 1 次提交
    • J
      Wire up the interface backend options · b20d39a5
      Ján Tomko 提交于
      Pass the user-specified tun path down when creating tap device
      when called from the qemu driver.
      
      Also honor the vhost device path specified by user.
      b20d39a5
  22. 05 9月, 2014 1 次提交
    • E
      maint: use consistent if-else braces in remaining spots · d194d6e7
      Eric Blake 提交于
      I'm about to add a syntax check that enforces our documented
      HACKING style of always using matching {} on if-else statements.
      
      This patch focuses on all remaining problems, where there weren't
      enough issues to warrant splitting it further.
      
      * src/remote/remote_driver.c (doRemoteOpen): Correct use of {}.
      * src/security/virt-aa-helper.c (vah_add_path, valid_path, main):
      Likewise.
      * src/rpc/virnetsocket.c (virNetSocketNewConnectLibSSH2):
      Likewise.
      * src/esx/esx_vi_types.c (esxVI_Type_FromString): Likewise.
      * src/uml/uml_driver.c (umlDomainDetachDevice): Likewise.
      * src/util/viralloc.c (virShrinkN): Likewise.
      * src/util/virbuffer.c (virBufferURIEncodeString): Likewise.
      * src/util/virdbus.c (virDBusCall): Likewise.
      * src/util/virnetdev.c (virNetDevValidateConfig): Likewise.
      * src/util/virnetdevvportprofile.c
      (virNetDevVPortProfileGetNthParent): Likewise.
      * src/util/virpci.c (virPCIDeviceIterDevices)
      (virPCIDeviceWaitForCleanup)
      (virPCIDeviceIsBehindSwitchLackingACS): Likewise.
      * src/util/virsocketaddr.c (virSocketAddrGetNumNetmaskBits):
      Likewise.
      * src/util/viruri.c (virURIParseParams): Likewise.
      * daemon/stream.c (daemonStreamHandleAbort): Likewise.
      * tests/testutils.c (virtTestResult): Likewise.
      * tests/cputest.c (cpuTestBaseline): Likewise.
      * tools/virsh-domain.c (cmdDomPMSuspend): Likewise.
      * tools/virsh-host.c (cmdNodeSuspend): Likewise.
      * src/esx/esx_vi_generator.py (Type.generate_typefromstring):
      Tweak generated code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d194d6e7
  23. 17 7月, 2014 1 次提交
    • M
      support for QEMU vhost-user · a14abd46
      Michele Paolino 提交于
      This patch adds support for the QEMU vhost-user feature to libvirt.
      vhost-user enables the communication between a QEMU virtual machine
      and other userspace process using the Virtio transport protocol.
      It uses a char dev (e.g. Unix socket) for the control plane,
      while the data plane based on shared memory.
      
      The XML looks like:
      
      <interface type='vhostuser'>
          <mac address='52:54:00:3b:83:1a'/>
          <source type='unix' path='/tmp/vhost.sock' mode='server'/>
          <model type='virtio'/>
      </interface>
      Signed-off-by: NMichele Paolino <m.paolino@virtualopensystems.com>
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a14abd46
  24. 16 7月, 2014 1 次提交
    • R
      util: virstatslinux: make more generic · 5559a8b8
      Roman Bogorodskiy 提交于
      Rename linuxDomainInterfaceStats to virNetInterfaceStats in order
      to allow adding platform specific implementations without
      making consumer worrying about specific implementation to be used.
      
      Also, rename util/virstatslinux.c to util/virstats.c so placing
      other platform specific implementations into this file don't
      look unexpected from the file name.
      5559a8b8
  25. 14 7月, 2014 1 次提交
    • E
      capabilities: use bool instead of int · 58156f39
      Eric Blake 提交于
      While preparing to add a capability for active commit, I noticed
      that the existing code was abusing int for boolean values.
      
      * src/conf/capabilities.h (_virCapsGuestFeature, _virCapsHost)
      (virCapabilitiesNew, virCapabilitiesAddGuestFeature): Improve
      types.
      * src/conf/capabilities.c (virCapabilitiesNew)
      (virCapabilitiesAddGuestFeature): Adjust signature.
      * src/bhyve/bhyve_capabilities.c (virBhyveCapsBuild): Update
      clients.
      * src/esx/esx_driver.c (esxCapsInit): Likewise.
      * src/libxl/libxl_conf.c (libxlMakeCapabilities): Likewise.
      * src/lxc/lxc_conf.c (virLXCDriverCapsInit): Likewise.
      * src/openvz/openvz_conf.c (openvzCapsInit): Likewise.
      * src/parallels/parallels_driver.c (parallelsBuildCapabilities):
      Likewise.
      * src/phyp/phyp_driver.c (phypCapsInit): Likewise.
      * src/qemu/qemu_capabilities.c (virQEMUCapsInit)
      (virQEMUCapsInitGuestFromBinary): Likewise.
      * src/security/virt-aa-helper.c (get_definition): Likewise.
      * src/test/test_driver.c (testBuildCapabilities): Likewise.
      * src/uml/uml_conf.c (umlCapsInit): Likewise.
      * src/vbox/vbox_tmpl.c (vboxCapsInit): Likewise.
      * src/vmware/vmware_conf.c (vmwareCapsInit): Likewise.
      * src/xen/xen_hypervisor.c (xenHypervisorBuildCapabilities):
      Likewise.
      * src/xenapi/xenapi_driver.c (getCapsObject): Likewise.
      * tests/qemucaps2xmltest.c (testGetCaps): Likewise.
      * tests/testutils.c (virTestGenericCapsInit): Likewise.
      * tests/testutilslxc.c (testLXCCapsInit): Likewise.
      * tests/testutilsqemu.c (testQemuCapsInit): Likewise.
      * tests/testutilsxen.c (testXenCapsInit): Likewise.
      * tests/vircaps2xmltest.c (buildVirCapabilities): Likewise.
      * tests/vircapstest.c (buildNUMATopology): Likewise.
      * tests/vmx2xmltest.c (testCapsInit): Likewise.
      * tests/xml2vmxtest.c (testCapsInit): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      58156f39
  26. 03 7月, 2014 2 次提交
    • J
      Use virBufferCheckError everywhere we report OOM error · 92a8e72f
      Ján Tomko 提交于
      Replace:
      if (virBufferError(&buf)) {
          virBufferFreeAndReset(&buf);
          virReportOOMError();
          ...
      }
      
      with:
      if (virBufferCheckError(&buf) < 0)
          ...
      
      This should not be a functional change (unless some callers
      misused the virBuffer APIs - a different error would be reported
      then)
      92a8e72f
    • J
      Report errors in virCapabilitiesFormatXML · 28b9be24
      Ján Tomko 提交于
      So far, we only report an error if formatting the siblings bitmap
      in NUMA topology fails.
      
      Be consistent and always report error in virCapabilitiesFormatXML.
      28b9be24
  27. 26 6月, 2014 1 次提交
    • J
      enhance hostdev mode 'capabilities' process · 01e508f3
      Jincheng Miao 提交于
      Currently, only LXC has hostdev mode 'capabilities' support,
      so the other drivers should forbid to define it in XML.
      The hostdev mode check is added to devicesPostParseCallback()
      for each hypervisor driver.
      
      But there are some drivers lack function devicesPostParseCallback(),
      so only add check for qemu, libxl, openvz, uml, xen, xenapi.
      Signed-off-by: NJincheng Miao <jmiao@redhat.com>
      01e508f3
  28. 19 6月, 2014 2 次提交
  29. 22 4月, 2014 1 次提交
  30. 25 3月, 2014 1 次提交