- 25 3月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Part of a series of cleanups to use new accessor methods. * src/qemu/qemu_conf.c (qemuCheckSharedDevice) (qemuAddSharedDevice, qemuRemoveSharedDevice, qemuSetUnprivSGIO): Use accessors. * src/qemu/qemu_domain.c (qemuDomainDeviceDefPostParse) (qemuDomainObjCheckDiskTaint, qemuDomainSnapshotForEachQcow2Raw) (qemuDomainCheckRemoveOptionalDisk, qemuDomainCheckDiskPresence) (qemuDiskChainCheckBroken, qemuDomainDetermineDiskChain): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainChangeEjectableMedia) (qemuDomainCheckEjectableMedia) (qemuDomainAttachVirtioDiskDevice, qemuDomainAttachSCSIDisk) (qemuDomainAttachUSBMassstorageDevice) (qemuDomainAttachDeviceDiskLive, qemuDomainRemoveDiskDevice) (qemuDomainDetachVirtioDiskDevice, qemuDomainDetachDiskDevice): Likewise. * src/qemu/qemu_migration.c (qemuMigrationStartNBDServer) (qemuMigrationDriveMirror, qemuMigrationCancelDriveMirror) (qemuMigrationIsSafe): Likewise. * src/qemu/qemu_process.c (qemuProcessGetVolumeQcowPassphrase) (qemuProcessHandleIOError, qemuProcessHandleBlockJob) (qemuProcessInitPasswords): Likewise. * src/qemu/qemu_driver.c (qemuDomainChangeDiskMediaLive) (qemuDomainGetBlockInfo, qemuDiskPathToAlias): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 24 3月, 2014 1 次提交
-
-
由 Michal Privoznik 提交于
It's easy to shed the daemon these days. With this XML snippet: <disk type='file' device='disk'> <driver name='qemu' type='raw'/> <source file='/some/dummy/path/test.bin'> <seclabel model='dac' relabel='no'/> </source> <target dev='vdb' bus='virtio'/> <readonly/> <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/> </disk> I get the SIGSEGV when starting the domain. The thing is, when starting a domain, we check for its disk presence. For some reason, when determining the disk chain, we parse the <seclabel/> (don't ask me why). However, there's no label attribute in the XML, so we end up calling virParseOwnershipIds() over NULL string: [Switching to Thread 0x7ffff10c4700 (LWP 30956)] __strchr_sse42 () at ../sysdeps/x86_64/multiarch/strchr.S:136 136 ../sysdeps/x86_64/multiarch/strchr.S: No such file or directory. (gdb) bt #0 __strchr_sse42 () at ../sysdeps/x86_64/multiarch/strchr.S:136 #1 0x00007ffff749f800 in virParseOwnershipIds (label=0x0, uidPtr=uidPtr@entry=0x7ffff10c2df0, gidPtr=gidPtr@entry=0x7ffff10c2df4) at util/virutil.c:2115 #2 0x00007fffe929f006 in qemuDomainGetImageIds (gid=0x7ffff10c2df4, uid=0x7ffff10c2df0, disk=0x7fffe40cb000, vm=0x7fffe40a6410, cfg=0x7fffe409ae00) at qemu/qemu_domain.c:2385 #3 qemuDomainDetermineDiskChain (driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, disk=disk@entry=0x7fffe40cb000, force=force@entry=false) at qemu/qemu_domain.c:2414 #4 0x00007fffe929f128 in qemuDomainCheckDiskPresence (driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, cold_boot=cold_boot@entry=true) at qemu/qemu_domain.c:2250 #5 0x00007fffe92b6fc8 in qemuProcessStart (conn=conn@entry=0x7fffd4000b60, driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, migrateFrom=migrateFrom@entry=0x0, stdin_fd=stdin_fd@entry=-1, stdin_path=stdin_path@entry=0x0, snapshot=snapshot@entry=0x0, vmop=vmop@entry=VIR_NETDEV_VPORT_PROFILE_OP_CREATE, flags=flags@entry=1) at qemu/qemu_process.c:3813 #6 0x00007fffe93087e8 in qemuDomainObjStart (conn=0x7fffd4000b60, driver=driver@entry=0x7fffe40120e0, vm=vm@entry=0x7fffe40a6410, flags=flags@entry=0) at qemu/qemu_driver.c:6051 #7 0x00007fffe9308e32 in qemuDomainCreateWithFlags (dom=0x7fffcc000d50, flags=0) at qemu/qemu_driver.c:6105 #8 0x00007ffff753c5cc in virDomainCreate (domain=domain@entry=0x7fffcc000d50) at libvirt.c:8861 Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 21 3月, 2014 6 次提交
-
-
由 Chegu Vinod 提交于
Busy enterprise workloads hosted on large sized VM's tend to dirty memory faster than the transfer rate achieved via live guest migration. Despite some good recent improvements (& using dedicated 10Gig NICs between hosts) the live migration may NOT converge. Recently support was added in qemu (version 1.6) to allow a user to choose if they wish to force convergence of their migration via a new migration capability : "auto-converge". This feature allows for qemu to auto-detect lack of convergence and trigger a throttle-down of the VCPUs. This patch includes the libvirt support needed to trigger this feature. (Testing is in progress) Signed-off-by: NChegu Vinod <chegu_vinod@hp.com> Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
When checking compatibility of a device with a domain definition, we should know what we're going to do with the device. Because we may need to check for different things when we're attaching a new device versus detaching an existing device. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
A device needs to be checked for compatibility with the domain definition it corresponds to. Specifically, for VIR_DOMAIN_AFFECT_CONFIG case we should check against persistent def rather than active def. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=844378 When qemu dies early after connecting to its monitor but before we actually try to read something from the monitor, we would just fail domain start with useless message: "An error occurred, but the cause is unknown" This is because the real error gets reported in a monitor EOF handler executing within libvirt's event loop. The fix is to take any error set in qemuMonitor structure and propagate it into the thread-local error when qemuMonitorClose is called and no thread-local error is set. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Eric Blake 提交于
Wire up all the pieces to send arbitrary qemu events to a client using libvirt-qemu.so. If the extra bookkeeping of generating event objects even when no one is listening turns out to be noticeable, we can try to further optimize things by adding a counter for how many connections are using events, and only dump events when the counter is non-zero; but for now, I didn't think it was worth the code complexity. * src/qemu/qemu_driver.c (qemuConnectDomainQemuMonitorEventRegister) (qemuConnectDomainQemuMonitorEventDeregister): New functions. * src/qemu/qemu_monitor.h (qemuMonitorEmitEvent): New prototype. (qemuMonitorDomainEventCallback): New typedef. * src/qemu/qemu_monitor_json.c (qemuMonitorJSONIOProcessEvent): Report events. * src/qemu/qemu_monitor.c (qemuMonitorEmitEvent): New function, to pass events through. * src/qemu/qemu_process.c (qemuProcessHandleEvent): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 20 3月, 2014 1 次提交
-
-
由 Ján Tomko 提交于
Valgrind reported leaking of maxCpus and arch strings from virXPathString, as well as the leak of the machineMaxCpus array. Don't use 'str' for the strings we don't want to free, to allow freeing of 'str' in the cleanup label and free machineMaxCpus in virCapsReset too.
-
- 18 3月, 2014 8 次提交
-
-
由 Daniel P. Berrange 提交于
Any source file which calls the logging APIs now needs to have a VIR_LOG_INIT("source.name") declaration at the start of the file. This provides a static variable of the virLogSource type. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
As part of the goal to get away from doing string matching on filenames when deciding whether to emit a log message, turn the virLogSource enum into a struct which contains a log "name". There will eventually be one virLogSource instance statically declared per source file. To minimise churn in this commit though, a single global instance is used. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The dtrace probe macros rely on the logging API. We can't make the internal.h header include the virlog.h header though since that'd be a circular include. Instead simply split the dtrace probes into their own header file, since there's no compelling reason for them to be in the main internal.h header. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Michal Privoznik 提交于
We allow translation from no_bandwidth to has_bandwidth for a vnic. However, going in the opposite direction is not implemented. It's not limitation of the API rather than internal implementation. The problem is, we correctly detect that user hasn't specified any outbound (say he wants to clear out outbound). However, this gets overwritten by current vnic outbound settings. Then, virNetDevBandwidthSet doesn't change anything. We need to stop overwriting the outbound if users don't want us to. Same applies for inbound. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Martin Kletzander 提交于
If there should be some sort of separator it is better to use comment with the filename, copyright, description, license information and authors. Found by: git grep -nH '^$' | grep '\.[ch]:1:' Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
This patch is not trying to fix every switch, just the ones I worked with last time, because some of these were especially unreadable. Covers enums virDomainGraphicsType and virDomainChrType (where applicable). Also sort its cases by their value. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Commit a1cbe4b5 added a check for spaces around assignments and this patch extends it to checks for spaces around '=='. One exception is virAssertCmpInt where comma after '==' is acceptable (since it is a macro and '==' is its argument). Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Eliminate all the code re-use which checks for priv->agentError or priv->agent. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 17 3月, 2014 1 次提交
-
-
由 Pavel Hrdina 提交于
Coverity found an issue in lxc_driver and uml_driver that we don't check the return value of register functions. I've also updated all other places and unify the way we check the return value. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 15 3月, 2014 3 次提交
-
-
由 Cole Robinson 提交于
Right now we are parsing the XML as though it's live, which for example will choke on hardcoded XML like: <seclabel type='dynamic' model='selinux' relabel='yes'/> Erroring with: $ sudo virsh domxml-to-native qemu-argv f error: XML error: security label is missing All drivers are fixed, but only qemu was tested.
-
由 Cole Robinson 提交于
Just skip the vhost command line generation, since this won't work if attempting to run manually.
-
由 Cole Robinson 提交于
-S causes qemu to start in the paused state. Since XML2Native is intended to generate something that users can run directly, this will trip them up.
-
- 14 3月, 2014 4 次提交
-
-
由 Roman Bogorodskiy 提交于
We have to explicitly destroy TAP devices on FreeBSD because they're not freed after being closed, otherwise we end up with orphaned TAP devices after destroying a domain.
-
由 Laine Stump 提交于
-
由 Laine Stump 提交于
This is also never seen by a human.
-
由 Laine Stump 提交于
Many of the domain xml format functions (including all of the device format functions) had hard-coded spaces, which made for incorrect indentation when those functions were called in a different context (for example, commit 2122cf39 added <interface> XML into the document provided to a network hook script, and in this case it should have been indented by 2 spaces, but was instead indented by 6 spaces). To make it possible to insert a properly indented device anywhere into an XML document, this patch removes hardcoded spaces from the formatting functions, and calls virBufferAdjustIndent() at appropriate places instead. (a regex search of domain_conf.c was done to assure that all occurrences of hardcoded spaces were removed). virDomainDiskSourceDefFormatInternal() is also called from snapshot_conf.c, so two virBufferAdjustIndent() calls were temporarily added around that call - those functions will have hardcoded spaces removed in a separate patch. This could cause some conflicts when backporting future changes to the formatting functions to older branches, but fortunately the changes are almost all trivial, so conflict resolution will be obvious.
-
- 13 3月, 2014 15 次提交
-
-
由 Michal Privoznik 提交于
When I played with virtlockd I was stunned by lacking documentation. My frustration got bigger when I had to read the patches to get the correct value to set in qemu.conf. Moreover, from pure libvirt-pride I'm changing commented value from sanlock to lockd. We want to favor our own implementation after all. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Wang Rui 提交于
VIR_DEBUG in qemuMonitorAddNetdev should print vhostfdSize Signed-off-by: NWang Rui <moon.wangrui@huawei.com>
-
由 Osier Yang 提交于
The kernel didn't support the unprivileged SGIO for SCSI generic device finally, and since it's unknow whether the way to support unprivileged SGIO for SCSI generic device will be similar as for SCSI block device or not, even it's simliar (I.e. via sysfs, for SCSI block device, it's /sys/dev/block/8\:0/queue/unpriv_sgio, for example), the file name might be different, So it's better not guess what it should be like currently. This patch removes the related code (mainly about the "shareable" checking on the "sgio" setting, it's not supported at all, why we leave checking code there? :-), and error out if "sgio" is specified in the domain config.
-
由 Chunyan Liu 提交于
Add VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN. For legacy xen, it will use "pciback" as stub driver.
-
由 Chunyan Liu 提交于
Changes parameter from vm def to specific hostdevs info and name info, so that it could be used more widely, e.g, could be used without full vm def info.
-
由 Daniel P. Berrange 提交于
Some virHostdevXXXX methods included the string Hostdev again as a suffix. Change the latter to Device instead. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Chunyan Liu 提交于
Change any method names with Usb, Pci or Scsi to use USB, PCI and SCSI since they are abbreviations. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
Various methods in virnetdev.c and virhostdev.c were missing const-ness for several char * parameters. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Chunyan Liu 提交于
-
由 Chunyan Liu 提交于
-
由 Chunyan Liu 提交于
-
由 Chunyan Liu 提交于
-
由 Chunyan Liu 提交于
-
由 Chunyan Liu 提交于
-
由 Chunyan Liu 提交于
Extract general code from qemuDomainReAttachHostScsiDevices to virHostdevDomainReAttachHostScsiDevices.
-