1. 22 7月, 2009 8 次提交
    • N
      Add support for physical memory access for QEmu · e4c48e02
      Nguyen Anh Quynh 提交于
      * include/libvirt/libvirt.h include/libvirt/libvirt.h.in: adds the new
        flag VIR_MEMORY_PHYSICAL for virDomainMemoryPeek
      * src/libvirt.c: update the front-end checking
      * src/qemu_driver.c: extend the QEmu driver
      e4c48e02
    • M
      Add support for network device detach · c2709cda
      Mark McLoughlin 提交于
      qemu network devices are hot-unplugged in two stages - first the PCI NIC
      is removed using 'pci_del <pci_addr>' and then the backend is removed
      using 'host_net_remove <vlan> <name>'.
      
      In order to perform these operations we need to have retained the
      PCI address, backend name and vlan number.
      
      * src/qemu_driver.c: add qemudDomainDetachNetDevice()
      c2709cda
    • M
      Retain PCI address from NIC attach · 4e21a95a
      Mark McLoughlin 提交于
      When we pci_add a NIC, we need to retain the PCI address assigned by
      qemu for using during detach.
      
      * src/qemu_driver.c: use qemudParsePciAddReply() to pull the PCI
        address from the pci_add reply
      
      * src/domain_conf.c: handle storing and parsing the PCI address in the
        domain state XML file
      4e21a95a
    • M
      Re-factor pci_add reply parsing and parse domain/bus numbers · ffec099e
      Mark McLoughlin 提交于
      The current code for parsing pci_add replies ignores the the domain and
      bus numbers. Re-write the code to rectify that.
      
      Also, since pci_add is used for NIC hotplug as well ask disk hotplug,
      re-factor the code into a separate function.
      
      * src/qemu_driver.c: add qemudParsePciAddReply() function which can
        handle parsing domain and bus numbers
      ffec099e
    • M
      Remove the network backend if NIC hotplug fails · d06f261c
      Mark McLoughlin 提交于
      If we fail to pci_add a NIC, we should remove the network backend and
      leave things the way we found them. To do that, we pre-allocate a
      host_net_remove monitor command and issue that if the pci_add fails.
      If the remove fails, we just log a warning.
      
      We can only do this if we have a name for the network backend and
      we know the vlan number its associated with.
      
      * src/qemu_driver.c: host_net_remove the network backend if the
        pci_add fails
      d06f261c
    • M
      Basic qemu NIC hotplug support · 35153940
      Mark McLoughlin 提交于
      Implement basic NIC hotplug support using the 'host_net_add' and
      'pci_add' qemu monitor commands.
      
      For now, we don't support 'bridge' or 'network' types.
      
      Also, if pci_add fails, we currently fail to remove the backend
      which we added.
      
      Finally, NIC hot-unplug support is missing.
      
      * src/qemu_driver.c: add qemudDomainAttachNetDevice()
      
      * src/qemu_conf.[ch]: export qemuBuildNicStr(), qemuBuildHostNetStr()
        and qemuAssignNames()
      
      * src/libvirt_private.syms: export virDomainNetTypeToString()
      35153940
    • M
      Make qemuCmdFlags available in qemudDomainAttachDevice() · 423af197
      Mark McLoughlin 提交于
      qemudDomainChangeEjectableMedia() currently extracts the qemu command
      line flags, but other device attaching code might need it, so move
      the qemudExtractVersionInfo() call up a frame.
      
      * src/qemu_driver.c: move the qemudExtractVersionInfo() call from
        qemudDomainChangeEjectableMedia() to qemudDomainAttachDevice()
      423af197
    • M
      Retain disk PCI address across libvirtd restarts · 01654107
      Mark McLoughlin 提交于
      When we hot-plug a disk device into a qemu guest, we need to retain its
      PCI address so that it can be removed again later. Currently, we do
      retain the slot number, but not across libvirtd restarts.
      
      Add <state devaddr="xxxx:xx:xx"/> to the disk device XML config when the
      VIR_DOMAIN_XML_INTERNAL_STATUS flag is used. We still don't parse the
      domain and bus number, but the format allows us to do that in future.
      
      * src/domain_conf.h: replace slotnum with pci_addr struct, add helper
        for testing whether the address is valid
      
      * src/domain_conf.c: handle formatting and parsing the address
      
      * src/qemu_driver.c: store the parsed slot number as a full PCI address,
        and use this address with the pci_del monitor command
      
      * src/vbox/vbox_tmpl.c: we're debug printing slotnum here even though
        it can never be set, just delete it
      01654107
  2. 21 7月, 2009 1 次提交
  3. 17 7月, 2009 2 次提交
    • C
      qemu: Try multiple times to open unix monitor socket · 3b541768
      Cole Robinson 提交于
      Unlike the pty monitor (which we know exists since we scrape its path from
      stdout), we have no way of knowing that the unix monitor socket should exist/
      be initialized. As a result, some of my KVM guests randomly fail to start on
      F10 host.
      
      Try to open the unix socket in a 3 second timeout loop. Ignore EACCES (path
      does not exist if a first time run) and ECONNREFUSED (leftover socket from
      a previous run hasn't been removed yet). Fixes things for me.
      3b541768
    • D
      Run QEMU guests as an unprivileged user · 0714b2ba
      Daniel P. Berrange 提交于
      * configure.in: Add --with-qemu-user and --with-qemu-group args
      * libvirt.spec.in: use 'qemu' for user/group for Fedora >= 12
      * qemud/libvirtd_qemu.arg, qemud/test_libvirtd_qemu.aug,
        src/qemu.conf: Add 'user' and 'group' args for configuration
      * src/Makefile.am: Create %localstatedir/cache/libvirt/qemu
      * src/qemu_conf.c, src/qemu_conf.h: Load user/group from config
      * src/qemu_driver.c: Change user ID/group ID when launching QEMU
        guests. Change user/group ownership on disks/usb/pci devs.
        Put memory dumps in %localstatedir/cache/libvirt/qemu
      * src/util.c, src/util.h: Add convenient APIs for converting
        username/groupname to user ID / group ID
      0714b2ba
  4. 16 7月, 2009 4 次提交
  5. 11 7月, 2009 1 次提交
  6. 10 7月, 2009 4 次提交
    • M
      Switch to using a unix socket for the qemu monitor · 62455ed8
      Mark McLoughlin 提交于
      We keep support for the pty based monitor so that we can re-connect
      to VMs started by older versions of libvirtd.
      
      * src/domain_conf.c: handle formatting and parsing unix monitors
      
      * src/qemu_driver.c: add qemudOpenMonitorUnix(), remove the monitor
        pty path searching from qemudFindCharDevicePTYs(), switch
        qemudStartVMDaemon() and qemuDomainXMLToNative() to using a unix
        monitor
      
      * tests/qemuxml2argvtest.c: switch to using a unix monitor
      
      * tests/qemuxml2argvdata/qemuxml2argv-*.args: update test data
      62455ed8
    • M
      Add the monitor type to the domain state XML · 05d377bd
      Mark McLoughlin 提交于
      There are no functional changes in this patch apart from adding the
      monitor type to the state XML.
      
      The patch mostly consists of switching to use virDomainChrDef every
      where to describe the monitor.
      
      * src/domain_conf.h: replace monitorpath with monitor_chr
      
      * src/domain_conf.c: handle parsing the monitor type and initializing
        monitor chr
      
      * src/qemu_conf.[ch]: make qemudBuildCommandLine take a
        virDomainChrDefPtr and use that to build the -monitor parameter
      
      * src/qemu_driver.c: split pty specific and common code from
        qemudOpenMonitor, have qemudStartVMDaemon() initialize monitor_chr
      
      * tests/qemuxml2argvtest.c: update for qemudBuildCommandLine() change
      05d377bd
    • M
      Minor qemu monitor coding style fixes · 1f4ec305
      Mark McLoughlin 提交于
      * src/qemu_driver.c: use a consistent coding style for function
        definitions
      1f4ec305
    • M
      Don't leak vm->monitorpath on re-connect · 8a52daa2
      Mark McLoughlin 提交于
      * src/qemu_driver.c: vm->monitorpath is already initialized in the case
        of re-connect, so move the initialization for the normal startup case
        out of the common code
      8a52daa2
  7. 30 6月, 2009 1 次提交
  8. 29 6月, 2009 1 次提交
  9. 25 6月, 2009 2 次提交
  10. 23 6月, 2009 1 次提交
  11. 16 6月, 2009 1 次提交
  12. 12 6月, 2009 3 次提交
  13. 03 6月, 2009 1 次提交
  14. 02 6月, 2009 1 次提交
    • D
      NPIV implementation for node device create and destroy · 81d0ffbc
      Daniel Veillard 提交于
      * src/Makefile.am src/node_device.[ch] src/node_device_conf.[ch]
        src/node_device_hal.[ch] src/node_device_hal_linux.c
        src/qemu_driver.c src/remote_internal.c src/storage_backend.c
        src/virsh.c src/xen_unified.c tests/nodedevxml2xmltest.c
        po/POTFILES.in: implementation for node device create and destroy
        in NPIV support, patch by David Allan
      Daniel
      81d0ffbc
  15. 29 5月, 2009 2 次提交
  16. 28 5月, 2009 1 次提交
  17. 21 5月, 2009 3 次提交
  18. 19 5月, 2009 1 次提交
  19. 15 5月, 2009 1 次提交
  20. 11 5月, 2009 1 次提交