1. 09 12月, 2015 3 次提交
  2. 22 9月, 2015 1 次提交
  3. 17 9月, 2015 1 次提交
    • M
      vmx: Expose datacenter path in domain XML · 636a9905
      Matthias Bolte 提交于
      Tool such as libguestfs need the datacenter path to get access to disk
      images. The ESX driver knows the correct datacenter path, but this
      information cannot be accessed using libvirt API yet. Also, it cannot
      be deduced from the connection URI in a robust way.
      
      Expose the datacenter path in the domain XML as <vmware:datacenterpath>
      node similar to the way the <qemu:commandline> node works. The new node
      is ignored while parsing the domain XML. In contrast to <qemu:commandline>
      it is output only.
      636a9905
  4. 08 9月, 2015 2 次提交
  5. 05 9月, 2015 1 次提交
  6. 13 8月, 2015 1 次提交
    • J
      conf: Check for hostdev conflicts when assign default disk address · 1b08cc17
      John Ferlan 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1210587  (completed)
      
      When generating the default drive address for a SCSI <disk> device,
      check the generated address to ensure it doesn't conflict with a SCSI
      <hostdev> address. The <disk> address generation algorithm uses the
      <target> "dev" name in order to determine which controller and unit
      in order to place the device. Since a SCSI <hostdev> device doesn't
      require a target device name, its placement on the guest SCSI address
      "could" conflict.  For instance, if a SCSI <hostdev> exists at
      controller=0 unit=0 and an attempt to hotplug 'sda' into the guest
      made, there would be a conflict if the <hostdev> is already using
      /dev/sda.
      1b08cc17
  7. 30 6月, 2015 1 次提交
    • J
      Use the correct symbol for 'onCrash' · 5cd98522
      John Ferlan 提交于
      Although defined the same way, fortunately there hadn't been any deviation.
      Ensure any assignments to onCrash use VIR_DOMAIN_LIFECYCLE_CRASH_* defs and
      not VIR_DOMAIN_LIFECYCLE_* defs
      5cd98522
  8. 15 5月, 2015 1 次提交
  9. 21 4月, 2015 1 次提交
  10. 23 3月, 2015 1 次提交
    • 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
  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. 13 3月, 2015 1 次提交
  13. 21 2月, 2015 1 次提交
  14. 08 1月, 2015 1 次提交
    • 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
  15. 15 11月, 2014 1 次提交
  16. 15 10月, 2014 1 次提交
  17. 03 7月, 2014 1 次提交
    • 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
  18. 08 6月, 2014 1 次提交
    • M
      vmx: Relax virtualHW.version check · 0e4370ed
      Matthias Bolte 提交于
      The original implementation of the VMX config parser assumed that the
      virtualHW.version would have more influence on the content of the VMX
      file than it actually seems to have. It started with accepting only
      version 4. Additonal versions were added later without any additional
      changes in the parser itself. This suggests that the influence of the
      virtualHW.version on the content and format of the VMX file is small
      or non-existent.
      
      The parser worked without any changes across several virtualHW and
      vSphere versions. So instead of adding new virtualHW.version values to
      the parser as they come along, or adding an extra flag to allow unknown
      virtualHW.version values just relax the check to require version 4 or
      later.
      0e4370ed
  19. 06 6月, 2014 1 次提交
    • E
      conf: consolidate disk def allocation · bc3f5f19
      Eric Blake 提交于
      A future patch wants to create disk definitions with non-zero
      default contents; to avoid crashes, all callers that allocate
      a disk definition should go through a common point.
      
      I found allocation points by looking for any code that increments
      ndisks, as well as any matches for ALLOC.*disk.  Most places that
      modified ndisks were covered by the parse from XML to domain/device
      definition by initial domain creation or device hotplug; I also
      hand-checked all drivers that generate a device struct on the
      fly during getXMLDesc.
      
      * src/conf/domain_conf.h (virDomainDiskDefNew): New prototype.
      * src/conf/domain_conf.c (virDomainDiskDefNew): New function.
      (virDomainDiskDefParseXML): Use it.
      * src/parallels/parallels_driver.c (parallelsAddHddInfo):
      Likewise.
      * src/qemu/qemu_command.c (qemuParseCommandLine): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc): Likewise.
      * src/vmx/vmx.c (virVMXParseDisk): Likewise.
      * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenParseSxpr):
      Likewise.
      * src/xenxs/xen_xm.c (xenParseXM): Likewise.
      * src/libvirt_private.syms (domain_conf.h): Export it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      bc3f5f19
  20. 08 4月, 2014 1 次提交
  21. 02 4月, 2014 1 次提交
    • E
      conf: move host disk type to util/ · 16ac4c9d
      Eric Blake 提交于
      A continuation of the migration of disk details to virstoragefile.
      This patch moves a single enum, but converting the name has quite
      a bit of fallout.
      
      * src/conf/domain_conf.h (virDomainDiskType): Move...
      * src/util/virstoragefile.h (virStorageType): ...and rename.
      * src/bhyve/bhyve_command.c (bhyveBuildDiskArgStr)
      (virBhyveProcessBuildLoadCmd): Update clients.
      * src/conf/domain_conf.c (virDomainDiskSourceDefParse)
      (virDomainDiskDefParseXML, virDomainDiskSourceDefFormatInternal)
      (virDomainDiskDefFormat, virDomainDiskGetActualType)
      (virDomainDiskDefForeachPath, virDomainDiskSourceIsBlockType):
      Likewise.
      * src/conf/snapshot_conf.h (_virDomainSnapshotDiskDef): Likewise.
      * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefParseXML)
      (virDomainSnapshotAlignDisks, virDomainSnapshotDiskDefFormat):
      Likewise.
      * src/esx/esx_driver.c (esxAutodetectSCSIControllerModel)
      (esxDomainDefineXML): Likewise.
      * src/locking/domain_lock.c (virDomainLockManagerAddDisk):
      Likewise.
      * src/lxc/lxc_controller.c
      (virLXCControllerSetupLoopDeviceDisk)
      (virLXCControllerSetupNBDDeviceDisk)
      (virLXCControllerSetupLoopDevices, virLXCControllerSetupDisk):
      Likewise.
      * src/parallels/parallels_driver.c (parallelsGetHddInfo):
      Likewise.
      * src/phyp/phyp_driver.c (phypDiskType): Likewise.
      * src/qemu/qemu_command.c (qemuGetDriveSourceString)
      (qemuDomainDiskGetSourceString, qemuBuildDriveStr)
      (qemuBuildCommandLine, qemuParseCommandLineDisk)
      (qemuParseCommandLine): Likewise.
      * src/qemu/qemu_conf.c (qemuCheckSharedDevice)
      (qemuTranslateDiskSourcePool)
      (qemuTranslateSnapshotDiskSourcePool): Likewise.
      * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse)
      (qemuDomainDetermineDiskChain): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo)
      (qemuDomainSnapshotPrepareDiskExternalBackingInactive)
      (qemuDomainSnapshotPrepareDiskExternalBackingActive)
      (qemuDomainSnapshotPrepareDiskExternalOverlayActive)
      (qemuDomainSnapshotPrepareDiskExternalOverlayInactive)
      (qemuDomainSnapshotPrepareDiskInternal)
      (qemuDomainSnapshotPrepare)
      (qemuDomainSnapshotCreateSingleDiskActive): Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia):
      Likewise.
      * src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise.
      * src/security/security_apparmor.c
      (AppArmorRestoreSecurityImageLabel)
      (AppArmorSetSecurityImageLabel): Likewise.
      * src/security/security_dac.c (virSecurityDACSetSecurityImageLabel)
      (virSecurityDACRestoreSecurityImageLabelInt)
      (virSecurityDACSetSecurityAllLabel): Likewise.
      * src/security/security_selinux.c
      (virSecuritySELinuxRestoreSecurityImageLabelInt)
      (virSecuritySELinuxSetSecurityImageLabel)
      (virSecuritySELinuxSetSecurityAllLabel): Likewise.
      * src/storage/storage_backend.c (virStorageFileBackendForType):
      Likewise.
      * src/storage/storage_backend_fs.c (virStorageFileBackendFile)
      (virStorageFileBackendBlock): Likewise.
      * src/storage/storage_backend_gluster.c
      (virStorageFileBackendGluster): Likewise.
      * src/vbox/vbox_tmpl.c (vboxDomainGetXMLDesc, vboxAttachDrives)
      (vboxDomainAttachDeviceImpl, vboxDomainDetachDevice): Likewise.
      * src/vmware/vmware_conf.c (vmwareVmxPath): Likewise.
      * src/vmx/vmx.c (virVMXParseDisk, virVMXFormatDisk)
      (virVMXFormatFloppy): Likewise.
      * src/xenxs/xen_sxpr.c (xenParseSxprDisks, xenParseSxpr)
      (xenFormatSxprDisk): Likewise.
      * src/xenxs/xen_xm.c (xenParseXM, xenFormatXMDisk): Likewise.
      * tests/securityselinuxlabeltest.c (testSELinuxLoadDef):
      Likewise.
      * src/libvirt_private.syms (domain_conf.h): Move symbols...
      (virstoragefile.h): ...as appropriate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      16ac4c9d
  22. 30 3月, 2014 1 次提交
  23. 26 3月, 2014 1 次提交
    • J
      Treat zero cpu shares as a valid value · bdffab0d
      Ján Tomko 提交于
      Currently, <cputune><shares>0</shares></cputune> is treated
      as if it were not specified.
      
      Treat is as a valid value if it was explicitly specified
      and write it to the cgroups.
      bdffab0d
  24. 25 3月, 2014 2 次提交
  25. 18 3月, 2014 1 次提交
  26. 18 12月, 2013 1 次提交
  27. 15 10月, 2013 1 次提交
    • G
      esx: Fix floppy.fileName handling in the vmx file parser · 842f6fd3
      Geoff Hickey 提交于
      The vmx file parsing code was reporting errors when parsing floppy.fileName
      entries if the filename didn't end in .flp. There is no such restriction in
      ESX; even using the GUI to configure floppy filenames you can specify any
      arbitrary file with any extension.
      
      Fix by changing the vmx parsing code so that it uses the floppy.fileType
      value to determine whether floppy.fileName refers to a block device or a
      regular file.
      
      Also remove code that would have generated an error if no floppy.fileName
      was specified. This is not an error either.
      
      Updated the floppy tests in vmx2xmltest.c and xml2vmxtest.c.
      842f6fd3
  28. 14 10月, 2013 2 次提交
  29. 26 9月, 2013 1 次提交
  30. 18 9月, 2013 1 次提交
    • D
      VMX: Add support for 'auto detect' fileNames · 834aebcc
      Doug Goldstein 提交于
      VMWare Fusion 5 can set the CD-ROM's device name to be 'auto detect' when
      using the physical drive via 'cdrom-raw' device type. VMWare will then
      connect to first available host CD-ROM to the virtual machine upon start
      up according to VMWare documentation. If no device is available, it
      appears that the device will remain disconnected.
      
      To better model this a CD-ROM that is marked as "auto detect" when in
      the off state would be modeled as the following with this patch:
        <disk type='block' device='lun'>
          <source startupPolicy='optional'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
      
      Once the domain transitions to the powered on state, libvirt can
      populate the remaining source data with what is connected, if anything.
      However future power cycles, the domain may not always start with that
      device attached.
      834aebcc
  31. 03 9月, 2013 2 次提交
    • D
      VMX: Add cdrom-raw dev type from VMWare Fusion · f8456e5a
      Doug Goldstein 提交于
      According to VMWare's documentation 'cdrom-raw' is an acceptable value
      for deviceType for a CD-ROM drive. The documentation states that the VMX
      configuration for a CD-ROM deviceType is as follows:
      
      ide|scsi(n):(n).deviceType = "cdrom-raw|atapi-cdrom|cdrom-image"
      
      From the documentation it appears the following is true:
      - cdrom-image = Provides the ISO to the VM
      - atapi-cdrom = Provides a NEC emulated ATAPI CD-ROM on top of the host
        CD-ROM
      - cdrom-raw = Passthru for a host CD-ROM drive. Allows CD-R burning from
        within the guest.
      
      A CD-ROM prior to this patch would always provide an 'atapi-cdrom' is
      modeled as:
        <disk type='block' device='cdrom'>
          <source dev='/dev/scd0'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
      
      This patch allows the 'device' attribute to be set to 'lun' for a raw
      acccess CD-ROM such as:
        <disk type='block' device='lun'>
          <source dev='/dev/scd0'/>
          <target dev='hda' bus='ide'/>
          <address type='drive' controller='0' bus='0' target='0' unit='0'/>
        </disk>
      f8456e5a
    • D
      VMX: Some serial ports are not actually connected · dba04e7f
      Doug Goldstein 提交于
      Sometimes a serial port might not be actually wired to a device when the
      user does not have the VM powered on and we should not consider this a
      fatal error.
      dba04e7f
  32. 02 9月, 2013 1 次提交
    • D
      VMX: Create virVMXFormatDisk() from HD and CD-ROM · 68b9fa64
      Doug Goldstein 提交于
      virVMXFormatHardDisk() and virVMXFormatCDROM() duplicated a lot of code
      from each other and made a lot of nested if checks to build each part of
      the VMX file. This hopefully simplifies the code path while combining
      the two functions with no net difference.
      68b9fa64
  33. 22 8月, 2013 1 次提交
    • D
      VMX: Improve disk parse error for unknown values · 23263af6
      Doug Goldstein 提交于
      Previously the error message showed the following:
      
      error: internal error: Invalid or not yet handled value 'auto detect'
      for VMX entry 'ide0:0.fileName'
      
      This left the user unsure if it was a CD-ROM or a disk device that they
      needed to fix. Now the error shows:
      
      error: internal error: Invalid or not yet handled value 'auto detect'
      for VMX entry 'ide0:0.fileName' for device type 'cdrom-raw'
      
      Which should hopefully make it easier to see the issue with the VMX
      configuration.
      23263af6
  34. 12 7月, 2013 1 次提交