1. 13 11月, 2014 1 次提交
  2. 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
  3. 23 10月, 2014 1 次提交
  4. 15 10月, 2014 1 次提交
  5. 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
  6. 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
  7. 13 8月, 2014 1 次提交
  8. 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
  9. 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
  10. 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
  11. 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
  12. 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
  13. 27 6月, 2014 1 次提交
  14. 26 6月, 2014 2 次提交
  15. 19 6月, 2014 1 次提交
  16. 14 6月, 2014 3 次提交
    • R
      bhyve: silent destroy command errors on cleanup · f477f555
      Roman Bogorodskiy 提交于
      When virBhyveProcessStart() fails, it tries to unload
      a guest that could have been already loaded using
      bhyveload(8) to make sure not to leave it hanging in memory.
      
      However, we could fail before loading a VM into memory,
      so 'bhyvectl --destroy' command will fail and print
      an error message that looks confusing to users.
      
      So ignore errors when running this in cleanup.
      f477f555
    • R
      bhyve: do not cleanup unallocated networks on fail · 5c1f82ef
      Roman Bogorodskiy 提交于
      virBhyveProcessStart() calls bhyveNetCleanup() if it fails. However,
      it might fail earlier than networks are allocated, so modify
      bhyveNetCleanup() to check if net->ifname is not NULL before
      going further with the cleanup.
      5c1f82ef
    • R
      bhyve: fix crash in bhyveBuildNetArgStr · 381a3dbd
      Roman Bogorodskiy 提交于
      bhyveBuildNetArgStr() calls virNetDevTapCreateInBridgePort() and
      passes tapfd = NULL, but tapfdSize = 1. That is wrong, because
      if virNetDevTapCreateInBridgePort() crashes after successfully
      creating a TAP device, it'll jump to 'error' label, that
      loops over tapfd and calls VIR_FORCE_CLOSE:
      
         for (i = 0; i < tapfdSize && tapfd[i] >= 0; i++)
      
      In that case we get a segfault.
      
      As the bhyve code doesn't use tapfd, pass NULL and set tapfdSize to 0.
      381a3dbd
  17. 13 6月, 2014 1 次提交
    • R
      bhyve: implement PCI address allocation · aad479dc
      Roman Bogorodskiy 提交于
      Automatically allocate PCI addresses for devices instead
      of hardcoding them in the driver code. The current
      allocation schema is to dedicate an entire slot for each devices.
      
      Also, allow having arbitrary number of devices.
      aad479dc
  18. 21 5月, 2014 2 次提交
    • R
      bhyve: fix virObjectUnlock() usage · 344582a8
      Roman Bogorodskiy 提交于
      In a number of places in the bhyve driver, virObjectUnlock()
      is called with an arg without check if the arg is non-NULL, which
      could result in passing NULL value and a warning like:
      
      virObjectUnlock:340 : Object 0x0 ((unknown)) is not a virObjectLockable instance
      
      * src/bhyve/bhyve_driver.c (bhyveDomainGetInfo)
      (bhyveDomainGetState, bhyveDomainGetAutostart)
      (bhyveDomainSetAutostart, bhyveDomainIsActive)
      (bhyveDomainIsPersistent, bhyveDomainGetXMLDesc)
      (bhyveDomainUndefine, bhyveDomainLookupByUUID)
      (bhyveDomainLookupByName, bhyveDomainLookupByID)
      (bhyveDomainCreateWithFlags, bhyveDomainOpenConsole):
      Check if arg is not NULL before calling virObjectUnlock on it.
      344582a8
    • R
      bhyve: domain events support · 5c13c320
      Roman Bogorodskiy 提交于
      Support events for these functions:
      
       - domainDefineXML
       - domainUndefine
       - domainCreate{WithFlags,XML}
       - domainDestroy
      5c13c320
  19. 12 5月, 2014 1 次提交
  20. 05 5月, 2014 1 次提交
    • R
      bhyve: report cpuTime in bhyveDomainGetInfo · 0541727c
      Roman Bogorodskiy 提交于
      Add a helper function virBhyveGetDomainTotalCpuStats() to
      obtain process CPU time using kvm (kernel memory interface)
      and use it to set cpuTime field of the virDomainInfo struct in
      bhyveDomainGetInfo().
      0541727c
  21. 04 5月, 2014 2 次提交
    • R
      bhyve: implement connectDomainXMLToNative · 747ed3e6
      Roman Bogorodskiy 提交于
      The only accepted format for now is 'bhyve-argv' which
      prints out a bhyve command corresponding to the given
      domain definition.
      747ed3e6
    • R
      bhyve: improve bhyve_command.c testability · 07e371fc
      Roman Bogorodskiy 提交于
      * bhyve_command.c (bhyveBuildNetArgStr, virBhyveProcessBuildBhyveCmd):
        add dryRun mode which doesn't create any devices when enabled
      * bhyve_command.c (virBhyveProcessBuildBhyveCmd,
        virBhyveProcessBuildDestroyCmd, virBhyveProcessBuildLoadCmd): accept
        virDomainDefPtr instead of virDomainObjPtr.
      07e371fc
  22. 23 4月, 2014 1 次提交
    • R
      bhyve: bhyveDomainDefineXML fixes · fa8a389e
      Roman Bogorodskiy 提交于
      - do not lose new definition for an active domain
      - do not leak oldDef
      - do not set dom->id if virDomainSaveConfig() fails
      - do not call virObjectUnlock(vm) if vm is NULL
      fa8a389e
  23. 20 4月, 2014 1 次提交
  24. 12 4月, 2014 1 次提交
  25. 09 4月, 2014 2 次提交
    • R
      bhyve: add domain metadata support · b291cb5e
      Roman Bogorodskiy 提交于
      Implement domainSetMetadata and domainGetMetadata driver calls.
      b291cb5e
    • R
      bhyve: fix ATTRIBUTE_NONNULL usage · 986a07c7
      Roman Bogorodskiy 提交于
      Fix incorrect ATTRIBUTE_NONNULL usage introduced in 17b17565
      which caused build failure:
      
      bhyve/bhyve_driver.c:127:48: error: expected ')'
      bhyveDriverGetCapabilities(bhyveConnPtr driver ATTRIBUTE_NONNULL)
                                                     ^
      bhyve/bhyve_driver.c:127:27: note: to match this '('
      bhyveDriverGetCapabilities(bhyveConnPtr driver ATTRIBUTE_NONNULL)
      
      Pushed under the build breaker rule.
      986a07c7
  26. 08 4月, 2014 3 次提交
  27. 07 4月, 2014 2 次提交