1. 24 7月, 2014 2 次提交
  2. 08 7月, 2014 1 次提交
  3. 04 7月, 2014 2 次提交
    • J
      Utilize virDomainDiskAuth for storage pools · 97e3397c
      John Ferlan 提交于
      Replace the authType, chap, and cephx unions in virStoragePoolSource
      with a single pointer to a virStorageAuthDefPtr.  Adjust all users of
      the previous chap/cephx and secret unions with the source->auth data.
      97e3397c
    • J
      Utilize virDomainDiskAuth for domain disk · 6887af39
      John Ferlan 提交于
      Replace the inline "auth" struct in virStorageSource with a pointer
      to a virStorageAuthDefPtr and utilize between the domain_conf, qemu_conf,
      and qemu_command sources for finding the auth data for a domain disk
      6887af39
  4. 06 6月, 2014 2 次提交
    • E
      conf: store disk source as pointer, for easier manipulation · c123ef71
      Eric Blake 提交于
      As part of the work on backing chains, I'm finding that it would
      be easier to directly manipulate chains of pointers (adding a
      snapshot merely adjusts pointers to form the correct list) rather
      than copy data from one struct to another.  This patch converts
      domain disk source to be a pointer.
      
      In this patch, the pointer is ALWAYS allocated (thanks in part to
      the previous patch forwarding all disk def allocation through a
      common point), and all other changse are just mechanical fallout of
      the new type; there should be no functional change.  It is possible
      that we may want to leave the pointer NULL for a cdrom with no
      medium in a later patch, but as that requires a closer audit of the
      source to ensure we don't fault on a null dereference, I didn't do
      it here.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Change type of src.
      * src/conf/domain_conf.c: Adjust all clients.
      * src/security/security_selinux.c: Likewise.
      * src/qemu/qemu_domain.c: Likewise.
      * src/qemu/qemu_command.c: Likewise.
      * src/qemu/qemu_conf.c: Likewise.
      * src/qemu/qemu_process.c: Likewise.
      * src/qemu/qemu_migration.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/lxc/lxc_driver.c: Likewise.
      * src/lxc/lxc_controller.c: Likewise.
      * tests/securityselinuxlabeltest.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c123ef71
    • E
      conf: store snapshot source as pointer, for easier manipulation · 00c6327a
      Eric Blake 提交于
      As part of the work on backing chains, I'm finding that it would
      be easier to directly manipulate chains of pointers (adding a
      snapshot merely adjusts pointers to form the correct list) rather
      than copy data from one struct to another. This patch converts
      snapshot source to be a pointer.
      
      In this patch, the pointer is ALWAYS allocated (any code that
      increases ndisks now also allocates a source pointer for each
      new disk), and all other changes are just mechanical fallout of
      the new type; there should be no functional change.  It is
      possible that we may want to leave the pointer NULL for internal
      snapshots in a later patch, but as that requires a closer audit
      of the source to ensure we don't fault on a null dereference, I
      didn't do it here.
      
      * src/conf/snapshot_conf.h (_virDomainSnapshotDiskDef): Change
      type of src.
      * src/conf/snapshot_conf.c: Adjust all clients.
      * src/qemu/qemu_conf.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      00c6327a
  5. 20 5月, 2014 1 次提交
    • C
      migration: add support for migrateURI configuration · b0312d9f
      Chen Fan 提交于
      For now, we set the migration URI via command line '--migrate_uri' or
      construct the URI by looking up the dest host's hostname which could be
      solved by DNS automatically.
      
      But in cases the dest host have two or more NICs to reach, we may need to
      send the migration data over a specific NIC which is different from the
      automatically resolved one for some reason like performance, security, etc.
      Thus we must explicitly specify the migrateuri in command line everytime,
      but it is too troublesome if there are many such hosts (and don't forget
      virt-manager).
      
      This patch adds a configuration file option on dest host to save the
      default value set which can be specified to a migration hostname or
      one of this host's addresses used for transferring data, thus user doesn't
      have to specify it in command line everytime.
      Signed-off-by: NChen Fan <chen.fan.fnst@cn.fujitsu.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      b0312d9f
  6. 15 5月, 2014 1 次提交
  7. 07 5月, 2014 1 次提交
    • J
      Add support for timestamping QEMU logs · f3be5f0c
      Ján Tomko 提交于
      QEMU commit 5e2ac51 added a boolean '-msg timestamp=[on|off]'
      option, which can enable timestamps on errors:
      $ qemu-system-x86_64 -msg timestamp=on zghhdorf
      2014-04-09T13:25:46.779484Z qemu-system-x86_64: -msg timestamp=on: could
      not open disk image zghhdorf: Could not open 'zghhdorf': No such file or
      directory
      
      Enable this timestamp if the QEMU binary supports it.
      
      Add a 'log_timestamp' option to qemu.conf for disabling this behavior.
      f3be5f0c
  8. 02 4月, 2014 7 次提交
    • E
      conf: let snapshots share disk source struct · ca1ee0fd
      Eric Blake 提交于
      Now that we have a common struct, it's time to start using it!
      Since external snapshots make a longer backing chain, it is
      only natural to use the same struct for the file created by
      the snapshot as what we use for <domain> disks.
      
      * src/conf/snapshot_conf.h (_virDomainSnapshotDiskDef): Use common
      struct instead of open-coded duplicate fields.
      * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefClear)
      (virDomainSnapshotDiskDefParseXML, virDomainSnapshotAlignDisks)
      (virDomainSnapshotDiskDefFormat)
      (virDomainSnapshotDiskGetActualType): Adjust clients.
      * src/qemu/qemu_conf.c (qemuTranslateSnapshotDiskSourcePool):
      Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSnapshotDiskGetSourceString)
      (qemuDomainSnapshotCreateInactiveExternal)
      (qemuDomainSnapshotPrepareDiskExternalOverlayActive)
      (qemuDomainSnapshotPrepareDiskExternal)
      (qemuDomainSnapshotPrepare)
      (qemuDomainSnapshotCreateSingleDiskActive): Likewise.
      * src/storage/storage_driver.c
      (virStorageFileInitFromSnapshotDef): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ca1ee0fd
    • E
      conf: move common disk source functions · 7a4fd22b
      Eric Blake 提交于
      Move some functions out of domain_conf for use in the next
      patch where snapshot starts to directly use structs in
      virstoragefile.
      
      * src/conf/domain_conf.c (virDomainDiskDefFree)
      (virDomainDiskSourcePoolDefParse): Adjust callers.
      (virDomainDiskSourceDefClear, virDomainDiskSourcePoolDefFree)
      (virDomainDiskAuthClear): Move...
      * src/util/virstoragefile.c (virStorageSourceClear)
      (virStorageSourcePoolDefFree, virStorageSourceAuthClear): ...and
      rename.
      * src/conf/domain_conf.h (virDomainDiskAuthClear): Drop
      declaration.
      * src/qemu/qemu_conf.c (qemuTranslateDiskSourcePool): Adjust
      caller.
      * src/util/virstoragefile.h: Declare them.
      * src/libvirt_private.syms (virstoragefile.h): Export them.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      7a4fd22b
    • E
      conf: move storage secret type to util/ · c05d9dca
      Eric Blake 提交于
      This one is a relatively easy move.  We don't ever convert the
      enum to or from strings (it is inferred from other elements in
      the xml, rather than directly represented).
      
      * src/conf/domain_conf.h (virDomainDiskSecretType): Move...
      * src/util/virstoragefile.h (virStorageSecreteType): ...and
      rename.
      * src/conf/domain_conf.c (virDomainDiskSecretType): Drop unused
      enum conversion.
      (virDomainDiskAuthClear, virDomainDiskDefParseXML)
      (virDomainDiskDefFormat): Adjust clients.
      * src/qemu/qemu_command.c (qemuGetSecretString): Likewise.
      * src/qemu/qemu_conf.c (qemuTranslateDiskSourcePoolAuth):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c05d9dca
    • E
      conf: move source pool type to util/ · b6edf2bf
      Eric Blake 提交于
      Another struct being moved to util.  This one doesn't have as
      much use yet, thankfully.
      
      * src/conf/domain_conf.h (virDomainDiskSourcePoolMode)
      (virDomainDiskSourcePoolDef): Move...
      * src/util/virstoragefile.h (virStorageSourcePoolMode)
      (virStorageSourcePoolDef): ...and rename.
      * src/conf/domain_conf.c (virDomainDiskSourcePoolDefFree)
      (virDomainDiskSourceDefClear, virDomainDiskSourcePoolDefParse)
      (virDomainDiskDefParseXML, virDomainDiskSourceDefParse)
      (virDomainDiskSourceDefFormatInternal)
      (virDomainDiskDefForeachPath, virDomainDiskSourceIsBlockType):
      Adjust clients.
      * src/qemu/qemu_conf.c (qemuTranslateDiskSourcePool): Likewise.
      * src/libvirt_private.syms (domain_conf.h): Move symbols...
      (virstoragefile.h): ...as appropriate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b6edf2bf
    • E
      conf: move network disk protocol type to util/ · 4220f76a
      Eric Blake 提交于
      Another enum moved to util/, this time the fallout from renaming
      is not quite as large.
      
      * src/conf/domain_conf.h (virDomainDiskProtocol): Move...
      * src/util/virstoragefile.h (virStorageNetProtocol): ...and
      rename.
      * src/conf/domain_conf.c: Update clients.
      * src/qemu/qemu_command.c: Likewise.
      * src/qemu/qemu_conf.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/qemu/qemu_migration.c: Likewise.
      * src/storage/storage_backend.c: Likewise.
      * src/storage/storage_backend_gluster.c: Likewise.
      * src/libvirt_private.syms (domain_conf.h): Move symbols...
      (virstoragefile.h): ...as appropriate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4220f76a
    • 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
    • E
      conf: split network host structs to util/ · 52fb5311
      Eric Blake 提交于
      Continuing the refactoring of host-side storage descriptions out
      of conf/domain_conf and into util/virstoragefile, this patch
      focuses on details about a host name/port/transport as used by
      a network storage volume.
      
      * src/conf/domain_conf.h (virDomainDiskProtocolTransport)
      (virDomainDiskHostDef, virDomainDiskHostDefClear)
      (virDomainDiskHostDefFree, virDomainDiskHostDefCopy): Move...
      * src/util/virstoragefile.h (virStorageNetHostTransport)
      (virStorageNetHostDef, virStorageNetHostDefClear)
      (virStorageNetHostDefFree, virStorageNetHostDefCopy): ...here,
      with better names.
      * src/util/virstoragefile.c (virStorageNetHostDefClear)
      (virStorageNetHostDefFree, virStorageNetHostDefCopy): Moved from...
      * src/conf/domain_conf.c (virDomainDiskHostDefClear)
      (virDomainDiskHostDefFree, virDomainDiskHostDefCopy): ...here.
      (virDomainDiskSourceDefClear, virDomainDiskSourceDefParse)
      (virDomainDiskSourceDefFormatInternal): Adjust callers.
      * src/conf/snapshot_conf.h (_virDomainSnapshotDiskDef): Likewise.
      * src/conf/snapshot_conf.c (virDomainSnapshotDiskDefClear):
      Likewise.
      * src/qemu/qemu_command.c (qemuAddRBDHost)
      (qemuParseDriveURIString, qemuParseNBDString)
      (qemuBuildNetworkDriveURI, qemuParseCommandLineDisk)
      (qemuParseCommandLine, qemuGetDriveSourceString): Likewise.
      * src/qemu/qemu_command.h: Likewise.
      * src/qemu/qemu_conf.c (qemuAddISCSIPoolSourceHost)
      (qemuTranslateDiskSourcePool): Likewise.
      * src/qemu/qemu_driver.c
      (qemuDomainSnapshotCreateSingleDiskActive)
      (qemuDomainSnapshotUndoSingleDiskActive): Likewise.
      * src/storage/storage_backend_gluster.c
      (virStorageFileBackendGlusterInit): Likewise.
      * src/storage/storage_driver.c (virStorageFileFree)
      (virStorageFileInitInternal): Likewise.
      * src/storage/storage_driver.h (_virStorageFile): Likewise.
      * src/libvirt_private.syms (domain_conf.h): Move symbols...
      (virstoragefile.h): ...as appropriate.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      52fb5311
  9. 25 3月, 2014 3 次提交
    • J
      Indent top-level labels by one space in src/qemu/ · 5922d05a
      Ján Tomko 提交于
      5922d05a
    • E
      conf: prepare to track multiple host source files per <disk> · 4f202266
      Eric Blake 提交于
      It's finally time to start tracking disk backing chains in
      <domain> XML.  The first step is to start refactoring code
      so that we have an object more convenient for representing
      each host source resource in the context of a single guest
      <disk>.  Ultimately, I plan to move the new type into src/util
      where it can be reused by virStorageFile, but to make the
      transition easier to review, this patch just creates the
      new type then fixes everything until it compiles again.
      
      * src/conf/domain_conf.h (_virDomainDiskDef): Split...
      (_virDomainDiskSourceDef): ...to new struct.
      (virDomainDiskAuthClear): Use new type.
      * src/conf/domain_conf.c (virDomainDiskDefFree): Split...
      (virDomainDiskSourceDefClear): ...to new function.
      (virDomainDiskGetType, virDomainDiskSetType)
      (virDomainDiskGetSource, virDomainDiskSetSource)
      (virDomainDiskGetDriver, virDomainDiskSetDriver)
      (virDomainDiskGetFormat, virDomainDiskSetFormat)
      (virDomainDiskAuthClear, virDomainDiskGetActualType)
      (virDomainDiskDefParseXML, virDomainDiskSourceDefFormat)
      (virDomainDiskDefFormat, virDomainDiskDefForeachPath)
      (virDomainDiskDefGetSecurityLabelDef)
      (virDomainDiskSourceIsBlockType): Adjust all users.
      * src/lxc/lxc_controller.c (virLXCControllerSetupDisk):
      Likewise.
      * src/lxc/lxc_driver.c (lxcDomainAttachDeviceMknodHelper):
      Likewise.
      * src/qemu/qemu_command.c (qemuAddRBDHost, qemuParseRBDString)
      (qemuParseDriveURIString, qemuParseGlusterString)
      (qemuParseISCSIString, qemuParseNBDString)
      (qemuDomainDiskGetSourceString, qemuBuildDriveStr)
      (qemuBuildCommandLine, qemuParseCommandLineDisk)
      (qemuParseCommandLine): Likewise.
      * src/qemu/qemu_conf.c (qemuCheckSharedDevice)
      (qemuAddISCSIPoolSourceHost, qemuTranslateDiskSourcePool):
      Likewise.
      * src/qemu/qemu_driver.c (qemuDomainUpdateDeviceConfig)
      (qemuDomainPrepareDiskChainElement)
      (qemuDomainSnapshotCreateInactiveExternal)
      (qemuDomainSnapshotPrepareDiskExternalBackingInactive)
      (qemuDomainSnapshotPrepareDiskInternal)
      (qemuDomainSnapshotPrepare)
      (qemuDomainSnapshotCreateSingleDiskActive)
      (qemuDomainSnapshotUndoSingleDiskActive)
      (qemuDomainBlockPivot, qemuDomainBlockJobImpl)
      (qemuDomainBlockCopy, qemuDomainBlockCommit): Likewise.
      * src/qemu/qemu_migration.c (qemuMigrationIsSafe): Likewise.
      * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase)
      (qemuProcessInitPasswords): Likewise.
      * src/security/security_selinux.c
      (virSecuritySELinuxSetSecurityFileLabel): Likewise.
      * src/storage/storage_driver.c (virStorageFileInitFromDiskDef):
      Likewise.
      * tests/securityselinuxlabeltest.c (testSELinuxLoadDef):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      4f202266
    • E
      conf: use disk source accessors in qemu/ · cd01d2ad
      Eric Blake 提交于
      Part of a series of cleanups to use new accessor methods.
      
      * src/qemu/qemu_conf.c (qemuCheckSharedDevice)
      (qemuAddSharedDevice, qemuRemoveSharedDevice, qemuSetUnprivSGIO):
      Use accessors.
      * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse)
      (qemuDomainObjCheckDiskTaint, qemuDomainSnapshotForEachQcow2Raw)
      (qemuDomainCheckRemoveOptionalDisk, qemuDomainCheckDiskPresence)
      (qemuDiskChainCheckBroken, qemuDomainDetermineDiskChain):
      Likewise.
      * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia)
      (qemuDomainCheckEjectableMedia)
      (qemuDomainAttachVirtioDiskDevice, qemuDomainAttachSCSIDisk)
      (qemuDomainAttachUSBMassstorageDevice)
      (qemuDomainAttachDeviceDiskLive, qemuDomainRemoveDiskDevice)
      (qemuDomainDetachVirtioDiskDevice, qemuDomainDetachDiskDevice):
      Likewise.
      * src/qemu/qemu_migration.c (qemuMigrationStartNBDServer)
      (qemuMigrationDriveMirror, qemuMigrationCancelDriveMirror)
      (qemuMigrationIsSafe): Likewise.
      * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase)
      (qemuProcessHandleIOError, qemuProcessHandleBlockJob)
      (qemuProcessInitPasswords): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainChangeDiskMediaLive)
      (qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      cd01d2ad
  10. 18 3月, 2014 1 次提交
  11. 13 3月, 2014 1 次提交
    • O
      qemu: Forbid "sgio" support for SCSI generic host device · ce346623
      Osier Yang 提交于
      The kernel didn't support the unprivileged SGIO for SCSI generic
      device finally, and since it's unknow whether the way to support
      unprivileged SGIO for SCSI generic device will be similar as for
      SCSI block device or not, even it's simliar (I.e. via sysfs, for
      SCSI block device, it's /sys/dev/block/8\:0/queue/unpriv_sgio,
      for example), the file name might be different, So it's better not
      guess what it should be like currently.
      
      This patch removes the related code (mainly about the "shareable"
      checking on the "sgio" setting, it's not supported at all, why
      we leave checking code there? :-), and error out if "sgio" is
      specified in the domain config.
      ce346623
  12. 11 3月, 2014 1 次提交
    • D
      Remove broken error reporting in QEMU mac filtering · cfb92c9b
      Daniel P. Berrange 提交于
      The qemu_bridge_filter.c file had some helpers for calling
      the ebtablesXXX functions todo bridge filtering. The only
      thing these helpers did was to overwrite the original error
      message from the ebtables code. For added fun, the callers
      of these helpers overwrote the errors yet again. For even
      more fun, one of the helpers called another helper and
      overwrite its errors too.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      cfb92c9b
  13. 10 3月, 2014 1 次提交
  14. 14 2月, 2014 2 次提交
  15. 30 1月, 2014 1 次提交
    • O
      util: Add one argument for several scsi utils · 10c9ceff
      Osier Yang 提交于
      To support passing the path of the test data to the utils, one
      more argument is added to virSCSIDeviceGetSgName,
      virSCSIDeviceGetDevName, and virSCSIDeviceNew, and the related
      code is changed accordingly.
      
      Later tests for the scsi utils will be based on this patch.
      Signed-off-by: NOsier Yang <jyang@redhat.com>
      10c9ceff
  16. 29 1月, 2014 1 次提交
    • P
      snapshot: Add support for specifying snapshot disk backing type · 7076b4b7
      Peter Krempa 提交于
      Add support for specifying various types when doing snapshots. This will
      later allow to do snapshots on network backed volumes. Disks of type
      'volume' are not supported by snapshots (yet).
      
      Also amend the test suite to check parsing of the various new disk
      types that can now be specified.
      7076b4b7
  17. 22 1月, 2014 1 次提交
  18. 05 12月, 2013 1 次提交
  19. 03 12月, 2013 2 次提交
    • P
      qemu: Clear old translated pool source · bdeb0f01
      Peter Krempa 提交于
      Clear the old data to avoid leaking it when attempting to re-translate a
      pool on the same domain object.
      bdeb0f01
    • P
      qemu: Refactor qemuTranslateDiskSourcePool · e1a4d08b
      Peter Krempa 提交于
      Before this patch, the translation function still needs a second ugly
      helper function to actually format the command line for qemu. But if we
      do the right stuff in the translation function, we don't have to bother
      with the second function any more.
      
      This patch removes the messy qemuBuildVolumeString function and changes
      qemuTranslateDiskSourcePool to set stuff up correctly so that the
      regular code paths meant for volumes can be used to format the command
      line correctly.
      
      For this purpose a new helper "qemuDiskGetActualType()" is introduced to
      return the type of the volume in a pool.
      
      As a part of the refactor the qemuTranslateDiskSourcePool function is
      fixed to do decisions based on the pool type instead of the volume type.
      This allows to separate pool-type-specific stuff more clearly and will
      ease addition of other pool types that will require certain other
      operations to get the correct pool source.
      
      The previously fixed tests should make sure that we don't break stuff
      that was working before.
      e1a4d08b
  20. 02 12月, 2013 1 次提交
  21. 26 11月, 2013 1 次提交
    • E
      storage: add network-dir as new storage volume type · ecd881b7
      Eric Blake 提交于
      In the 'directory' and 'netfs' storage pools, a user can see
      both 'file' and 'dir' storage volume types, to know when they
      can descend into a subdirectory.  But in a network-based storage
      pool, such as the upcoming 'gluster' pool, we use 'network'
      instead of 'file', and did not have any counterpart for a
      directory until this patch.  Adding a new volume type
      'network-dir' is better than reusing 'dir', because it makes
      it clear that the only way to access 'network' volumes within
      that container is through the network mounting (leaving 'dir'
      for something accessible in the local file system).
      
      * include/libvirt/libvirt.h.in (virStorageVolType): Expand enum.
      * docs/formatstorage.html.in: Document it.
      * docs/schemasa/storagevol.rng (vol): Allow new value.
      * src/conf/storage_conf.c (virStorageVol): Use new value.
      * src/qemu/qemu_command.c (qemuBuildVolumeString): Fix client.
      * src/qemu/qemu_conf.c (qemuTranslateDiskSourcePool): Likewise.
      * tools/virsh-volume.c (vshVolumeTypeToString): Likewise.
      * src/storage/storage_backend_fs.c
      (virStorageBackendFileSystemVolDelete): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ecd881b7
  22. 21 11月, 2013 1 次提交
    • E
      maint: fix comma style issues: qemu · 5d509e9e
      Eric Blake 提交于
      Most of our code base uses space after comma but not before;
      fix the remaining uses before adding a syntax check.
      
      * src/qemu/qemu_cgroup.c: Consistently use commas.
      * src/qemu/qemu_command.c: Likewise.
      * src/qemu/qemu_conf.c: Likewise.
      * src/qemu/qemu_driver.c: Likewise.
      * src/qemu/qemu_monitor.c: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      5d509e9e
  23. 29 10月, 2013 1 次提交
    • G
      capabilities: add baselabel per sec driver/virt type to secmodel · b51038a4
      Giuseppe Scrivano 提交于
      Expand the "secmodel" XML fragment of "host" with a sequence of
      baselabel's which describe the default security context used by
      libvirt with a specific security model and virtualization type:
      
      <secmodel>
        <model>selinux</model>
        <doi>0</doi>
        <baselabel type='kvm'>system_u:system_r:svirt_t:s0</baselabel>
        <baselabel type='qemu'>system_u:system_r:svirt_tcg_t:s0</baselabel>
      </secmodel>
      <secmodel>
        <model>dac</model>
        <doi>0</doi>
        <baselabel type='kvm'>107:107</baselabel>
        <baselabel type='qemu'>107:107</baselabel>
      </secmodel>
      
      "baselabel" is driver-specific information, e.g. in the DAC security
      model, it indicates USER_ID:GROUP_ID.
      Signed-off-by: NGiuseppe Scrivano <gscrivan@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b51038a4
  24. 18 10月, 2013 1 次提交
  25. 17 10月, 2013 1 次提交
  26. 15 10月, 2013 1 次提交
    • E
      maint: avoid 'const fooPtr' in qemu · 9a520a59
      Eric Blake 提交于
      'const fooPtr' is the same as 'foo * const' (the pointer won't
      change, but it's contents can).  But in general, if an interface
      is trying to be const-correct, it should be using 'const foo *'
      (the pointer is to data that can't be changed).
      
      Fix up offenders in src/qemu.
      
      * src/qemu/qemu_bridge_filter.h (networkAllowMacOnPort)
      (networkDisallowMacOnPort): Use intended type.
      * src/qemu/qemu_bridge_filter.c (networkAllowMacOnPort)
      (networkDisallowMacOnPort): Likewise.
      * src/qemu/qemu_command.c (qemuBuildTPMBackendStr)
      (qemuBuildTPMDevStr, qemuBuildCpuArgStr)
      (qemuBuildObsoleteAccelArg, qemuBuildMachineArgStr)
      (qemuBuildSmpArgStr, qemuBuildNumaArgStr): Likewise.
      * src/qemu/qemu_conf.c (qemuSharedDeviceEntryCopy): Likewise.
      * src/qemu/qemu_driver.c (qemuDomainSaveImageStartVM): Likewise.
      * src/qemu/qemu_hostdev.c
      (qemuDomainHostdevNetConfigVirtPortProfile): Likewise.
      * src/qemu/qemu_monitor_json.c
      (qemuMonitorJSONAttachCharDevCommand): Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      9a520a59
  27. 14 10月, 2013 1 次提交