- 12 3月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
The code to add job support into libvirtd caused a problem in qemudDomainSetVcpus. In particular, a qemuDomainObjEndJob() call was added at the end of the function, but a corresponding qemuDomainObjBeginJob() was not. Additionally, a call to qemuDomainObj{Enter,Exit}Monitor() was also missed in qemudDomainHotplugVcpus(). These missing calls conspired to cause a hang in the libvirtd process after the command was finished. Fix this by adding the missing calls. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 11 3月, 2010 2 次提交
-
-
由 Chris Lalancette 提交于
As previously discussed[1], this patch removes the qemudDomainSetMaxMemory() function, since it doesn't work. This means that instead of getting somewhat cryptic errors, you will now get: error: Unable to change MaxMemorySize error: this function is not supported by the hypervisor: virDomainSetMaxMemory Which describes the situation perfectly. [1] https://www.redhat.com/archives/libvir-list/2010-February/msg00928.htmlSigned-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Chris Lalancette 提交于
When using the JSON monitor, qemuMonitorJSONExtractCPUInfo was returning 0 on success. Unfortunately, higher levels of the cpuinfo code expect that it returns the number of CPUs it found on success. This one-line patch fixes it so that it returns the correct number. This makes "virsh vcpuinfo <domain>" work when using the JSON monitor. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 09 3月, 2010 1 次提交
-
-
由 Laine Stump 提交于
A few more non-literal format strings in error log messages have crept in. Fix them in the standard way - turn the format string into "%s" with the original string as the arg.
-
- 08 3月, 2010 3 次提交
-
-
由 Adam Litke 提交于
When adding domainMemoryStats API support for the qemu driver, I didn't follow the locking rules exactly. The job condition must be held when executing monitor commands. This corrects the segfaults I was seeing when calling domainMemoryStats in a multi-threaded environment. * src/qemu/qemu_driver.c: in qemudDomainMemoryStats() add missing calls to qemuDomainObjBeginJob/qemuDomainObjEndJob
-
由 Laine Stump 提交于
doTunnelSendAll function (used by QEMU migration) uses a 64k buffer on the stack, which could be problematic. This patch replaces that with a buffer from the heap. While in the neighborhood, this patch also improves error reporting in the case that saferead fails - previously, virStreamAbort() was called (resetting errno) before reporting the error. It's been changed to report the error first. * src/qemu/qemu_driver.c: fix doTunnelSendAll() to use a malloc'ed buffer
-
由 Eric Blake 提交于
Prior to this patch, there was an inconsistent mix between GNU and C99. For consistency, and potential portability to other compilers, stick with the C99 vararg macro syntax. * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/conf/domain_conf.c (virDomainReportError): Likewise. * src/conf/domain_event.c (eventReportError): Likewise. * src/conf/interface_conf.c (virInterfaceReportError): Likewise. * src/conf/network_conf.c (virNetworkReportError): Likewise. * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise. * src/conf/secret_conf.h (virSecretReportError): Likewise. * src/conf/storage_conf.h (virStorageReportError): Likewise. * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than GNU vararg macro syntax. * src/esx/esx_driver.c (ESX_ERROR): Likewise. * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise. * src/esx/esx_network_driver.c (ESX_ERROR): Likewise. * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise. * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise. * src/esx/esx_util.c (ESX_ERROR): Likewise. * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vmx.c (ESX_ERROR): Likewise. * src/util/hostusb.c (usbReportError): Use C99 rather than GNU vararg macro syntax. * src/util/json.c (virJSONError): Likewise. * src/util/macvtap.c (ReportError): Likewise. * src/util/pci.c (pciReportError): Likewise. * src/util/stats_linux.c (virStatsError): Likewise. * src/util/util.c (virUtilError): Likewise. * src/util/xml.c (virXMLError): Likewise. * src/xen/proxy_internal.c (virProxyError): Use C99 rather than GNU vararg macro syntax. * src/xen/sexpr.c (virSexprError): Likewise. * src/xen/xen_driver.c (xenUnifiedError): Likewise. * src/xen/xen_hypervisor.c (virXenError): Likewise. * src/xen/xen_inotify.c (virXenInotifyError): Likewise. * src/xen/xend_internal.c (virXendError): Likewise. * src/xen/xm_internal.c (xenXMError): Likewise. * src/xen/xs_internal.c (virXenStoreError): Likewise. * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/datatypes.c (virLibConnError): Likewise. * src/interface/netcf_driver.c (interfaceReportError): Likewise. * src/libvirt.c (virLibStreamError): Likewise. * src/lxc/lxc_conf.h (lxcError): Likewise. * src/network/bridge_driver.c (networkReportError): Likewise. * src/nodeinfo.c (nodeReportError): Likewise. * src/opennebula/one_conf.h (oneError): Likewise. * src/openvz/openvz_conf.h (openvzError): Likewise. * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise. * src/qemu/qemu_conf.h (qemuReportError): Likewise. * src/remote/remote_driver.c (errorf): Likewise. * src/security/security_driver.h (virSecurityReportError): Likewise. * src/test/test_driver.c (testError): Likewise. * src/uml/uml_conf.h (umlReportError): Likewise. * src/vbox/vbox_driver.c (vboxError): Likewise. * src/vbox/vbox_tmpl.c (vboxError): Likewise.
-
- 06 3月, 2010 3 次提交
-
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (qemudDomainAttachSCSIDisk): Handle the (theoretical) case of an empty controller list, so that clang does not think the subsequent dereference of "cont" would dereference an undefined variable (due to preceding loop not iterating even once).
-
由 Jim Meyering 提交于
* src/qemu/qemu_driver.c (qemudDomainRestore): A corrupt save file (in particular, a too-large header.xml_len value) would cause an unwarranted out-of-memory error. Do not trust the just-read header.xml_len. Instead, merely use that as a hint, and read/allocate up to that number of bytes from the file. Also verify that header.xml_len is positive; if it were negative, passing it to virFileReadLimFD could cause trouble.
-
由 Jim Meyering 提交于
The code erroneously searched the entire "reply" for a comma, when its intent was to search only that portion after "balloon: actual=" * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetMemoryStats): Search for "," only starting *after* the BALLOON_PREFIX string. Otherwise, we'd be more prone to false positives.
-
- 05 3月, 2010 3 次提交
-
-
由 Daniel P. Berrange 提交于
Changeset commit 5073aa99 Author: Cole Robinson <crobinso@redhat.com> Date: Mon Jan 11 11:40:46 2010 -0500 Added support for product/vendor based passthrough, but it only worked at the security driver layer. The main guest XML config was not updated with the resolved bus/device ID. When the QEMU argv refactoring removed use of product/vendor, this then broke launching guests. THe solution is to move the product/vendor resolution up a layer into the QEMU driver. So the first thing QEMU does is resolve the product/vendor to a bus/device and updates the XML config with this info. The rest of the code, including security drivers and QEMU argv generated can now rely on bus/device always being set. * src/util/hostusb.c, src/util/hostusb.h: Split vendor/product resolution code out of usbGetDevice and into usbFindDevice. Add accessors for bus/device ID * src/security/virt-aa-helper.c, src/security/security_selinux.c, src/qemu/qemu_security_dac.c: Remove vendor/product from the usbGetDevice() calls * src/qemu/qemu_driver.c: Use usbFindDevice to resolve vendor/product into a bus/device ID
-
由 Daniel P. Berrange 提交于
The pci_del command is not being ported to QMP. Convert all the QEMU hotplug code over to use device_del whenever it is available to avoid the pci_del problem * src/qemu/qemu_driver.c: Convert unplug code to device_del
-
由 Daniel P. Berrange 提交于
Previously hot-unplug could not be supported for USB devices in QEMU, since usb_del required the guest visible address which libvirt never knows. With 'device_del' command we can now unplug based on device alias, so support that. * src/qemu/qemu_driver.c: Use device_del to remove USB devices
-
- 04 3月, 2010 6 次提交
-
-
由 Daniel P. Berrange 提交于
QEMU has a monitor command 'set_cpu' which allows a specific CPU to be toggled between online& offline state. libvirt CPU hotplug does not work in terms of individual indexes CPUs. Thus to support this, we iteratively toggle the online state when the total number of vCPUs is adjusted via libvirt NB, currently untested since QEMU segvs when running this! * src/qemu/qemu_driver.c: Toggle online state for CPUs when doing hotplug * 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 monitor API for toggling a CPU's online status via 'set_cpu
-
由 Daniel P. Berrange 提交于
The QMP code was running query-migration instead of query-migrate. This doesn't work so well * src/qemu/qemu_monitor_json.c: s/query-migration/query-migrate/
-
由 Daniel P. Berrange 提交于
The code to remove the cgroup after QEMU failed to startup could be obscuring a real error from earlier on. It is not neccessary to raise an error in this case, so tell cgroups to keep quiet * src/qemu/qemu_driver.c: Don't raise cgroups error in QEMU start cleanup code.
-
由 Daniel P. Berrange 提交于
The QEMU hotunplug code for PCI devices was looking at host devices in the guest config without first filtering non PCI devices. This means it was reading garbage * src/qemu/qemu_driver.c: Filter out non-PCI devices
-
由 Chris Lalancette 提交于
Commit 3c12a67b added a dependency on the NFS_SUPER_MAGIC macro, which is defined in linux/magic.h. Unfortunately linux/magic.h is not available in RHEL-5, and causes a compile error. Just define it locally, since this is something that can't change. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
由 Laine Stump 提交于
Move *all* file operations related to creation and writing of libvirt header to the domain save file into a hook function that is called by virFileOperation. First try to call virFileOperation as root. If that fails with EACCESS, and (in the case of Linux) statfs says that we're trying to save the file on an NFS share, rerun virFileOperation, telling it to fork a child process and setuid to the qemu user. This is the only way we can successfully create a file on a root-squashed NFS server. This patch (along with setting dynamic_ownership=0 in qemu.conf) makes qemudDomainSave work on root-squashed NFS. * src/qemu/qemu_driver.c: provide new qemudDomainSaveFileOpHook() utility, use it in qemudDomainSave() if normal creation of the file as root failed, and after checking the filesystem type for the storage is NFS. In that case we also bypass the security driver, as this would fail on NFS.
-
- 03 3月, 2010 8 次提交
-
-
由 Laine Stump 提交于
If qemudDomainRestore fails to open the domain save file, create a pipe, then fork a process that does setuid(qemu_user) and opens the file, then reads this file and stuffs it into the pipe. the parent libvirtd process will use the other end of the pipe as its fd, then reap the child process after it's done reading. This makes domain restore work on a root-squash NFS share that is only visible to the qemu user. * src/qemu/qemu_driver.c: add new qemudOpenAsUID() helper function, and use it in qemudDomainRestore() if reading as root directly failed.
-
由 Daniel P. Berrange 提交于
The USB/PCI device hotplug code for the QEMU driver was forgetting to allocate a unique device alias. * src/qemu/qemu_driver.c: Fill in device alias for USB/PCI devices
-
由 Daniel P. Berrange 提交于
The code assumed that 'device_add' returned an empty string upon success. This is not true, it sometimes prints random debug info. THus we need to check for an explicit fail string * src/qemu/qemu_monitor_text.c: Fix error checking of the device_add monitor command
-
由 Daniel P. Berrange 提交于
When a VM save attempt failed, the VM would be left in a paused state. It is neccessary to resume CPU execution upon failure if it was running originally * src/qemu/qemu_driver.c: Resume CPUs upon save failure
-
由 Daniel P. Berrange 提交于
This supports cancellation of jobs for the QEMU driver against the virDomainMigrate, virDomainSave and virDomainCoreDump APIs. It is not yet supported for the virDomainRestore API, although it is desirable. * src/qemu/qemu_driver.c: Issue 'migrate_cancel' command if virDomainAbortJob is issued during a migration operation * tools/virsh.c: Add a domjobabort command
-
由 Daniel P. Berrange 提交于
This provides the internal glue for the driver API * src/driver.h: Internal API contract * src/libvirt.c, src/libvirt_public.syms: Connect public API to driver API * 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/remote/remote_driver.c, src/test/test_driver.c src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Stub out entry points
-
由 Daniel P. Berrange 提交于
Introduce support for virDomainGetJobInfo in the QEMU driver. This allows for monitoring of any API that uses the 'info migrate' monitor command. ie virDomainMigrate, virDomainSave and virDomainCoreDump Unfortunately QEMU does not provide a way to monitor incoming migration so we can't wire up virDomainRestore yet. The virsh tool gets a new command 'domjobinfo' to query status * src/qemu/qemu_driver.c: Record virDomainJobInfo and start time in qemuDomainObjPrivatePtr objects. Add generic shared handler for calling 'info migrate' with all migration based APIs. * src/qemu/qemu_monitor_text.c: Fix parsing of 'info migration' reply * tools/virsh.c: add new 'domjobinfo' command to query progress
-
由 Daniel P. Berrange 提交于
The internal glue layer for the new pubic API * src/driver.h: Define internal driver API contract * src/libvirt.c, src/libvirt_public.syms: Wire up public API to internal driver API * 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/remote/remote_driver.c, src/test/test_driver.c, src/uml/uml_driver.c, src/vbox/vbox_tmpl.c, src/xen/xen_driver.c: Stub new entry point
-
- 02 3月, 2010 9 次提交
-
-
由 Rolf Eike Beer 提交于
A number of the error messages raised when parsing USB devices refered to PCI devices by mistake * src/qemu/qemu_conf.c: s/PCI/USB/ in qemuParseCommandLineUSB()
-
由 Rolf Eike Beer 提交于
The USB hotplug method was mistakenly generating a PCI address string * src/qemu/qemu_driver.c: Fix USB hotplug device string
-
由 Wolfgang Mauerer 提交于
when the underlying qemu supports the drive/device model and the controller has been added this way. * src/qemu/qemu_driver.c: use qemuMonitorDelDevice() when detaching PCI controller and if supported * src/qemu/qemu_monitor.[ch]: add new qemuMonitorDelDevice() function * src/qemu/qemu_monitor_json.[ch]: JSON backend for DelDevice command * src/qemu/qemu_monitor_text.[ch]: Text backend for DelDevice command
-
由 Wolfgang Mauerer 提交于
* src/qemu/qemu_driver.c: in qemudDomainDetachPciControllerDevice() when a controller is not present in the system anymore, the PCI address must be deleted from libvirt's hashtable because it can be re-used for other purposes.
-
由 Wolfgang Mauerer 提交于
* src/qemu/qemu_driver.c: in qemudDomainAttachDevice(), one must not delete the data part when the operation succeeds because it is required later on. The correct pattern to handlethe parsed representation of the device information on success is dev->data.controller = NULL; virDomainDeviceDefFree(dev);, which leaves the structure pointed at by data in memory.
-
由 Wolfgang Mauerer 提交于
-
由 Daniel P. Berrange 提交于
Allow an arbitrary timezone with QEMU by setting the $TZ environment variable when launching QEMU * src/qemu/qemu_conf.c: Set TZ environment variable if a timezone is requested * tests/qemuxml2argvtest.c: Add test case for timezones * tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml, tests/qemuxml2argvdata/qemuxml2argv-clock-france.args: Data for timezone tests
-
由 Daniel P. Berrange 提交于
This allows QEMU guests to be started with an arbitrary clock offset The test case can't actually be enabled, since QEMU argv expects an absolute timestring, and this will obviously change every time the test runs :-( Hopefully QEMU will allow a relative time offset in the future. * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Use the -rtc arg if available to support variable clock offset mode * tests/qemuhelptest.c: Add QEMUD_CMD_FLAG_RTC for qemu 0.12.1 * qemuxml2argvdata/qemuxml2argv-clock-variable.args, qemuxml2argvdata/qemuxml2argv-clock-variable.xml, qemuxml2argvtest.c: Test case, except we can't actually enable it yet.
-
由 Daniel P. Berrange 提交于
The XML will soon be extended to allow more than just a simple localtime/utc boolean flag. This change replaces the plain 'int localtime' with a separate struct to prepare for future extension * src/conf/domain_conf.c, src/conf/domain_conf.h: Add a new virDomainClockDef structure * src/libvirt_private.syms: Export virDomainClockOffsetTypeToString and virDomainClockOffsetTypeFromString * src/qemu/qemu_conf.c, src/vbox/vbox_tmpl.c, src/xen/xend_internal.c, src/xen/xm_internal.c: Updated to use new structure for localtime
-
- 01 3月, 2010 2 次提交
-
-
由 Jim Meyering 提交于
* src/qemu/qemu_conf.c (qemudNetworkIfaceConnect): Remove extraneous virSaveLastError call, whose result was unused.
-
由 Eric Blake 提交于
* src/qemu/qemu_monitor_text.c: qemuMonitorTextGetMigrationStatus: Check for failed strchr, to silence a coverity warning.
-
- 26 2月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
-