- 18 1月, 2010 15 次提交
-
-
由 Daniel P. Berrange 提交于
The current SCSI hotplug support attaches a brand new SCSI controller for every disk. This is broken because the semantics differ from those used when starting the VM initially. In the latter case, each SCSI controller is filled before a new one is added. If the user specifies an high drive index (sdazz) then at initial startup, many intermediate SCSI controllers may be added with no drives. This patch changes SCSI hotplug so that it exactly matches the behaviour of initial startup. First the SCSI controller number is determined for the drive to be hotplugged. If any controller upto and including that controller number is not yet present, it is attached. Then finally the drive is attached to the last controller. NB, this breaks SCSI hotunplug, because there is no 'drive_del' command in current QEMU. Previous SCSI hotunplug was broken in any case because it was unplugging the entire controller, not just the drive in question. A future QEMU will allow proper SCSI hotunplug of a drive. This patch is derived from work done by Wolfgang Mauerer on disk controllers. * src/qemu/qemu_driver.c: Fix SCSI hotplug to add a drive to the correct controller, instead of just attaching a new controller. * 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: Add support for 'drive_add' command
-
由 Wolfgang Mauerer 提交于
This patch allows for explicit hotplug/unplug of SCSI controllers. Ordinarily this is not required, since QEMU/libvirt will attach a new SCSI controller whenever one is required. Allowing explicit hotplug of controllers though, enables the caller to specify a static PCI address, instead of auto-assigning the next available PCI slot. Or it will when we have static PCI addressing. This patch is derived from Wolfgang Mauerer's disk controller patch series. * src/qemu/qemu_driver.c: Support hotplug & unplug of SCSI controllers * 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: Add new API for attaching PCI SCSI controllers
-
由 Jim Meyering 提交于
* src/vbox/vbox_tmpl.c (vboxStorageVolDelete): Remove always-true array-is-non-NULL test. git grep 'key\[.*\];'|grep -F .h src/datatypes.h: char key[PATH_MAX]; (vboxStorageVolGetInfo): Likewise. (vboxStorageVolGetXMLDesc): Likewise. (vboxStorageVolGetPath): Likewise. (vboxDomainDefineXML): Likewise. (but now with "mac[]")
-
由 Jim Meyering 提交于
* src/lxc/lxc_driver.c (lxcSetupInterfaces): Remove always-true array-is-non-NULL test. git grep 'mac\[.*\];'|grep -F .h src/conf/domain_conf.h: unsigned char mac[VIR_MAC_BUFLEN];
-
由 Jim Meyering 提交于
The latter is not officially "wrong", but *is* terribly anachronistic. I think automake documentation or comments call that syntax obsolescent. * cfg.mk (_makefile_at_at_check_exceptions): Exempt @SCHEMADIR@ and @SYSCONFDIR@ uses -- there are no Makefile variables for those. * docs/Makefile.am: Use $(INSTALL), not @install@. * examples/dominfo/Makefile.am: Similar. * examples/domsuspend/Makefile.am: Similar. * proxy/Makefile.am: Similar. * python/Makefile.am: Similar. * python/tests/Makefile.am: Similar. * src/Makefile.am: Similar. * tests/Makefile.am: Similar.
-
由 Jim Meyering 提交于
* src/storage/storage_backend.h: Include <stdint.h>.
-
由 Jim Meyering 提交于
* src/esx/esx_vi_types.c: Include <stdint.h>.
-
由 Jim Meyering 提交于
* src/vbox/vbox_driver.c: Include <stdint.h> <unistd.h> <sys/types.h>.
-
由 Jim Meyering 提交于
* src/cpu/cpu_x86_data.h: Include <stdint.h>.
-
由 Jim Meyering 提交于
Until recently, some gnulib-generated replacement headers included *other* headers that were not strictly necessary, thus masking the need in this file for an explicit <stdlib.h>. * src/util/util.c: Include <stdlib.h> for declarations of e.g., strtol, random_r, getenv, etc.
-
由 Jiri Denemark 提交于
Current implementation of x86Decode() used for CPUID -> model+features translation does not always select the closest CPU model. When walking through all models from cpu_map.xml the function considers a new candidate as a better choice than a previously selected candidate only if the new one is a superset of the old one. In case the new candidate is closer to host CPU but lacks some feature comparing to the old candidate, the function does not choose well. This patch changes the algorithm so that the closest model is always selected. That is, the model which requires the lowest number of additional features to describe host CPU. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Matthias Bolte 提交于
qemudFindCharDevicePTYsMonitor reports an error if 'info chardev' didn't provide information for a requested device, even if the log output parsing had found the pty path for that device. This makes pty assignment fail for older QEMU/KVM versions. For example KVM 72 on Debian doesn't support 'info chardev', so qemuMonitorTextGetPtyPaths cannot parse any useful information and the hash for device-id-to-pty-path mapping stays empty. Make qemudFindCharDevicePTYsMonitor report an error only if the log output parsing and the 'info chardev' parsing failed to provide the pty path.
-
由 Matthias Bolte 提交于
* src/conf/domain_conf.c: add defaults for the video device * src/esx/esx_vmx.[ch]: add VNC support to the VMX handling * tests/vmx2xmltest.c, tests/xml2vmxtest.c: add tests for the VNC support
-
由 Matthias Bolte 提交于
Before the driver assumed that there is always a domain part. That's not true. Now the domain part is handled as optional.
-
由 Matthias Bolte 提交于
This stops libvirt from probing for a libvirtd on the ESX server and sets the base for the implementation of the secondary drivers.
-
- 16 1月, 2010 10 次提交
-
-
由 Daniel P. Berrange 提交于
* src/conf/domain_conf.c: Allow virDomainDeviceInfoIsSet, virDomainDeviceInfoClear & virDomainDeviceInfoFormat when building Xen proxy
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_monitor_json.c: We fill in the PCI function number now, so remove obsolete XXX comment
-
由 Daniel P. Berrange 提交于
The current code for using -drive simply sets the -drive 'index' parameter. QEMU internally converts this to bus/unit depending on the type of drive. This does not give us precise control over the bus/unit assignment though. This change switches over to make libvirt explicitly calculate the bus/unit number. In addition bus/unit/index are actually irrelevant for VirtIO disks, since each virtio disk is a separate PCI device. No disk controller is involved. Doing the conversion to bus/unit in libvirt allows us to correctly attach SCSI controllers when required. * src/qemu/qemu_conf.c: Specify bus/unit instead of index for disks * tests/qemuxml2argvdata/qemuxml2argv-disk*.args: Switch over from using index=NNNN, to bus=NN, unit=NN for SCSI/IDE/Floppy disks
-
由 Daniel P. Berrange 提交于
To enable it to be called from multiple locations, split out the code for building the -drive arg string. This will be needed by later patches which do drive hotplug, the conversion to use -device, and the conversion to controller/bus/unit addressing * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add qemuBuildDriveStr for building -drive arg string
-
由 Daniel P. Berrange 提交于
Convert the QEMU monitor APIs over to use virDomainDeviceAddress structs for passing addresses in/out, instead of individual bits. This makes the number of parameters smaller & easier to deal with. No functional change * src/qemu/qemu_driver.c, src/qemu/qemu_monitor.c, src/qemu/qemu_monitor.h, src/qemu/qemu_monitor_text.c, src/qemu/qemu_monitor_text.h: Change monitor hotplug APIs to take an explicit address ptr for all host/guest addresses
-
由 Wolfgang Mauerer 提交于
This augments virDomainDevice with a <controller> element that is used to represent disk controllers (e.g., scsi controllers). The XML format is given by <controller type="scsi" index="<num>"> <address type="pci" domain="0xNUM" bus="0xNUM" slot="0xNUM"/> </controller> where type denotes the disk interface (scsi, ide,...), index is an integer that identifies the controller for association with disks, and the <address> element specifies the controller address on the PCI bus as described in previous commits The address element can be omitted; in this case, an address will be assigned automatically. Most of the code in this patch is from Wolfgang Mauerer's previous disk controller series * docs/schemas/domain.rng: Define syntax for <controller> XML element * src/conf/domain_conf.c, src/conf/domain_conf.h: Define virDomainControllerDef struct, and routines for parsing and formatting XML * src/libvirt_private.syms: Add virDomainControllerInsert and virDomainControllerDefFree
-
由 Daniel P. Berrange 提交于
When parsing the <disk> element specification, if no <address> is provided for the disk, then automatically assign one based on the <target dev='sdXX'/> device name. This provides for backwards compatability with existing applications using libvirt, while also allowing new apps to have complete fine grained control. * src/conf/domain_conf.h, src/conf/domain_conf.c, src/libvirt_private.syms: Add virDomainDiskDefAssignAddress() for assigning a controller/bus/unit address based on disk target * src/qemu/qemu_conf.c: Call virDomainDiskDefAssignAddress() after generating XML from ARGV * tests/qemuxml2argvdata/*.xml: Add in drive address information to all XML files
-
由 Daniel P. Berrange 提交于
Add the virDomainDeviceAddress information to the sound, video and watchdog devices. This means all of them gain the new XML element <address .... /> This brings them upto par with disk/net/hostdev devices which already have address info * src/conf/domain_conf.h: Add virDomainDeviceAddress to sound, video & watchdog device struts. * src/conf/domain_conf.c: Hook up parsing/formatting for virDomainDeviceAddress in sound, video & watchdog devices * docs/schemas/domain.rng: Associate device address info with sound, video & watchdog
-
由 Daniel P. Berrange 提交于
Introduce a new structure struct _virDomainDeviceDriveAddress { unsigned int controller; unsigned int bus; unsigned int unit; }; and plug that into virDomainDeviceAddress and generates XML that looks like <address type='drive' controller='1' bus='0' unit='5'/> This syntax will be used by the QEMU driver to explicitly control how drives are attached to the bus * src/conf/domain_conf.h, src/conf/domain_conf.c: Parsing and formatting of drive addresses * docs/schemas/domain.rng: Define new address format for drives
-
由 Daniel P. Berrange 提交于
All guest devices now use a common device address structure summarized by: enum virDomainDeviceAddressType { VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE, VIR_DOMAIN_DEVICE_ADDRESS_TYPE_PCI, }; struct _virDomainDevicePCIAddress { unsigned int domain; unsigned int bus; unsigned int slot; unsigned int function; }; struct _virDomainDeviceInfo { int type; union { virDomainDevicePCIAddress pci; } addr; }; This replaces the anonymous structs in Disk/Net/Hostdev data structures. Where available, the address is *always* printed in the XML file, instead of being hidden in the internal state file. <address type='pci' domain='0x0000' bus='0x1e' slot='0x07' function='0x0'/> The structure definition is based on Wolfgang Mauerer's disk controller patch series. * docs/schemas/domain.rng: Define the <address> syntax and associate it with disk/net/hostdev devices * src/conf/domain_conf.h, src/conf/domain_conf.c, src/libvirt_private.syms: APIs for parsing/formatting address information. Also remove the QEMU specific 'pci_addr' attributes * src/qemu/qemu_driver.c: Replace use of 'pci_addr' attrs with new standardized format.
-
- 15 1月, 2010 3 次提交
-
-
由 Matthias Bolte 提交于
Commit 5073aa99 added an additional '}' to a case block that messed up the block structure of the get_files function.
-
由 Jim Meyering 提交于
* src/xen/xend_internal.c (wr_sync): Correct the diagnostic.
-
由 Matthias Bolte 提交于
-
- 14 1月, 2010 3 次提交
-
-
由 Cole Robinson 提交于
With the introduction virDispatchError, hook function errors are never sent through the error callback, so users will never see these messages. Fix this by calling virDispatchError after hook failure.
-
由 Cole Robinson 提交于
Based off how QEMU does it, look through /sys/bus/usb/devices/* for matching vendor:product info, and if found, use info from the surrounding files to build the device's /dev/bus/usb path. This fixes USB device assignment by vendor:product when running qemu as non-root (well, it should, but for some reason I couldn't reproduce the failure people are seeing in [1], but it appears to work properly) [1] https://bugzilla.redhat.com/show_bug.cgi?id=542450
-
由 Cole Robinson 提交于
-
- 13 1月, 2010 5 次提交
-
-
由 Cole Robinson 提交于
We are setting the same property two different ways without free'ing in between. Just drop the second assignment.
-
由 Cole Robinson 提交于
There are quite a few differences between how udev exposes legacy and USB floppy devs, but this patch takes care of both variants.
-
由 Cole Robinson 提交于
udev doesn't prefix USB product/vendor info with '0x', so the strtol conversions were wrong for the product field (vendor already set the correct base). Make the change for PCI product/vendor as well to be safe. This fixes USB device assignment via virt-manager.
-
由 Cole Robinson 提交于
This allows debug statements and raised errors in hook functions to actually be logged somewhere (stderr). Users can enable debugging in the daemon and now see more info in /var/log/libvirt/...
-
由 Jim Fehlig 提交于
Upstream xen has changed parameters to the migration operation several times over the past 18 months. Changeset 17553 removed the resouce parameter, Changesets 17709, 17753, and 20326 added ssl, node, and change_home_server parameters respectively. Fortunately, testing has revealed that xend will fail the operation if a parameter is missing but happily honor it if unknown parameters are provided. Thus all currently supported parameters can be provided, satisfying current xend but not regressing older versions.
-
- 12 1月, 2010 4 次提交
-
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
-
由 Cole Robinson 提交于
This way we won't squash the original error report in MigratePerform, as is done for P2P and Tunneled migration.
-
由 Cole Robinson 提交于
Can be used to re-set an old error, which may have been squashed by other functions (like cleanup routines). Will be used in subsequent patches
-