- 07 12月, 2012 1 次提交
-
-
由 Osier Yang 提交于
QEMU supports setting vendor and product strings for disk since 1.2.0 (only scsi-disk, scsi-hd, scsi-cd support it), this patch exposes it with new XML elements <vendor> and <product> of disk device.
-
- 05 12月, 2012 6 次提交
-
-
由 Jiri Denemark 提交于
Unmanaged PCI devices were only leaked if pciDeviceListAdd failed but managed devices were always leaked. And leaking PCI device is likely to leave PCI config file descriptor open. This patch fixes qemuReattachPciDevice to either free the PCI device or add it to the inactivePciHostdevs list.
-
由 Jiri Denemark 提交于
The device is still referenced from pcidevs and freeing it would leave an invalid pointer there.
-
由 Jiri Denemark 提交于
An attempt to attach device that is already attached to a domain results in the following error: virsh # attach-device rhel6 pci2 --persistent error: Failed to attach device from pci2 error: invalid argument: device is already in the domain configuration The "invalid argument" error code looks wrong, we usually use "operation invalid" when the action cannot be done in current state.
-
由 Osier Yang 提交于
"disk" is initialized to "dev->data.disk" in the beginning of the function.
-
由 Eric Blake 提交于
Only one error in qemu_monitor was already using the relatively new OPERATION_UNSUPPORTED error, even though it is a better fit for all of the messages related to options that are unsupported due to the version of qemu in use rather than due to a user's XML or .conf file choice. Suggested by Osier Yang. * src/qemu/qemu_monitor.c (qemuMonitorSendFileHandle) (qemuMonitorAddHostNetwork, qemuMonitorRemoveHostNetwork) (qemuMonitorAttachDrive, qemuMonitorDiskSnapshot) (qemuMonitorDriveMirror, qemuMonitorTransaction) (qemuMonitorBlockCommit, qemuMonitorDrivePivot) (qemuMonitorBlockJob, qemuMonitorSystemWakeup) (qemuMonitorGetVersion, qemuMonitorGetMachines) (qemuMonitorGetCPUDefinitions, qemuMonitorGetCommands) (qemuMonitorGetEvents, qemuMonitorGetKVMState) (qemuMonitorGetObjectTypes, qemuMonitorGetObjectProps) (qemuMonitorGetTargetArch): Use better error category.
-
由 Eric Blake 提交于
Without this patch, attempts to create a disk snapshot when qemu is too old results in a cryptic message: virsh # snapshot-create 23 --disk-only error: operation failed: Failed to take snapshot: unknown command: 'snapshot_blkdev' Now it reports: virsh # snapshot-create 23 --disk-only error: unsupported configuration: live disk snapshot not supported with this QEMU binary All versions of qemu that support live disk snapshot also support QMP (basically upstream qemu 1.1 and later, and backports to RHEL 6.2). * src/qemu/qemu_capabilities.h (QEMU_CAPS_DISK_SNAPSHOT): New capability. * src/qemu/qemu_capabilities.c (qemuCaps): Track it. (qemuCapsProbeQMPCommands): Set it. * src/qemu/qemu_driver.c (qemuDomainSnapshotCreateDiskActive): Use it. * src/qemu/qemu_monitor.c (qemuMonitorDiskSnapshot): Simplify. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONDiskSnapshot): Likewise. * src/qemu/qemu_monitor_text.h (qemuMonitorTextDiskSnapshot): Delete. * src/qemu/qemu_monitor_text.c (qemuMonitorTextDiskSnapshot): Likewise.
-
- 04 12月, 2012 3 次提交
-
-
由 Daniel P. Berrange 提交于
Currently to deal with auto-shutdown libvirtd must periodically poll all stateful drivers. Thus sucks because it requires acquiring both the driver lock and locks on every single virtual machine. Instead pass in a "inhibit" callback to virStateInitialize which drivers can invoke whenever they want to inhibit shutdown due to existance of active VMs. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
When the virStateStop() method is invoked, perform a managed save of all VMs currently running Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Laine Stump 提交于
Since we can't (currently) rely on the ability to provide blanket support for all possible network changes by calling the toplevel netdev hostside disconnect/connect functions (due to qemu only supporting a lockstep between initialization of host side and guest side of devices), in order to support live change of an interface's nwfilter we need to make a special purpose function to only call the nwfilter teardown and setup functions if the filter for an interface (or its parameters) changes. The pattern is nearly identical to that used to change the bridge that an interface is connected to. This patch was inspired by a request from Guido Winkelmann <guido@sagersystems.de>, who tested an earlier version.
-
- 01 12月, 2012 4 次提交
-
-
由 Daniel P. Berrange 提交于
The fact that only the guest agent, or ACPI flag can be used when requesting reboot/shutdown is merely a limitation of the QEMU driver impl at this time. Thus it should not be in libvirt.c code Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Viktor Mihajlovski 提交于
The default machine type must be stored in the first element of the caps->machineTypes array. This was done for help output parsing but not for QMP probing. Added a helper function qemuSetDefaultMachine to apply the same fix up for both probing methods. Further, it was necessary to set caps->nmachineTypes after QMP probing. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Guido Günther 提交于
detecet by http://honk.sigxcpu.org:8001/job/libvirt-build/348/console
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=872292 Libvirt should not attempt to call a QMP command that has not been documented in qemu.git - if future qemu introduces a command by the same name but with subtly different semantics, then libvirt will be broken when trying to use that command. We also had some code that could never be reached - some of our commands have an alternate for new vs. old qemu HMP commands; but if we are new enough to support QMP, we only need a fallback to the new HMP counterpart, and don't need to try for a QMP counterpart for the old HMP version. See also this attempt to convert the three snapshot commands to QMP: https://lists.gnu.org/archive/html/qemu-devel/2012-07/msg01597.html although it looks like that will still not happen before qemu 1.3. That thread eventually decided that qemu would use the name 'save-vm' rather than 'savevm', which mitigates the fact that libvirt's attempt to use a QMP 'savevm' would be broken, but we might not be as lucky on the other commands. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONSetCPU) (qemuMonitorJSONAddDrive, qemuMonitorJSONDriveDel) (qemuMonitorJSONCreateSnapshot, qemuMonitorJSONLoadSnapshot) (qemuMonitorJSONDeleteSnapshot): Use only HMP fallback for now. (qemuMonitorJSONAddHostNetwork, qemuMonitorJSONRemoveHostNetwork) (qemuMonitorJSONAttachDrive, qemuMonitorJSONGetGuestDriveAddress): Delete; QMP implies QEMU_CAPS_DEVICE, which prefers AddNetdev, RemoveNetdev, and AddDrive anyways (qemu_hotplug.c has all callers). * src/qemu/qemu_monitor.c (qemuMonitorAddHostNetwork) (qemuMonitorRemoveHostNetwork, qemuMonitorAttachDrive): Reflect deleted commands. * src/qemu/qemu_monitor_json.h (qemuMonitorJSONAddHostNetwork) (qemuMonitorJSONRemoveHostNetwork, qemuMonitorJSONAttachDrive): Likewise.
-
- 30 11月, 2012 4 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=876828 Commit 38c4a9cc introduced a regression in hot unplugging of disks from qemu, where cgroup device ACLs were no longer being revoked (thankfully not a security hole: cgroup ACLs only prevent open() of the disk; so reverting the ACL prevents future abuse but doesn't stop abuse from an fd that was already opened before the ACL change). Commit 1b2ebf95 overlooked that there were two spots affected. * src/qemu/qemu_hotplug.c (qemuDomainDetachDiskDevice): Transfer backing chain before deletion. * src/qemu/qemu_driver.c (qemuDomainDetachDeviceDiskLive): Fix spacing (partly to ensure a different-looking patch).
-
由 Peter Krempa 提交于
This patch adds two labels and gets rid of a ton of duplicated code. This patch also fixes some error message and switches most of them to proper error reporting functions.
-
由 Peter Krempa 提交于
This patch adds macros to help retrieve configuration values from qemu driver's configuration. Some configuration options are grouped together in the process.
-
由 Daniel P. Berrange 提交于
The virStateInitialize method and several cgroups methods were using an 'int privileged' parameter or similar for dual-state values. These are better represented with the bool type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 29 11月, 2012 6 次提交
-
-
由 Jiri Denemark 提交于
-
由 Guido Günther 提交于
As of 1a50ba2c we fail to connect to the monitor instead of getting an exit status != 0 from qemu itself. This breaks capabilities probing for the non QMP case.
-
由 Daniel P. Berrange 提交于
Replace the following names * struct qemu_snap_remove with virQEMUSnapRemovePtr * struct qemu_snap_reparent with virQEMUSnapReparentPtr * struct qemu_save_header with virQEMUSaveHeaderPtr * enum qemu_save_formats with virQEMUSaveFormat Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Remove the obsolete 'qemud' naming prefix and underscore based type name. Introduce virQEMUDriverPtr as the replacement, in common with LXC driver naming style
-
由 Michal Privoznik 提交于
Throughout the code, we've always used VIR_DOMAIN_SHUTDOWN* flags even for virDomainReboot() API and its implementation. Fortunately, the appropriate macros has the same value. But if we want to keep things consistent, we should be using the correct macros. This patch doesn't break anything, luckily.
-
- 28 11月, 2012 8 次提交
-
-
由 Peter Krempa 提交于
Error messages produced while dispatching guest agent commands didn't have an apparent reference to the fact that they are dealing with guest agent commands. This patch fixes up some of the messages to contain that reference.
-
由 Peter Krempa 提交于
-
由 Michal Privoznik 提交于
using qemu guest agent. As said in previous patch, @mountPoint must be NULL and @flags zero because qemu guest agent doesn't support these arguments yet. If qemu learns them, we can start supporting them as well.
-
由 Viktor Mihajlovski 提交于
With QMP capability probing, the version was not set. virsh version returns: ... Cannot extract running QEMU hypervisor version This is fixed by computing caps->version from QMP major, minor, micro values. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Viktor Mihajlovski 提交于
QMP Capability probing will fail if QEMU cannot bind to the QMP monitor socket in the qemu_driver->libDir directory. That's because the child process is stripped of all capabilities and this directory is chown'ed to the configured QEMU user/group (normally qemu:qemu) by the QEMU driver. To prevent this from happening, the driver startup will now pass the QEMU uid and gid down to the capability probing code. All capability probing invocations of QEMU will be run with the configured QEMU uid instead of libvirtd's. Furter, the pid file handling is moved to libvirt, as QEMU cannot write to the qemu_driver->runDir (root:root). This also means that the libvirt daemonizing must be used. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Viktor Mihajlovski 提交于
If qemuMonitorOpenUnix is called without a related pid, i.e. for QMP probing, a connect failure can happen as the result of a race. Without a pid there is no retry and thus we give up too early. This changes the code to retry if no pid is supplied. Signed-off-by: NViktor Mihajlovski <mihajlov@linux.vnet.ibm.com>
-
由 Ján Tomko 提交于
In qemuDomainSaveMemory, wrapperFd might be NULL and should be checked before calling virFileWrapperFdCatchError. Same in doCoreDump. Bug: https://bugzilla.redhat.com/show_bug.cgi?id=880919
-
由 Daniel P. Berrange 提交于
Change some legacy function names to use 'qemu' as their prefix instead of 'qemud' which was a hang over from when the QEMU driver ran inside a separate daemon Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 27 11月, 2012 4 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=876828 Commit 38c4a9cc introduced a regression in hot unplugging of disks from qemu, where cgroup device ACLs were no longer being revoked (thankfully not a security hole: cgroup ACLs only prevent open() of the disk; so reverting the ACL prevents future abuse but doesn't stop abuse from an fd that was already opened before the ACL change). The actual regression is due to a latent bug. The hot unplug code was computing the set of files needing cgroup ACL revocation based on the XML passed in by the user, rather than based on the domain's details on which disk was being deleted. As long as the revoke path was always recomputing the backing chain, this didn't really matter; but now that we want to compute the chain exactly once and remember that computation, we need to hang on to the backing chain until after the revoke has happened. * src/qemu/qemu_hotplug.c (qemuDomainDetachPciDiskDevice): Transfer backing chain before deletion.
-
由 Harsh Prateek Bora 提交于
Qemu accepts gluster protocol as supported storage backend beside others. Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
-
由 Harsh Prateek Bora 提交于
This patch introduces the RNG schema and updates necessary data strucutures to allow various hypervisors to make use of Gluster protocol as one of the supported network disk backend. Next patch will add support to make use of this feature in Qemu since it now supports Gluster protocol as one of the network based storage backend. Two new optional attributes for <host> element are introduced - 'transport' and 'socket'. Valid transport values are tcp, unix or rdma. If none specified, tcp is assumed. If transport is unix, socket specifies path to unix socket. This patch allows users to specify disks on gluster backends like this: <disk type='network' device='disk'> <driver name='qemu' type='raw'/> <source protocol='gluster' name='Volume1/image'> <host name='example.org' port='6000' transport='tcp'/> </source> <target dev='vda' bus='virtio'/> </disk> <disk type='network' device='disk'> <driver name='qemu' type='raw'/> <source protocol='gluster' name='Volume2/image'> <host transport='unix' socket='/path/to/sock'/> </source> <target dev='vdb' bus='virtio'/> </disk> Signed-off-by: NHarsh Prateek Bora <harsh@linux.vnet.ibm.com>
-
由 Eric Blake 提交于
Although we require various C99 features, we don't yet require a complete C99 compiler. On RHEL 5, compilation complained: qemu/qemu_command.c: In function 'qemuBuildGraphicsCommandLine': qemu/qemu_command.c:4688: error: 'for' loop initial declaration used outside C99 mode * src/qemu/qemu_command.c (qemuBuildGraphicsCommandLine): Declare variable sooner. * src/qemu/qemu_process.c (qemuProcessInitPasswords): Likewise.
-
- 22 11月, 2012 2 次提交
-
-
由 Martin Kletzander 提交于
The error "... but the cause is unknown" appeared for XMLs similar to this: <disk type='file' device='cdrom'> <driver name='qemu' type='raw'/> <source file='/dev/zero'/> <target dev='sr0'/> </disk> Notice unsupported disk type (for the driver), but also no address specified. The first part is not a problem and we should not abort immediately because of that, but the combination with the address unknown was causing an unspecified error. While fixing this, I added an error to one place where this return value was not managed properly.
-
由 Scott Sullivan 提交于
I have been testing libvirt v1.0.0 for deployment within my organization, and in the process discovered what appears to be a bug that breaks virsh attach-device, when attaching an RBD volume to an instance. First, here is the error presented, with v1.0.0 (this worked in v0.10.2): [root@host ~]# virsh attach-device W5APQ8 G84VV1.xml error: Failed to attach device from G84VV1.xml error: cannot open file 'dc3-1-test/G84VV1': No such file or directory Using git bisect, I narrowed the problem down to this as the first commit to break this setup: 4d34c929 is the first bad commit
-
- 21 11月, 2012 2 次提交