1. 22 7月, 2009 24 次提交
    • 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
    • J
      avoid a make distcheck failure: distribute docs/schemas/interface.rng · 6ec87af6
      Jim Meyering 提交于
      * docs/schemas/Makefile.am (schema_DATA): Add interface.rng.
      6ec87af6
    • J
      avoid a make distcheck failure: distribute tests/interfaceschemadata/ · 20448818
      Jim Meyering 提交于
      * tests/Makefile.am (EXTRA_DIST): Add interfaceschemadata.
      20448818
    • L
      Release conn lock before reporting interface errors · 528d37bd
      Laine Stump 提交于
      * src/datatypes.c: fix a lock problem on error handling, as the
        error report takes the lock, it must be released before, fixes
        the problem but just for Interface objects
      528d37bd
    • L
      Update modified mac address in place in virGetInterface · fb1b7d8e
      Laine Stump 提交于
      * src/datatypes.c: handle the nasty case where an interface
        mac address change, while it's already in use
      fb1b7d8e
    • L
      Fix multiple memory leaks in virsh · d26d18a1
      Laine Stump 提交于
      * virsh.c: fix a number of leaks of virDomain, virStoragePool,
        virNodeDevice, etc.
      d26d18a1
    • D
      Fix typo in storage cloning · 2cc33bfe
      Daniel P. Berrange 提交于
      2cc33bfe
    • 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
      Store the interface vlan number in the domain state · 30605477
      Mark McLoughlin 提交于
      Currently, an interface's vlan number corresponds to its index in
      the table of network interfaces. That is no longer true when we
      allow devices to be removed.
      
      To fix this, we store the vlan number in the domain's state XML
      so that it survives libvirtd restarts.
      
      * src/domain_conf.h: add vlan number to virDomainNetDef
      
      * src/domain_conf.c: store it in XML as <state vlan='N'/>, defaulting
        to -1 if this is state saved by a previous version of libvirt
      
      * src/qemu_conf.c: assign vlan numbers before starting qemu
      30605477
    • M
      Add NIC and hostnet names to domain state XML · 36c820e6
      Mark McLoughlin 提交于
      The qemu driver needs to assign and keep track of identifiers for
      network devices so that it can remove them. We need to keep this state
      across libvirtd restarts, but it's not configuration that needs to
      be kept across guest restarts.
      
      * src/domain_conf.c: parse and format <state nic="foo" hostnet="bar"/>
      36c820e6
    • M
      Assign names to qemu NICs and network backends · c23dae4e
      Mark McLoughlin 提交于
      We need these so that we can remove the devices via the monitor.
      
      * src/domain_conf.h: add nic_name and hostnet_name to virDomainNetDef
      
      * src/domain_conf.c: free nic_name and hostnet_name
      
      * src/qemu_conf.c: add qemuAssignNetNames(), use it if qemu has
        support for the param and pass the names on the command line
      
      * tests/qemuxml2argv*: add a test for this
      c23dae4e
    • M
      Add checks for some NIC hotplug related features added in qemu-0.10.0 · 94889768
      Mark McLoughlin 提交于
      Add QEMUD_CMD_FLAG_NET_NAME to indicate that '-net ...,name=foo' is
      supported and QEMUD_CMD_FLAG_HOST_NET_ADD to indicate that the
      'host_net_add' monitor command is available.
      
      Set both these flags if the qemu version is greater than 0.10.0.
      Checking via the '-help' output would not work for the monitor command
      and even for the command line arg, it would be quite fragile.
      
      * src/qemu_conf.h: add new flags as aliases of QEMUD_CMD_FLAG_0_10
      
      * src/qemu_conf.c: set QEMUD_CMD_FLAG_0_10 for versions >= 0.10.0
      
      * tests/qemuhelptest.c: set QEMUD_CMD_FLAG_0_10 for the appropriate
        qemu versions
      94889768
    • M
      Factor qemuBuildHostNetStr() out from qemuBuildCommandLine() · 63e67ee0
      Mark McLoughlin 提交于
      Re-factor this code so that it can be used for NIC hotplug
      too. The awkward prefix and type_sep arguments are needed to
      allow us to do "host_net_add tap vlan=..."
      
      * src/qemu_conf.c: factor the net backend string formatting
        code into its own function
      63e67ee0
    • M
      Factor qemuBuildNicStr() out from qemuBuildCommandLine() · ce2e300a
      Mark McLoughlin 提交于
      Re-factor this code so that it can be used for NIC hotplug
      too. The awkward arguments are needed to allow use to do
      "pci_add auto nic macaddr=..."
      
      * src/qemu_conf.c: factor the nic string formatting code into
        its own function
      ce2e300a
    • 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
    • M
      Add internal XML parsing/formatting flag · aa98871c
      Mark McLoughlin 提交于
      We need to store things like device names and PCI slot numbers in the
      qemu domain state file so that we don't lose that information on
      libvirtd restart. Add a flag to indicate that this information should
      be parsed or formatted.
      
      Make bit 16 and above of the flags bitmask for internal use only and
      consume the first bit for this new status flag.
      
      * include/libvirt/libvirt.h: add VIR_DOMAIN_XML_FLAGS_MASK
      
      * src/libvirt.c: reject private flags in virDomainGetXMLDesc()
      
      * src/domain_conf.h: add VIR_DOMAIN_XML_INTERNAL_STATUS
      
      * src/domain_conf.c: pass the flag from virDomainObjParseXML() and
        virDomainSaveStatus
      aa98871c
    • L
      Rename variable for compilation in Mingw32 · 1499e1d5
      Laine Stump 提交于
      * src/virsh.c: rename interface into iface
      1499e1d5
    • T
      Fix documentation of virStoragePoolUndefine return · 683241de
      Thomas Treutner 提交于
      * src/libvirt.c: the documented return was wrong
      683241de
    • D
      Fix typo in check for glusterfs format pools · 6c3f7d7f
      Daniel P. Berrange 提交于
      * src/storage_backend_fs.c: Replace = with == for comparison
      6c3f7d7f
  2. 21 7月, 2009 11 次提交
  3. 17 7月, 2009 5 次提交