1. 04 12月, 2009 2 次提交
    • M
      Add virIndexToDiskName and fix mapping gap · 63166a4e
      Matthias Bolte 提交于
      esxVMX_IndexToDiskName handles indices up to 701. This limit comes
      from a mapping gap in virDiskNameToIndex:
      
        sdzy -> 700
        sdzz -> 701
        sdaaa -> 728
        sdaab -> 729
      
      This line in virDiskNameToIndex causes this gap:
      
        idx = (idx + i) * 26;
      
      Fixing it by altering this line to:
      
        idx = (idx + (i < 1 ? 0 : 1)) * 26;
      
      Also add a new version of virIndexToDiskName that handles the inverse
      mapping for arbitrary indices.
      
      * src/esx/esx_vmx.[ch]: remove esxVMX_IndexToDiskName
      * src/util/util.[ch]: add virIndexToDiskName and fix mapping gap
      * tests/esxutilstest.c: update test to verify that the gap is fixed
      63166a4e
    • M
      Fix some locking issues · 7a18fbee
      Matthias Bolte 提交于
      * src/conf/domain_conf.c: don't call virDomainObjUnlock twice
      * src/qemu/qemu_driver.c: relock driver lock if an error occurs in
        qemuDomainObjBeginJobWithDriver, enter/exit monitor with driver
        in qemudDomainSave
      7a18fbee
  2. 30 11月, 2009 1 次提交
  3. 27 11月, 2009 1 次提交
  4. 26 11月, 2009 3 次提交
  5. 24 11月, 2009 2 次提交
  6. 23 11月, 2009 3 次提交
    • D
      Support QEMU's virtual FAT block device driver · e7c78b0a
      Daniel P. Berrange 提交于
      Introduce a new type="dir"  mode for <disks> that allows use of
      QEMU's  virtual FAT block device driver. eg
      
          <disk type='dir' device='floppy'>
            <source dir='/tmp/test'/>
            <target dev='fda' bus='fdc'/>
            <readonly/>
          </disk>
      
      gets turned into
      
        -drive file=fat:floppy:/tmp/test,if=floppy,index=0
      
      Only read-only disks are supported with virtual FAT mode
      
      * src/conf/domain_conf.c, src/conf/domain_conf.h: Add type="dir"
      * docs/schemas/domain.rng: Document new disk type
      * src/xen/xend_internal.c, src/xen/xm_internal.c: Raise error for
        unsupported disk types
      * tests/qemuxml2argvdata/qemuxml2argv-disk-cdrom-empty.args: Fix
        empty disk file handling
      * tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.args,
        tests/qemuxml2argvdata/qemuxml2argv-disk-drive-fat.xml,
        tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.args,
        tests/qemuxml2argvdata/qemuxml2argv-floppy-drive-fat.xml
        tests/qemuxml2argvtest.c: Test QEMU vitual FAT driver
      * src/qemu/qemu_conf.c: Support generating fat:/some/dir type
        disk args
      * src/security/security_selinux.c: Temporarily skip labelling
        of directory based disks
      e7c78b0a
    • D
      Alternate CPU affinity impl to cope with NR_CPUS > 1024 · a73cd93b
      Daniel P. Berrange 提交于
      The cpu_set_t type can only cope with NR_CPUS <= 1024, beyond this
      it is neccessary to use alternate CPU_SET maps with a dynamically
      allocated CPU map
      
      * src/util/processinfo.c: Support new unlimited size CPU set type
      a73cd93b
    • D
      Pull schedular affinity code out into a separate module · 37f415da
      Daniel P. Berrange 提交于
      * src/Makefile.am: Add processinfo.h/processinfo.c
      * src/util/processinfo.c, src/util/processinfo.h: Module providing
        APIs for getting/setting process CPU affinity
      * src/qemu/qemu_driver.c: Switch over to new APIs for schedular
        affinity
      * src/libvirt_private.syms: Export virProcessInfoSetAffinity
        and virProcessInfoGetAffinity to internal drivers
      37f415da
  7. 21 11月, 2009 1 次提交
    • D
      Release of libvirt-0.7.4 · 040e80f7
      Daniel Veillard 提交于
      0.7.3 was broken
      
      * configure.in docs/news.html.in: release of 0.7.4
      * configure.in libvirt.spec.in: require netcf >= 0.1.4
      * src/Makefile.am: node_device/node_device_udev.h was missing from
        NODE_DEVICE_DRIVER_UDEV_SOURCES breaking compilation on platforms with
        udev
      040e80f7
  8. 20 11月, 2009 3 次提交
    • D
      504262 Check for duplicated UUID in XM Xen defines · 776b6758
      Daniel Veillard 提交于
      * src/xen/xm_internal.c: the XM driver was not checking for previously
        defined UUID on new defines. Similar to virDomainObjIsDuplicate()
        behaviour.
      776b6758
    • S
      qemu-kvm needs -enable-kvm flag for VT optimization · b827338a
      Steve Yarmie 提交于
      Recent qemu releases require command option '-enable-qemu' in order
      for the kvm functionality be activated. Libvirt needs to pass this flag
      to qemu when starting a domain. Note that without the option,
      even if both the kernel and qemu support KVM, KVM will not be activated
      and VMs will be very slow.
      
      * src/qemu/qemu_conf.h src/qemu/qemu_conf.c: parse the extra command
        line option from help and add it when running kvm
      * tests/qemuhelptest.c: this modified the flags output for qemu-0.10.5
        and qemu-kvm-0.11.0-rc2 regression tests
      b827338a
    • S
      fix deprecated iptables command syntax · 264f3dda
      Steve Yarmie 提交于
      * src/util/iptables.c: `--option !  this` is deprecated in favor of
        `! --option this` syntax, change the output command accordingly
      264f3dda
  9. 19 11月, 2009 4 次提交
    • D
      remove sysfs_path and parent_sysfs_path from XML · 2cdb665b
      Dave Allan 提交于
      Erroneously included the sysfs_path and parent_sysfs_path elements in
      the node device xml, they were not supposed to show up there
      
      * src/conf/node_device_conf.c: remove the output of the 2 fields
      2cdb665b
    • D
      Removing devicePath member from dev struct · f2f656d4
      Dave Allan 提交于
      I realized that I inadvertently added a member to the def struct to
      contain each device's sysfs path when there was an existing member in the
      dev struct for "OS specific path to device metadat, eg sysfs"  Since the
      udev backend needs to record the sysfs path while it's in the process of
      creating the device, before the dev struct gets allocated, I chose to
      remove the member from the dev struct.
      
      * src/conf/node_device_conf.c src/conf/node_device_conf.h
        src/node_device/node_device_driver.c src/node_device/node_device_hal.c
        src/node_device/node_device_udev.c: remove devicePath from the
        structure and use def->sysfs_path instead
      f2f656d4
    • D
      report OOM in two places in node_device_driver.c · 0fe55374
      Dave Allan 提交于
      * src/node_device/node_device_driver.c: two places where not calling
        virReportOOMError after strdup failure
      0fe55374
    • D
      Ensure driver lock is released when entering QEMU monitor · 278e9478
      Daniel P. Berrange 提交于
      The qemudStartVMDaemon() and several functions it calls use
      the QEMU monitor. The QEMU driver is locked while this function
      is executing, so it is rquired to release the driver lock and
      reacquire it either side of issuing a monitor command. It
      failed todo so, leading to deadlock
      
      * qemu/qemu_driver.c: Release driver when in qemudStartVMDaemon
        and things it calls
      278e9478
  10. 17 11月, 2009 2 次提交
  11. 16 11月, 2009 1 次提交
  12. 15 11月, 2009 6 次提交
    • M
      esx: Fix CPU clock Hz to MHz conversion · d42cfb4e
      Matthias Bolte 提交于
      d42cfb4e
    • M
      esx: Fix memory leak in esxVI_HostCpuIdInfo_Free() · 03a155a2
      Matthias Bolte 提交于
      03a155a2
    • M
      esx: Fix MAC address formatting · 645f4aca
      Matthias Bolte 提交于
      VMware uses two MAC address prefixes: 00:0c:29 and 00:50:56. The 00:0c:29
      prefix is used for ESX server generated addresses. The 00:50:56 prefix is
      split into two parts. MAC addresses above 00:50:56:3f:ff:ff are generated
      by a vCenter. The rest of the 00:50:56 prefix can be assigned manually.
      Any MAC address within the 00:0c:29 and 00:50:56 prefix can be specified
      in a domain XML config and the driver will handle the details internally.
      
      * src/esx/esx_vmx.c: fix MAC address formatting
      * tests/xml2vmxdata/*: update test files accordingly
      645f4aca
    • M
      esx: Handle 'vmxnet3' in esxVMX_FormatEthernet() · 4b3e1952
      Matthias Bolte 提交于
      In commit 3c80fac2 'vmxnet3' handling
      was added to esxVMX_ParseEthernet(), but not to the inverse function
      esxVMX_FormatEthernet().
      4b3e1952
    • M
      esx: Add documentation to the website · 57dbe08e
      Matthias Bolte 提交于
      * docs/drivers.html.in: list the ESX driver
      * docs/drvesx.html.in: the new ESX driver documentation
      * docs/hvsupport.html.in: add the ESX driver to the matrix
      * docs/index.html.in, docs/sitemap.html.in: list the ESX driver
      * src/esx/esx_driver.c: fix and cleanup some comments
      57dbe08e
    • J
      Fix compilation of libvirt against xen-unstable · 8d567fbc
      Jim Fehlig 提交于
      * src/xen/xen_hypervisor.c: xen-unstable changeset 19788 removed
        MAX_VIRT_CPUS from public headers, breaking compilation of libvirt
        on -unstable.  Its semanitc was retained with XEN_LEGACY_MAX_VCPUS.
        Ensure MAX_VIRT_CPUS is defined accordingly.
      8d567fbc
  13. 13 11月, 2009 11 次提交
    • D
      Fix incorrect reference counting logic in qemu monitor open · 5313dc37
      Daniel P. Berrange 提交于
      The QEMU monitor open method would not take a reference on
      the virDomainObjPtr until it had successfully opened the
      monitor. The cleanup code upon failure to open though would
      call qemuMonitorClose() which would in turn decrement the
      reference count. This caused the virDoaminObjPtr to be mistakenly
      freed and then the whole driver crashes
      
      * src/qemu/qemu_monitor.c: Fix reference counting in
        qemuMonitorOpen
      5313dc37
    • D
      Don't return fatal error in HAL driver init if HAL isn't running · 7bed630d
      Daniel P. Berrange 提交于
      The HAL driver returns a fatal error code in the case where HAL
      is not running. This causes the entire libvirtd daemon to quit
      which isn't desirable. Instead it should simply disable the HAL
      driver
      
      * src/node_device/node_device_hal.c: Quietly disable HAL if it is
        not running
      7bed630d
    • M
      Small guestfwd code cleanup · da82b03f
      Matthew Booth 提交于
      * src/qemu/qemu_conf.c: Remove and inline qemudBuildCommandLineChrDevTargetStr
      da82b03f
    • J
      AppArmor code cleanups · 3cbc0501
      Jamie Strandboge 提交于
      * src/security/security_apparmor.c: a few code cleanups following a
        review on the list
      3cbc0501
    • J
      AppArmor handling of accesses to readonly files · d0d4b8ad
      Jamie Strandboge 提交于
      Fixes https://launchpad.net/bugs/453335
      
      * src/security/virt-aa-helper.c: suppress confusing and misleading
        apparmor denied message when kvm/qemu tries to open a libvirt specified
        readonly file (such as a cdrom) with write permissions. libvirt uses
        the readonly attribute for the security driver only, and has no way
        of telling kvm/qemu that the device should be opened readonly
      d0d4b8ad
    • J
      AppArmor require absolute paths · dae7054b
      Jamie Strandboge 提交于
      Fixes https://launchpad.net/bugs/460271
      
      * src/security/virt-aa-helper.c: require absolute path for dynamic added
        files. This is required by AppArmor and conveniently prevents adding
        tcp consoles to the profile
      dae7054b
    • D
      Fix incorrect variable passed to LXC event callback · 007f016b
      Daniel P. Berrange 提交于
      The wrong variable was being passed in with the LXC event callback
      resulting in a later deadlock or crash
      
      * src/lxc/lxc_driver.c: Pass 'vm' instead of 'driver' to event
        callback
      007f016b
    • D
      Fix check for existance of cgroups at creation · d11d93f4
      Daniel P. Berrange 提交于
      In the scenario where the cgroups were mounted but the
      particular group did not exist, and the caller had not
      requested auto-creation, the code would fail to return
      an error condition. This caused the lxc_controller to
      think the cgroup existed, and it then later failed when
      attempting to use it
      
      * src/util/cgroup.c: Raise an error if the cgroup path does not
        exist
      d11d93f4
    • D
      Fix race condition in HAL driver startup · fd2090cd
      Daniel P. Berrange 提交于
      There is a race condition in HAL driver startup where the callback
      can get triggered before we have finished startup. This then causes
      a deadlock in the driver.
      
      * src/node_device/node_device_hal.c: RElease driver lock before
        registering DBus callbacks
      fd2090cd
    • D
      Fix formatting of XML for an inactive guest · f24e67d2
      Daniel P. Berrange 提交于
      If the virDomainDefPtr object has an 'id' of -1, then forcably
      set the VIR_DOMAIN_XML_INACTIVE flag to ensure generated XML
      does not include any cruft from the previously running guest
      such as console PTY path, or VNC port.
      
      * src/conf/domain_conf.c: Set VIR_DOMAIN_XML_INACTIVE if
        def->id is -1. Replace checks for def->id == -1 with
        check against flags & VIR_DOMAIN_XML_INACTIVE.
      f24e67d2
    • D
      Remove capng_lock() call when spawning LXC container init process · e6cbadd5
      Daniel P. Berrange 提交于
      The capng_lock() call sets the SECURE_NO_SETUID_FIXUP and SECURE_NOROOT
      bits on the process. This prevents the kernel granting capabilities to
      processes with an effective UID of 0, or with setuid programs. This is
      not actually what we want in the container init process. It should be
      allowed to run setuid processes & keep capabilities when root. All that
      is required is masking a handful of dangerous capabilities from the
      bounding set.
      
      * src/lxc/lxc_container.c: Remove bogus capng_lock() call.
      e6cbadd5