- 27 6月, 2016 5 次提交
-
-
由 Laine Stump 提交于
libvirt's qemu driver doesn't have direct access to the config on the guest side of a network interface, and currently doesn't have any method in place to even inform the guest of the desired config. In the future, an unenforceable attempt to set the guest-side IP info could be made by adding a static host entry to the appropriate dnsmasq configuration (or changing the default dhcp client address on the qemu commandline for type='user' interfaces), or enhancing the guest agent to allow setting an IP address, but for now it can't have any effect, and we don't want to give the illusion that it does. To prevent the "disappearance" of any existing configs with ip address/route info (due to parser failure), this check is added in the newly implemented qemuDomainDeviceDefValidate(), which is only called when a domain is defined or started, *not* when it is reread from disk at libvirtd startup.
-
由 Laine Stump 提交于
When support for <interface type='ethernet'> was added in commit 9a4b705f back in 2010, it erroneously looked at <source dev='blah'/> for a user-specified guest-side interface name. This was never documented though. (that attribute already existed at the time in the data.ethernet union member of virDomainNetDef, but apparently had no practical use - it was only used as a storage place for a NetDef's bridge name during qemuDomainXMLToNative(), but even then that was never used for anything). When support for similar guest-side device naming was added to the lxc driver several years later, it was put in a new subelement <guest dev='blah'/>. In the intervening years, since there was no validation that ethernet.dev was NULL in the other drivers that didn't actually use it, innocent souls who were adding other features assuming they needed to account for non-NULL ethernet.dev when really they didn't, so little bits of the usual pointless cargo-cult code showed up. This patch not only switches the openvz driver to use the documented <guest dev='blah'/> notation for naming the guest-side device (just in case anyone is still using the openvz driver), and logs an error if anyone tries to set <source dev='blah'/> for a type='ethernet' interface, it also removes the cargo-cult uses of ethernet.dev and <source dev='blah'/>, and eliminates if from the RNG and from virDomainNetDef. NB: I decided on this course of action after mentioning the inconsistency here: https://www.redhat.com/archives/libvir-list/2016-May/msg02038.html and getting encouragement do eliminate it in a later IRC discussion with danpb.
-
由 Laine Stump 提交于
in qemuConnectDomainXMLToNative. This function was only accounting for about 1/10 of all the allocated items in the NetDef prior to memseting it to all 0's. On top of that, it was going to great pains to learn the name of the bridge device, but then never doing anything useful with it (just putting it into data.ethernet.dev, which is *never* used when building a qemu commandline). (I think this again all started off as code with good intentions, but it was never completed, and instead was just Frankensteinically cargo-culted into the odd mish mash we have today). The resulting code is much simpler, produces exactly the same output, and doesn't leak memory.
-
由 Laine Stump 提交于
This patch removes the expanded and duplicated code that all sprung out of two well-intentioned-but-useless settings of net->data.(bridge|ethernet).ipaddr. qemu has never supported even a single IP address in the interface config, much less a list of them. All of the instances of "clearing out the IP addresses" that are now in this function originated with commit d8dbd6 "Basic domain XML conversions for Xen/QEMU drivers" in May 2009, but even then the single "ipaddr" in the struct for type='ethernet' and type='bridge' wasn't used in the qemu driver (only in xen and openvz). Since then anyone who added a new interface type also tacked on another unnecessary clearing of ipaddr, and when it was made into a list of IPs (so far supported only by the LXC driver) this simple setting was turned into a loop (well, multiple loops) to clear them all.
-
由 Laine Stump 提交于
I'm tired of mistyping this all the time, so let's do it the same all the time (similar to how we changed all "Pci" to "PCI" awhile back). (NB: I've left alone some things in the esx and vbox drivers because I'm unable to compile them and they weren't obviously *not* a part of some API. I also didn't change a couple of variables named, e.g. "somethingIptables", because they were derived from the name of the "iptables" command)
-
- 25 6月, 2016 6 次提交
-
-
由 John Ferlan 提交于
Rather than pass authdef, pass the 'authdef->username' and the '&authdef->secdef' Note that a username may be NULL. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Rather than assume/pass the protocol to the qemuDomainSecretPlainSetup and qemuDomainSecretAESSetup, set and pass the secretUsageType based on the src->protocol type. This will eventually be used by the virSecretGetSecretString call Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 Shivaprasad G Bhat 提交于
The qemu limit and host limit both should be considered for the domain vcpu max limits. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
-
由 John Ferlan 提交于
Need to create the object for a hotplug disk
-
由 John Ferlan 提交于
It's just a constant "secret" string anyway
-
由 Shivaprasad G Bhat 提交于
This kvmGetMaxVCPUs() needs to be used at two different places so move it to utils with appropriate name and mark it as private global now. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
-
- 24 6月, 2016 13 次提交
-
-
由 Ján Tomko 提交于
Do not call it with a magic constant matching the length of the pattern.
-
由 Shivaprasad G Bhat 提交于
On PPC the legacy passthrough is not supported and only VFIO is supported. So, the checks at places to confirm if the host is passthrough capable checks only legacy, fix it. This is seen at only one place now. Signed-off-by: NShivaprasad G Bhat <sbhat@linux.vnet.ibm.com>
-
由 Ján Tomko 提交于
Remove all the remaining usage of opendir.
-
由 Ján Tomko 提交于
Use it instead of opendir everywhere we need to check for ENOENT.
-
由 Andrea Bolognani 提交于
Unfortunately, we can't just call qemuDomainMachineIsPSeries() here, because we don't have a virDomainDef instance; that said, the open-coded check should match said function as closely as possible.
-
由 Andrea Bolognani 提交于
This new function checks for both the architecture and the machine type, so we can use it instead of writing the same checks over and over again.
-
由 Andrea Bolognani 提交于
Remove all external architecture checks that have been made redundant by this change.
-
由 Andrea Bolognani 提交于
Since we're already passing the full virDomainDef, it doesn't make sense to also pass def->os.arch and def->os.machine as separate arguments.
-
由 Ján Tomko 提交于
This fixes the disappearance of domains and networks starting with a dot. https://bugzilla.redhat.com/show_bug.cgi?id=1333248
-
由 Ján Tomko 提交于
The directories we iterate over are unlikely to contain any entries starting with a dot, other than '.' and '..' which is already skipped by virDirRead.
-
由 Ján Tomko 提交于
Introduce a helper that only calls closedir if DIR* is non-NULL and sets it to NULL afterwards.
-
由 John Ferlan 提交于
Add 'encinfo' to the extended disk structure. This will contain the encryption secret (if present). Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
由 John Ferlan 提交于
Move the enum into a new src/util/virsecret.h, rename it to be virSecretLookupType. Add a src/util/virsecret.h in order to perform a couple of simple operations on the secret XML and virSecretLookupTypeDef for clearing and copying. This includes quite a bit of collateral damage, but the goal is to remove the "virStorage*" and replace with the virSecretLookupType so that it's easier to to add new lookups that aren't necessarily storage pool related. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 23 6月, 2016 4 次提交
-
-
由 Cole Robinson 提交于
qemu doesn't have any accel2d support wired up. Explicitly error if a user tries it out, or typos the accel3d option
-
由 Cole Robinson 提交于
We should be raising an error if accel3d is present for any non-virtio video as well, incase someone tries it for say 'qxl'
-
由 Nikolay Shirokovskiy 提交于
One can not issue monitor commands manually during async calls thru designated API while this could be useful for testing/debugging purposes. qemuDomainQemuMonitorCommand uses job of type QEMU_JOB_MODIFY and any async call disable parallel execution of this type of job. The only state that is changed is taint variable. AFAIU the only place we can mess is resetting taint flag in qemuProcessStop routine under some async job. But this can not happen thanx to both virDomainObjIsActive check in qemuDomainQemuMonitorCommand and resetting active status in qemuProcessStop before taint flag. Change job type to QEMU_JOB_QUERY and thus make the API call available for most of async jobs. Signed-off-by: NNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
-
由 Ján Tomko 提交于
Pass 'true' if we are not dealing with a migration.
-
- 22 6月, 2016 12 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Several places in the code update qemuMonitorMigrationParams structure and qemuMigrationSetParams is then used to set them all at once. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
We should not require any parameters to be present. After all we have the *_set bools to express that some parameters were not set. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
qemuMonitorMigrationParams is a better name for a structure which contains various migration parameters. While doing that, we should use full names for individual parameters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Compression parameters are not the only migration parameters. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Checking whether the function has anything to do is better done in the function rather then requiring callers to do that. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
The function gets a reference on virQEMUDriverConfig which needs to be released before returning. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Jiri Denemark 提交于
Since virQEMUCapsNewForBinaryInternal was introduced, virQEMUCapsNewForBinary is no longer used outside qemu_capabilities.c. Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
由 Peter Krempa 提交于
Allow modification of specific vCPU states via the guest agent.
-