You need to sign in or sign up before continuing.
  1. 13 7月, 2010 4 次提交
    • J
      cpu: Fail when CPU type cannot be detected from XML · 517aba9f
      Jiri Denemark 提交于
      When autodetecting whether XML describes guest or host CPU, the presence
      of <arch> element is checked. If it's present, we treat the XML as host
      CPU definition. Which is right, since guest CPU definitions do not
      contain <arch> element. However, if at the same time the root <cpu>
      element contains `match' attribute, we would silently ignore it and
      still treat the XML as host CPU. We should rather refuse such invalid
      XML.
      517aba9f
    • J
      cpuCompare: Fix comparison of two host CPUs · ac3daf08
      Jiri Denemark 提交于
      When a CPU to be compared with host CPU describes a host CPU instead of
      a guest CPU, the result is incorrect. This is because instead of
      treating additional features in host CPU description as required, they
      were treated as if they were mentioned with all possible policies at the
      same time.
      ac3daf08
    • J
      qemu: Use -nodefconfig when probing for CPU models · 4677b064
      Jiri Denemark 提交于
      In case qemu supports -nodefconfig, libvirt adds uses it when launching
      new guests. Since this option may affect CPU models supported by qemu,
      we need to use it when probing for available models.
      4677b064
    • D
      Fix potential crash in QEMU monitor JSON impl · 8fa58ab3
      Daniel P. Berrange 提交于
      An indentation mistake meant that a check for return status
      was not properly performed in all cases. This could result
      in a crash on NULL pointer in a following line.
      
      * src/qemu/qemu_monitor_json.c: Fix check for return status
        when processing JSON for blockstats
      8fa58ab3
  2. 07 7月, 2010 4 次提交
  3. 03 7月, 2010 1 次提交
  4. 02 7月, 2010 3 次提交
  5. 30 6月, 2010 3 次提交
    • R
      cgroup: Fix compilation broken on MinGW due to dirent->d_type · 29da015a
      Ryota Ozaki 提交于
      As pointed out by Eric Blake, using dirent->d_type breaks
      compilation on MinGW. This patch addresses this by using
      '#if defined' as same as doing for virCgroupForDriver.
      29da015a
    • D
      Avoid invoking the qemu monitor destroy callback if the constructor fails · 8134d396
      Daniel P. Berrange 提交于
      Some, but not all, codepaths in the qemuMonitorOpen() method
      would trigger the destroy callback. The caller does not expect
      this to be invoked if construction fails, only during normal
      release of the monitor. This resulted in a possible double-unref
      of the virDomainObjPtr, because the caller explicitly unrefs
      the virDomainObjPtr  if qemuMonitorOpen() fails
      
      * src/qemu/qemu_monitor.c: Don't invoke destroy callback from
        qemuMonitorOpen() failure paths
      8134d396
    • R
      cgroup: Add missing errno == ENOENT check in virCgroupRemoveRecursively · adc796c8
      Ryota Ozaki 提交于
      ENOENT happens normally when a subsystem is enabled with any other
      subsystems and the directory of the target group has already removed
      in a prior loop. In that case, the function should just return without
      leaving an error message.
      
      NB this is the same behavior as before introducing virCgroupRemoveRecursively.
      adc796c8
  6. 29 6月, 2010 8 次提交
    • C
      Fix crash when detaching devices from qemu domains. · ec75b0cf
      Chris Lalancette 提交于
      Make sure to *not* call qemuDomainPCIAddressReleaseAddr if
      QEMUD_CMD_FLAG_DEVICE is *not* set (for older qemu).  This
      prevents a crash when trying to do device detachment from
      a qemu guest.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      ec75b0cf
    • C
      Check for active PCI devices when doing nodedevice operations. · 53a1db4d
      Chris Lalancette 提交于
      In the current libvirt PCI code, there is no checking whether
      a PCI device is in use by a guest when doing node device
      detach or reattach.  This causes problems when a device is
      assigned to a guest, and the administrator starts issuing
      nodedevice commands.  Make it so that we check the list
      of active devices when trying to detach/reattach, and only
      allow the operation if the device is not assigned to a guest.
      Signed-off-by: NChris Lalancette <clalance@redhat.com>
      53a1db4d
    • E
      virFileResolveLink: guarantee an absolute path · db1fbbd8
      Eric Blake 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=608092
      
      * src/util/util.c (virFileResolveLink): Use
      canonicalize_file_name, rather than areadlink.
      db1fbbd8
    • E
      phyp: don't steal storage management from other drivers · 5b26f2d8
      Eric Blake 提交于
      Fix regression introduced in commit a4a28724 - basically, the
      phyp storage driver should only accept the same URIs that the
      main phyp driver is willing to accept.  Blindly accepting all
      URIs meant that the phyp storage driver was being consulted for
      'virsh -c qemu:///session pool-list --all', rather than the
      qemu storage driver, then since the URI was not for phyp, attempts
      to then use the phyp driver crashed because it was not initialized.
      
      * src/phyp/phyp_driver.c (phypStorageOpen): Only accept connections
      already open to a phyp driver.
      5b26f2d8
    • L
      Avoid calling virStorageFileIsSharedFS with NULL · 11a70602
      Laine Stump 提交于
      This code was just recently added (by me) and didn't account for the
      fact that stdin_path is sometimes NULL. If it's NULL, and
      SetSecurityAllLabel fails, a segfault would result.
      11a70602
    • R
      lxc: Fix virsh console doesn't work after restarting libvirtd · 1c46f4cc
      Ryota Ozaki 提交于
      Because tty path is unexpectedly not saved in the live configuration
      file of a domain, libvirtd cannot get the console of the domain back
      after restarting.
      
      The reason why the tty path isn't saved is that, to save the tty path,
      the save function, virDomainSaveConfig, requires that the target domain
      is running (pid != -1), however, lxc driver calls the function before
      starting the domain to pass the configuration to controller.
      
      To ensure to save the tty path, the patch lets lxc driver call the save
      function again after starting the domain.
      1c46f4cc
    • R
      lxc: Fix error handlings in lxcContainerRenameAndEnableInterfaces · df8225ac
      Ryota Ozaki 提交于
      The function is expected to return negative value on failure,
      however, it returns positive value when either setInterfaceName
      or vethInterfaceUpOrDown fails. Because the function returns
      the return value of either as is, however, the two functions
      may return positive value on failure.
      
      The patch fixes the defects and add error messages.
      df8225ac
    • R
      lxc: Change VIR_ERROR to VIR_DEBUG for just a debugging message · b3a96d90
      Ryota Ozaki 提交于
      The message is actually not of error but of debugging.
      02:22:56.091: error : lxcControllerMain:316 : monitor=3 client=4 appPty=19 contPty=7
      b3a96d90
  7. 28 6月, 2010 4 次提交
    • L
      Selectively ignore domainSetSecurityAllLabel failure in domain restore · 06f81c63
      Laine Stump 提交于
      When the saved domain image is on an NFS share, at least some part of
      domainSetSecurityAllLabel will fail (for example, selinux labels can't
      be modified). To allow domain restore to still work in this case, just
      ignore the errors.
      06f81c63
    • L
      use virStorageFileIsSharedFS utility function in qemudDomainSaveFlag · f35a9fc1
      Laine Stump 提交于
      Previously, this function had it's own bit of code performing the same
      function. Since there's now an equivalent utility function, let's use it.
      f35a9fc1
    • L
      Enhance virStorageFileIsSharedFS · fb457c5c
      Laine Stump 提交于
      virStorageFileIsSharedFS would previously only work if the entire path
      in question was stat'able by the uid of the libvirtd process. This
      patch changes it to crawl backwards up the path retrying the statfs
      call until it gets to a partial path that *can* be stat'ed.
      
      This is necessary to use the function to learn the fstype for files
      stored as a different user (and readable only by that user) on a
      root-squashed remote filesystem.
      fb457c5c
    • L
      Set proper selinux label on image file during qemu domain restore · 590c9c9a
      Laine Stump 提交于
      Also restore the label to its original value after qemu is finished
      with the file.
      
      Prior to this patch, qemu domain restore did not function properly if
      selinux was set to enforce.
      590c9c9a
  8. 25 6月, 2010 11 次提交
    • D
      Don't squash file permissions when migration fails · 6d974315
      Daniel P. Berrange 提交于
      If an active migration operation fails, or is cancelled by the
      admin, the QEMU on the destination is shutdown and the one on
      the source continues running. It is important in shutting down
      the QEMU on the destination, the security drivers don't reset
      the file labelling/permissions.
      
      * src/qemu/qemu_driver.c: Don't reset labelling/permissions
        on migration abort
      6d974315
    • E
      phyp: optimize use of sed · 17dedf7c
      Eric Blake 提交于
      Minor speedups by using the full power of sed.
      
      * src/phyp/phyp_driver.c (phypGetVIOSFreeSCSIAdapter)
      (phypDiskType, phypListDefinedDomains): Use fewer processes, by
      folding other work into sed.
      (phypGetVIOSPartitionID): Likewise.  Also avoid non-portable use
      of 'sed -s'.
      17dedf7c
    • E
      phyp: add storage management driver · ebc46fea
      Eduardo Otubo 提交于
      Add the storage management driver to the Power Hypervisor driver.
      This is a big but simple patch, it's just a new set of functions.
      
      This patch includes:
       * Storage driver: The set of pool-* and vol-* functions.
       * attach-disk function.
       * Support for IVM on the new functions.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ebc46fea
    • E
      phyp: add rudimentary storage driver · a4a28724
      Eduardo Otubo 提交于
      * src/phyp/phyp_driver.c (phypStorageDriver): New driver.
      (phypStorageOpen, phypStorageClose): New functions.
      (phypRegister): Register it.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      a4a28724
    • E
      phyp: reduce scope of driver functions · 89144534
      Eric Blake 提交于
      Several phyp functions are not namespace clean, and had no reason
      to be exported since no one outside the phyp driver needed to use
      them.  Rather than do lots of forward declarations, I was able
      to topologically sort the file.  So, this patch looks huge, but
      is really just a matter of marking things static and dealing with
      the compiler fallout.
      
      * src/phyp/phyp_driver.h (PHYP_DRIVER_H): Add include guard.
      (phypCheckSPFreeSapce): Delete unused declaration.
      (phypGetSystemType, phypGetVIOSPartitionID, phypCapsInit)
      (phypBuildLpar, phypUUIDTable_WriteFile, phypUUIDTable_ReadFile)
      (phypUUIDTable_AddLpar, phypUUIDTable_RemLpar, phypUUIDTable_Pull)
      (phypUUIDTable_Push, phypUUIDTable_Init, phypUUIDTable_Free)
      (escape_specialcharacters, waitsocket, phypGetLparUUID)
      (phypGetLparMem, phypGetLparCPU, phypGetLparCPUGeneric)
      (phypGetRemoteSlot, phypGetBackingDevice, phypDiskType)
      (openSSHSession): Move declarations to phyp_driver.c and make static.
      * src/phyp/phyp_driver.c: Rearrange file contents to provide
      topological sorting of newly-static funtions (no semantic changes
      other than reduced scope).
      (phypGetBackingDevice, phypDiskType): Mark unused, for now.
      89144534
    • D
      Fix migration in text mode and shared storage migration in json mode · 28e96d72
      Daniel P. Berrange 提交于
      The patches for shared storage migration were not correctly written
      for json mode. Thus the 'blk' and 'inc' parameters were never being
      set. In addition they didn't set the QEMU_MONITOR_MIGRATE_BACKGROUND
      so migration was synchronous. Due to multiple bugs in QEMU's JSON
      impl this wasn't noticed because it treated the sync migration requst
      as asynchronous anyway. Finally 'background' parameter was converted
      to take arbitrary flags but not renamed, and not all uses were changed
      to unsigned int.
      
      * src/qemu/qemu_driver.c: Set QEMU_MONITOR_MIGRATE_BACKGROUND in
        doNativeMigrate
      * src/qemu/qemu_monitor_json.c: Process QEMU_MONITOR_MIGRATE_NON_SHARED_DISK
        and QEMU_MONITOR_MIGRATE_NON_SHARED_INC flags
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.h, src/qemu/qemu_monitor_text.c,
        src/qemu/qemu_monitor_text.h: change 'int background' to
        'unsigned int flags' in migration APIs. Add logging of flags
        parameter
      28e96d72
    • D
      Avoid blocking all APIs during incoming migration · 755b53f9
      Daniel P. Berrange 提交于
      During incoming migration the QEMU monitor is not able to be
      used. The incoming migration code did not keep hold of the
      job lock because migration is split across multiple API calls.
      This meant that further monitor commands on the guest would
      hang until migration finished with no timeout.
      
      In this change the qemuDomainMigratePrepare method sets the
      job flag just before it returns. The qemuDomainMigrateFinish
      method checks for this job flag & clears it once done. This
      prevents any use of the monitor between prepare+finish steps.
      
      The qemuDomainGetJobInfo method is also updated to refresh
      the job elapsed time. This means that virsh domjobinfo can
      return time data during incoming migration
      
      * src/qemu/qemu_driver.c: Keep a job active during incoming
        migration. Refresh job elapsed time when returning job info
      755b53f9
    • D
      Set labelling for character devices in security drivers · 2bad82f7
      Daniel P. Berrange 提交于
      When configuring serial, parallel, console or channel devices
      with a file, dev or pipe backend type, it is necessary to label
      the file path in the security drivers. For char devices of type
      file, it is neccessary to pre-create (touch) the file if it does
      not already exist since QEMU won't be allowed todo so itself.
      dev/pipe configs already require the admin to pre-create before
      starting the guest.
      
      * src/qemu/qemu_security_dac.c: set file ownership for character
        devices
      * src/security/security_selinux.c: Set file labeling for character
        devices
      * src/qemu/qemu_driver.c: Add character devices to cgroup ACL
      2bad82f7
    • D
      Add API for iterating over all character devices · bf1f3f7a
      Daniel P. Berrange 提交于
      The parallel, serial, console and channel devices are all just
      character devices. A lot of code needs todo the same thing to
      all these devices. This provides an convenient API for iterating
      over all of them.
      
      * src/conf/domain_conf.c, src/conf/domain_conf.c,
        src/libvirt_private.syms: Add virDomainChrDefForeach
      bf1f3f7a
    • L
      Check for presence of qemu -nodefconfig option before using it · 7d02393b
      Laine Stump 提交于
      We previously assumed that if the -device option existed in qemu, that
      -nodefconfig would also exist. It turns out that isn't the case, as
      demonstrated by qemu-kvm-0.12.3 in Fedora 13.
      
      */src/qemu/qemu_conf.[hc] - add a new QEMUD_CMD_FLAG, set it via the
                                  help output, and check it before adding
                                  -nodefconfig to the qemu commandline.
      7d02393b
    • E
      Adding Storage Management driver (style and indentation) · edfedfb4
      Eduardo Otubo 提交于
      This is just the indentation, style  and cleanup patch.
      edfedfb4
  9. 24 6月, 2010 2 次提交
    • M
      esx: Use bool instead of int where appropriated · e214bcf3
      Matthias Bolte 提交于
      e214bcf3
    • M
      esx: Add support for the controller element · d72d9256
      Matthias Bolte 提交于
      Also don't abuse the disk driver name to specify the SCSI controller
      model anymore:
      
        <driver name='buslogic'/>
      
      Use the newly added model attribute of the controller element for this:
      
        <controller type='scsi' index='0' model='buslogic'/>
      
      The disk driver name approach is deprecated now, but still works for
      backward compatibility reasons.
      
      Update the documentation and tests accordingly.
      
      Fix usage of the words controller and id in the VMX handling code. Use
      controller, bus and unit properly.
      d72d9256