1. 24 4月, 2010 2 次提交
    • M
      cygwin: Check explicitly for getmntent_r · 40648b15
      Matthias Bolte 提交于
      Cygwin has mntent.h but lacks getmntent_r. Update preprocessor
      checks to catch this combination.
      40648b15
    • L
      QEmu JSON drop timestamp from command object · eb9b6532
      Luiz Capitulino 提交于
      It's not needed and is currently ignored, but this is a bug.
      
      It will get fixed soon and QMP will return an error for keys
      it doesn't know about, this will break libvirt.
      
      * src/qemu/qemu_monitor_json.c: remove qemuMonitorJSONCommandAddTimestamp()
        and the place where it's invoked in qemuMonitorJSONMakeCommand()
      eb9b6532
  2. 23 4月, 2010 5 次提交
    • S
      qemu: fix security context references in DAC code · c85c9b3a
      Spencer Shimko 提交于
      * The error messages coming from qemu's DAC support contain strings
        from the original SELinux security driver code.  This just removes
        references to "security context" and other SELinux-isms from the DAC
        code.
      Signed-off-by: NSpencer Shimko <sshimko@tresys.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      c85c9b3a
    • J
      Fix locking in qemudDomainCoreDump · 96ac1859
      Jiri Denemark 提交于
      The hang fix in d376b7d6 was incomplete
      since it left quite a few {Enter,Exit}Monitor calls which require driver
      to be unlocked. Since the driver is locked throughout the whole
      function, {Enter,Exit}MonitorWithDriver need to be used instead to
      ensure driver is not locked when issuing monitor commands.
      96ac1859
    • J
      Poll for migration end every 50ms instead of 50us · e2c05948
      Jiri Denemark 提交于
      The comment in qemuDomainWaitForMigrationComplete says we are polling
      every 50ms but the code sleeps only for 50us. This was already discussed
      during review but apparently forgotten when the series was pushed.
      e2c05948
    • D
      Fix QEMU text monitor command error checking · 9772beba
      Daniel P. Berrange 提交于
      The text monitor code was checking for a '\n' prefix on several
      places. Previously this would work, but since the monitor code
      re-write the '\n' is already stripped off, so mustn't be checked
      for.
      
      * src/qemu/qemu_monitor_text.c: Fix monitor error checking
      9772beba
    • D
      Fix CPU hotplug command names · a980d123
      Daniel P. Berrange 提交于
      Probably as a result of a merge error, the CPU hotplug command
      names were completely wrong.
      
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Fix
        the CPU hotplug command names
      a980d123
  3. 22 4月, 2010 5 次提交
    • J
      Use configured CPU model if possible · b9a2552d
      Jiri Denemark 提交于
      Adds ability to provide a preferred CPU model for CPUID data decoding.
      Such model would be considered as the best possible model (if it's
      supported by hypervisor) regardless on number of features which have to
      be added or removed for describing required CPU.
      b9a2552d
    • J
      Support removing features when converting data to CPU · 53c4f9fa
      Jiri Denemark 提交于
      So far, when CPUID data were converted into CPU model and features, the
      features can only be added to the model. As a result, when a guest asked
      for something like "qemu64,-svm" it would get a qemu32 plus a bunch of
      additional features instead.
      
      This patch adds support for removing feature from the base model.
      Selection algorithm remains the same: the best CPU model is the model
      which requires lowest number of features to be added/removed from it.
      53c4f9fa
    • J
      Deal with CPU models in [] · e07314f4
      Jiri Denemark 提交于
      Qemu committed a patch which list some CPU names in [] when asked for
      supported CPUs (qemu -cpu ?). Yet, it needs such CPUs to be passed
      without those square braces. When probing for supported CPU models, we
      can just strip the square braces and pretend we have never seen them.
      e07314f4
    • J
      Fix initial VCPU pinning in qemu driver · 9fbb810c
      Jiri Denemark 提交于
      First, inital VCPU pinning is set correctly but then it is reset by
      assigning qemu process to a new cgroup (which contains all CPUs). It's
      easily fixed by swapping these two actions.
      9fbb810c
    • G
  4. 19 4月, 2010 3 次提交
    • D
      Fix network hotplug to use device_add in QEMU · f3e098f3
      Daniel P. Berrange 提交于
      The initial boot of VMs uses -device for NICs where available. The
      corresponding monitor command is device_add, but the network hotplug
      code was still using device_del by mistake.
      
      * src/qemu/qemu_driver.c: Use device_add for NIC hotplug where
        available
      f3e098f3
    • D
      Fix error reporting for getfd + host_net_add in QEMU · 9417eb03
      Daniel P. Berrange 提交于
      If either of the getfd or host_net_add monitor commands return
      any text, this indicates an error condition. Don't ignore this!
      
      * src/qemu/qemu_monitor_text.c: Report errors for getfd and
        host_net_add
      9417eb03
    • D
      Fix device_del in JSON mode for QEMU · e699a824
      Daniel P. Berrange 提交于
      The 'device_del' command expects a parameter called 'id' but we
      were passing 'config'.
      
      * src/qemu/qemu_monitor_json.c: Fix device_del command parameter
      e699a824
  5. 16 4月, 2010 7 次提交
    • J
      Use virCheckFlags for APIs added in 0.8.0 · 7a2c6222
      Jiri Denemark 提交于
      7a2c6222
    • D
      Fix CDROM media change for QEMU when using -device syntax · c4896d37
      Daniel P. Berrange 提交于
      Disk devices in QEMU have two parts, the guest device and the host
      backend driver. Historically these two parts have had the same
      "unique" name. With the switch to using -device though, they now
      have separate names. Thus when changing CDROM media, for guests
      using -device syntax, we need to prepend the QEMU_DRIVE_HOST_PREFIX
      constant
      
      * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add helper function
        qemuDeviceDriveHostAlias() for building a host backend alias
      * src/qemu/qemu_driver.c: Use qemuDeviceDriveHostAlias() to determine
        the host backend alias for performing eject/change commands in the
        monitor
      c4896d37
    • D
      Update QEMU device_add command in JSON mode · db336caa
      Daniel P. Berrange 提交于
      The device_add command was added in JSON mode in a way I didn't
      expect. Instead of passing the normal device string to the JSON
      command:
      
          { "execute": "device_add", "arguments": { "device": "ne2k_pci,id=nic.1,netdev=net.1" } }
      
      We need to split up the device string into a full JSON object
      
          { "execute": "device_add", "arguments": { "driver": "ne2k_pci", "id": "nic.1", "netdev": "net.1" } }
      
      * src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Rename the
        qemuCommandLineParseKeywords method to qemuParseKeywords
        and export it to monitor
      * src/qemu/qemu_monitor_json.c: Split up device string into
        a JSON object for device_add command
      db336caa
    • D
      Rename parameter in qemuMonitorDeviceDel · fde060b8
      Daniel P. Berrange 提交于
      The parameter for the qemuMonitorDeviceDel() is a device alias,
      not a device config string. Rename the parameter reflect this
      and avoid confusion to readers.
      
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h,
        src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h,
        src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h:
        Rename devicestr to devalias in qemuMonitorDeviceDel()
      fde060b8
    • D
      Remove code from JSON monitor for commands that won't be ported · efd4ee78
      Daniel P. Berrange 提交于
      The QEMU developers have stated that they will not be porting
      the commands 'pci_add', 'pci_del', 'usb_add', 'usb_del' to the
      JSON mode monitor, since they're obsoleted by 'device_add'
      and 'device_del'. libvirt has (untested) code that would have
      supported those commands in theory, but since we already use
      device_add/del where available, there's no need to keep the
      legacy stuff anymore.
      
      The text mode monitor keeps support for all commands for sake
      of historical compatability.
      
      * src/qemu/qemu_monitor_json.c: Remove 'pci_add', 'pci_del',
        'usb_add', 'usb_del' commands
      efd4ee78
    • D
      Fix QEMU memory stats JSON mode · 4f81919a
      Daniel P. Berrange 提交于
      The QEMU driver is mistakenly calling directly into the text
      mode monitor for the domain memory stats query.
      
      * src/qemu/qemu_driver.c: Replace qemuMonitorTextGetMemoryStats with
        qemuMonitorGetMemoryStats
      * src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h: Add the new
        wrapper for qemuMonitorGetMemoryStats
      * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add
        qemuMonitorJSONGetMemoryStats implementation
      4f81919a
    • D
      Fix QEMU command building errors to reflect unsupported configuration · 3fb992c6
      Daniel P. Berrange 提交于
      Instead of reporting VIR_ERR_INTERNAL_ERROR use the more specific
      VIR_ERR_CONFIG_UNSUPPORTED
      
      * src/qemu/qemu_conf.c: Report VIR_ERR_CONFIG_UNSUPPORTED for
        unsupported video adapters
      3fb992c6
  6. 15 4月, 2010 2 次提交
    • S
      nwfilter: fix tear down order and consolidate functions · 41b08719
      Stefan Berger 提交于
      To avoid race-conditions, the tear down of a filter has to happen before
      the tap interface disappears and another tap interface with the same
      name can re-appear. This patch tries to fix this. In one place, where
      communication with the qemu monitor may fail, I am only tearing the
      filters down after knowing that the function did not fail.
      
      I am also moving the tear down functions into an include file for other
      drivers to reuse.
      41b08719
    • J
      qemudDomainAttachSCSIDisk: avoid FP NULL-ptr-deref from clang · a0dc4521
      Jim Meyering 提交于
      * src/qemu/qemu_driver.c (qemudDomainAttachSCSIDisk):
      Initialize "cont" to NULL, so clang knows it's set.
      Add an sa_assert so it knows it's non-NULL when dereferenced.
      a0dc4521
  7. 09 4月, 2010 3 次提交
    • D
      Add enospace option to qemu disk error policy · cddd3ac8
      David Allan 提交于
      * Dan Kenigsberg requested explicit support for the qemu default disk error policy which is enospace
      cddd3ac8
    • D
      More event callback fixes · 631c4ce8
      Daniel P. Berrange 提交于
      In a couple of cases typos meant we were firing the wrong type
      of event. In the python code my previous commit accidentally
      missed some chunks of the code.
      
      * python/libvirt-override-virConnect.py: Add missing python glue
        accidentally left out of previous commit
      * src/conf/domain_event.c, src/qemu/qemu_monitor_json.c: Fix typos
        in event name / method name to invoke
      631c4ce8
    • R
      qemu: catch cdrom change error · 4a2dd00e
      Ryan Harper 提交于
      Currently when we attempt to change the cdrom in a qemu VM the monitor
      doesn't generate an error if the target filename doesn't exist.  I've
      submitted a patch[1] for this.  This patch is the libvirt qemu-driver
      side which catches the error message from the monitor and reportes the
      error to libvirt.  This means that virsh attach-disk cdrom commands
      won't appear to succeed when qemu change command actually failed.
      
      * src/qemu/qemu_monitor_text.c: in qemuMonitorTextChangeMedia() look
        for failure to access the new data
      4a2dd00e
  8. 08 4月, 2010 4 次提交
  9. 07 4月, 2010 2 次提交
  10. 06 4月, 2010 3 次提交
  11. 05 4月, 2010 2 次提交
  12. 04 4月, 2010 2 次提交
    • D
      Implement managed save operations for qemu driver · 6e41f30e
      Daniel Veillard 提交于
      The images are saved in /var/lib/libvirt/qemu/save/
      and named $domainname.save . The directory is created appropriately
      at daemon startup. When a domain is started while a saved image is
      available, libvirt will try to load this saved image, and start the
      domain as usual in case of failure. In any case the saved image is
      discarded once the domain is created.
      
      * src/qemu/qemu_conf.h: adds an extra save path to the driver config
      * src/qemu/qemu_driver.c: implement the 3 new operations and handling
        of the image directory
      6e41f30e
    • D
      Add managed save API entry points · 15c647a9
      Daniel Veillard 提交于
      virDomainManagedSave() is to be run on a running domain. Once the call
      complete, as in virDomainSave() the domain is stopped upon completion,
      but there is no restore counterpart as any order to start the domain
      from the API would load the state from the managed file, similary if
      the domain is autostarted when libvirtd starts.
      Once a domain has restarted his managed save image is destroyed,
      basically managed save image can only exist for a stopped domain,
      for a running domain that would be by definition outdated data.
      
      * include/libvirt/libvirt.h.in src/libvirt.c src/libvirt_public.syms:
        adds the new entry points virDomainManagedSave(),
        virDomainHasManagedSaveImage() and virDomainManagedSaveRemove()
      * src/driver.h src/esx/esx_driver.c src/lxc/lxc_driver.c
        src/opennebula/one_driver.c  src/openvz/openvz_driver.c
        src/phyp/phyp_driver.c src/qemu/qemu_driver.c src/vbox/vbox_tmpl.c
        src/remote/remote_driver.c src/test/test_driver.c src/uml/uml_driver.c
        src/xen/xen_driver.c: add corresponding new internal drivers entry
        points
      15c647a9