1. 17 11月, 2015 1 次提交
    • R
      bhyve: monitor: do not override domain's privateData · 89316b2c
      Roman Bogorodskiy 提交于
      Current monitor code overrides domain object's privateData, e.g.
      in virBhyveProcessStart():
      
        vm->privateData = bhyveMonitorOpen(vm, driver);
      
      where bhyveMonitorPtr() returns bhyveMonitorPtr.
      
      This is not right thing to do, so make bhyveMonitorPtr
      a part of the bhyveDomainObjPrivate struct and change related code
      accordingly.
      89316b2c
  2. 27 10月, 2015 1 次提交
  3. 21 10月, 2015 1 次提交
  4. 24 9月, 2015 1 次提交
  5. 23 7月, 2015 1 次提交
    • R
      bhyve: add UTC clock support · 6cb9ef1b
      Roman Bogorodskiy 提交于
      Bhyve as of r279225 (FreeBSD -CURRENT) or r284894 (FreeBSD 10-STABLE)
      supports using UTC time offset via the '-u' argument to bhyve(8). By
      default it's still using localtime.
      
      Make the bhyve driver use UTC clock if it's requested by specifying
      <clock offset='utc'> in domain XML and if the bhyve(8) binary supports
      the '-u' flag.
      6cb9ef1b
  6. 14 7月, 2015 3 次提交
  7. 24 5月, 2015 1 次提交
    • R
      bhyve: fix build with gcc48 · fcac0cf7
      Roman Bogorodskiy 提交于
      Build with gcc 4.8 fails with:
      
      bhyve/bhyve_monitor.c: In function 'bhyveMonitorIO':
      bhyve/bhyve_monitor.c:51:18: error: missing initializer for field 'tv_sec' of 'const struct timespec' [-Werror=missing-field-initializers]
           const struct timespec zerowait = {};
      
      Explicitly initialize zerowait to fix the build.
      fcac0cf7
  8. 24 4月, 2015 1 次提交
  9. 21 4月, 2015 3 次提交
  10. 23 3月, 2015 3 次提交
    • 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
    • M
      Fix common misspellings · 0e7457e5
      Martin Kletzander 提交于
      Wikipedia's list of common misspellings [1] has a machine-readable
      version.  This patch fixes those misspellings mentioned in the list
      which don't have multiple right variants (as e.g. "accension", which can
      be both "accession" and "ascension"), such misspellings are left
      untouched.  The list of changes was manually re-checked for false
      positives.
      
      [1] https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machinesSigned-off-by: NMartin Kletzander <mkletzan@redhat.com>
      0e7457e5
  11. 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
  12. 02 3月, 2015 1 次提交
  13. 06 2月, 2015 1 次提交
  14. 27 1月, 2015 1 次提交
    • 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
  15. 16 1月, 2015 1 次提交
  16. 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
  17. 13 1月, 2015 1 次提交
  18. 04 12月, 2014 1 次提交
  19. 15 11月, 2014 1 次提交
  20. 13 11月, 2014 2 次提交
    • C
      drvbhyve: Use boot-order for grub-bhyve boot device · cdbb21bc
      Conrad Meyer 提交于
      Rather than just picking the first CD (or failing that, HDD) we come
      across, if the user has picked a boot device ordering with <boot
      order=''>, respect that (and just try to boot the lowest-index device).
      
      Adds two sets of tests to bhyve2xmlargv; 'grub-bootorder' shows that we
      pick a user-specified device over the first device in the domain;
      'grub-bootorder2' shows that we pick the first (lowest index) device.
      cdbb21bc
    • C
      drvbhyve: Clean-up some used ATTRIBUTE_UNUSEDs. · 0dba4a4d
      Conrad Meyer 提交于
      0dba4a4d
  21. 12 11月, 2014 3 次提交
    • C
      bhyve: Add console support for grub-bhyve bootloader · 7c7c8b0b
      Conrad Meyer 提交于
      This enables booting interactive GRUB menus (e.g. install CDs) with
      libvirt-bhyve.
      
      Caveat: A terminal other than the '--console' option to 'virsh start'
      (e.g. 'cu -l /dev/nmdm0B -s 115200') must be used to connect to
      grub-bhyve because the bhyve loader path is synchronous and must occur
      before the VM actually starts.
      
      Changing the bhyveProcessStart logic around to accommodate '--console'
      for interactive loader use seems like a significant project and probably
      not worth it, if UEFI/BIOS support for bhyve is "coming soon."
      7c7c8b0b
    • C
      bhyve: Probe grub-bhyve for --cons-dev capability · 0cd4cd29
      Conrad Meyer 提交于
      0cd4cd29
    • C
      bhyve: Support /domain/bootloader configuration for non-FreeBSD guests. · 17722c16
      Conrad Meyer 提交于
      We still default to bhyveloader(1) if no explicit bootloader
      configuration is supplied in the domain.
      
      If the /domain/bootloader looks like grub-bhyve and the user doesn't
      supply /domain/bootloader_args, we make an intelligent guess and try
      chainloading the first partition on the disk (or a CD if one exists,
      under the assumption that for a VM a CD is likely an install source).
      
      Caveat: Assumes the HDD boots from the msdos1 partition. I think this is
      a pretty reasonable assumption for a VM. (DrvBhyve with Bhyveload
      already assumes that the first disk should be booted.)
      
      I've tested both HDD and CD boot and they seem to work.
      17722c16
  22. 23 10月, 2014 1 次提交
  23. 15 10月, 2014 1 次提交
  24. 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
  25. 20 8月, 2014 1 次提交
    • R
      bhyve: add volumes support · 6c2e7d0b
      Roman Bogorodskiy 提交于
      Update bhyveBuildDiskArgStr to support volumes:
      
       - Make virBhyveProcessBuildBhyveCmd and
         virBhyveProcessBuildLoadCmd take virConnectPtr as the
         first argument instead of bhyveConnPtr as virConnectPtr is
         needed for virStorageTranslateDiskSourcePool,
       - Add virStorageTranslateDiskSourcePool call to
         virBhyveProcessBuildBhyveCmd and
         virBhyveProcessBuildLoadCmd,
       - Allow disks of type VIR_STORAGE_TYPE_VOLUME
      6c2e7d0b
  26. 13 8月, 2014 1 次提交
  27. 24 7月, 2014 2 次提交
    • R
      bhyve: cdrom support · d704e698
      Roman Bogorodskiy 提交于
      Add support for CDROM devices for bhyve driver using
      bhyve(8)'s 'ahci-cd' device type.
      
      As bhyve currently does not support media insertion at runtime,
      disallow to start a domain with an empty source path for cdrom
      devices.
      d704e698
    • E
      metadata: track title edits across libvirtd restart · 60e49440
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1122205
      
      Although the edits were changing in-memory XML, it was not flushed
      to disk; so unless some other action changes XML, a libvirtd restart
      would lose the changed information.
      
      * src/conf/domain_conf.c (virDomainObjSetMetadata): Add parameter,
      to save live status across restarts.
      (virDomainSaveXML): Allow for test driver.
      * src/conf/domain_conf.h (virDomainObjSetMetadata): Adjust
      signature.
      * src/bhyve/bhyve_driver.c (bhyveDomainSetMetadata): Adjust caller.
      * src/lxc/lxc_driver.c (lxcDomainSetMetadata): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSetMetadata): Likewise.
      * src/test/test_driver.c (testDomainSetMetadata): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      60e49440
  28. 23 7月, 2014 1 次提交
    • J
      Introduce virTristateSwitch enum · 3227e17d
      Ján Tomko 提交于
      For the values "default", "on", "off"
      
      Replaces
      virDeviceAddressPCIMulti
      virDomainFeatureState
      virDomainIoEventFd
      virDomainVirtioEventIdx
      virDomainDiskCopyOnRead
      virDomainMemDump
      virDomainPCIRombarMode
      virDomainGraphicsSpicePlaybackCompression
      3227e17d
  29. 19 7月, 2014 1 次提交
    • R
      bhyve: reconnect to domains after libvirtd restart · 29e45ea1
      Roman Bogorodskiy 提交于
      Try to reconnect to the running domains after libvirtd restart. To
      achieve that, do:
      
       * Save domain state
        - Modify virBhyveProcessStart() to save domain state to the state
          dir
        - Modify virBhyveProcessStop() to cleanup the pidfile and the state
      
       * Detect if the state information loaded from the driver's state
         dir matches the actual state. Consider domain active if:
          - PID it points to exist
          - Process title of this PID matches the expected one with the
            domain name
      
         Otherwise, mark the domain as shut off.
      
      Note: earlier development bhyve versions before FreeBSD 10.0-RELEASE
      didn't set proctitle we expect, so the current code will not detect
      it. I don't plan adding support for this unless somebody requests
      this.
      29e45ea1
  30. 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