- 06 5月, 2014 11 次提交
-
-
由 Michal Privoznik 提交于
When creating a new volume, it is possible to copy data into it from another already existing volume (referred to as @origvol). Obviously, the read-only access to @origvol is required, which is thread safe (probably not performance-wise though). However, with current code both @newvol and @origvol are marked as building for the time of copying data from the @origvol to @newvol. The rationale behind is to disallow some operations on both @origvol and @newvol, e.g. vol-wipe, vol-delete, vol-download. While it makes sense to not allow such operations on partly copied mirror, but it doesn't make sense to disallow vol-create or vol-download on the source (@origvol). Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Chen Hanxiao 提交于
s/virual/virtual Signed-off-by: NChen Hanxiao <chenhanxiao@cn.fujitsu.com>
-
由 Julio Faracco 提交于
In "src/conf/" there are many enumeration (enum) declarations. Similar to the recent cleanup to "src/util" directory, it's better to use a typedef for variable types, function types and other usages. Other enumeration and folders will be changed to typedef's in the future. Most of the files changed in this commit are reltaed to Network (network_conf.* and interface_conf.*) enums. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Julio Faracco 提交于
In "src/conf/" there are many enumeration (enum) declarations. Similar to the recent cleanup to "src/util" directory, it's better to use a typedef for variable types, function types and other usages. Other enumeration and folders will be changed to typedef's in the future. Most of the files changed in this commit are related to CPU (cpu_conf) enums. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Julio Faracco 提交于
In "src/util/" there are many enumeration (enum) declarations. Sometimes, it's better using a typedef for variable types, function types and other usages. Other enumeration will be changed to typedef's in the future. Signed-off-by: NJulio Faracco <jcfaracco@gmail.com> Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Li Yang 提交于
Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-
由 Jim Fehlig 提交于
Add support for the VIR_DOMAIN_REBOOT_PARAVIRT flag in libxlDomainReboot().
-
由 Jim Fehlig 提交于
Add support for VIR_DOMAIN_SHUTDOWN_PARAVIRT and VIR_DOMAIN_SHUTDOWN_ACPI_POWER_BTN flags in libxlDomainShutdownFlags().
-
由 Jim Fehlig 提交于
Add a new flag to virDomain{Reboot,Shutdown}FlagValues to allow shutting down and rebooting a domain via the Xen paravirt control interface.
-
由 Eric Blake 提交于
All callers of virStorageFileGetMetadataFromBuf were first calling virStorageFileProbeFormatFromBuf, to learn what format to pass in. But this function is already wired to do the exact same probe if the incoming format is VIR_STORAGE_FILE_AUTO, so it's simpler to just refactor the probing into the central function. * src/util/virstoragefile.h (virStorageFileGetMetadataFromBuf): Drop parameter. (virStorageFileProbeFormatFromBuf): Drop declaration. * src/util/virstoragefile.c (virStorageFileGetMetadataFromBuf): Do probe here instead of in callers. (virStorageFileProbeFormatFromBuf): Make static. * src/libvirt_private.syms (virstoragefile.h): Drop function. * src/storage/storage_backend_fs.c (virStorageBackendProbeTarget): Update caller. * src/storage/storage_backend_gluster.c (virStorageBackendGlusterRefreshVol): Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 05 5月, 2014 3 次提交
-
-
由 Roman Bogorodskiy 提交于
Add a helper function virBhyveGetDomainTotalCpuStats() to obtain process CPU time using kvm (kernel memory interface) and use it to set cpuTime field of the virDomainInfo struct in bhyveDomainGetInfo().
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Li Yang 提交于
Signed-off-by: NLi Yang <liyang.fnst@cn.fujitsu.com>
-
- 04 5月, 2014 5 次提交
-
-
由 Roman Bogorodskiy 提交于
The only accepted format for now is 'bhyve-argv' which prints out a bhyve command corresponding to the given domain definition.
-
由 Roman Bogorodskiy 提交于
* bhyve_command.c (bhyveBuildNetArgStr, virBhyveProcessBuildBhyveCmd): add dryRun mode which doesn't create any devices when enabled * bhyve_command.c (virBhyveProcessBuildBhyveCmd, virBhyveProcessBuildDestroyCmd, virBhyveProcessBuildLoadCmd): accept virDomainDefPtr instead of virDomainObjPtr.
-
由 Ján Tomko 提交于
Instead of guessing it from the interface name, look into /proc/net/vlan/<interface>. This works for devices not named <real_device>.<vlan ID>, avoiding an error flood when virt-manager keeps asking about them every second: https://bugzilla.redhat.com/show_bug.cgi?id=966329
-
由 John Ferlan 提交于
-
由 Daniel Veillard 提交于
* docs/news.html.in libvirt.spec.in: updates for release * po/*.po*: fetched new localization and regenerated
-
- 03 5月, 2014 2 次提交
-
-
由 Guido Günther 提交于
This fixes link failures like: CCLD virfirewalltest /usr/bin/ld: virfirewalltest-virfirewalltest.o: undefined reference to symbol 'dbus_message_iter_init_append'
-
由 Guido Günther 提交于
When building packages in a clean chroot the QEMU_USER and QEMU_GROUP don't exist making VirQemuDriverConfigNew fail with privileged=true. Avoid that by not requiring privileged mode upfront but setting it later so we skip the user/group existence check. This solution was suggested by Daniel P. Berrange and tested by Martin Kletzander.
-
- 02 5月, 2014 8 次提交
-
-
由 Roman Bogorodskiy 提交于
Currently firewalling is supported on Linux only, so skip the virfirewalltest on other platforms.
-
由 John Ferlan 提交于
Commit id 'ac9a0963' refactored out the 'withCapacity' for the virStorageBackendUpdateVolInfo() API. See: http://www.redhat.com/archives/libvir-list/2014-April/msg00043.html This resulted in a difference in how 'virsh vol-info --pool <poolName> <volume>' or 'virsh vol-list vol-list --pool <poolName> --details' outputs the capacity information for a directory pool with a qcow2 sparse file. For example, using the following XML mkdir /home/TestPool cat testpool.xml <pool type='dir'> <name>TestPool</name> <uuid>6bf80895-10b6-75a6-6059-89fdea2aefb7</uuid> <source> </source> <target> <path>/home/TestPool</path> <permissions> <mode>0755</mode> <owner>0</owner> <group>0</group> </permissions> </target> </pool> virsh pool-create testpool.xml virsh vol-create-as --pool TestPool temp_vol_1 \ --capacity 1048576 --allocation 1048576 --format qcow2 virsh vol-info --pool TestPool temp_vol_1 Results in listing a Capacity value. Prior to the commit, the value would be '1.0 MiB' (1048576 bytes). However, after the commit the output would be (for example) '192.50 KiB', which for my system was the size of the volume in my file system (eg 'ls -l TestPool/temp_vol_1' results in '197120' bytes or 192.50 KiB). While perhaps technically correct, it's not necessarily what the user expected (certainly virt-test didn't expect it). This patch restores the code to not update the target capacity for this path
-
由 Martin Kletzander 提交于
gnutls-3.3.0 and newer leaves 2 FDs open in order to be backwards compatible when it comes to chrooted binaries [1]. Linking commandhelper with gnutls then leaves these two FDs open and commandtest fails thanks to that. This patch does not link commandhelper with libvirt.la, but rather only the utilities making the test pass. Based on suggestion from Daniel [2]. [1] http://lists.gnutls.org/pipermail/gnutls-help/2014-April/003429.html [2] https://www.redhat.com/archives/libvir-list/2014-April/msg01119.htmlSigned-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Ján Tomko 提交于
Older gcc (4.1.2-55.el5, 4.2.1 on FreeBSD) reports bogus warnings: ../../src/conf/nwfilter_conf.c:2111: warning: 'protocol' may be used uninitialized in this function ../../src/conf/nwfilter_conf.c:2110: warning: 'dataProtocolID' may be used uninitialized in this function Initialize them to NULL to make the compiler happy.
-
由 Eric Blake 提交于
Commit f22b7899 stumbled across a difference between 32-bit and 64-bit platforms when parsing "-1" as an int. Now that we've fixed that difference, it's time to fix the testsuite. * src/util/virstoragefile.c (virStorageFileParseChainIndex): Require a positive index. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
strtoul() is required to parse negative numbers as their twos-complement positive counterpart. But sometimes we want to reject negative numbers. Add new functions to do this. The 'p' suffix is a mnemonic for 'positive' (technically it also parses 0, but 'non-negative' doesn't lend itself to a nice one-letter suffix). * src/util/virstring.h (virStrToLong_uip, virStrToLong_ulp) (virStrToLong_ullp): New prototypes. * src/util/virstring.c (virStrToLong_uip, virStrToLong_ulp) (virStrToLong_ullp): New functions. * src/libvirt_private.syms (virstring.h): Export them. * tests/virstringtest.c (testStringToLong): Test them. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
Commit f22b7899 called to light a long-standing latent bug: the behavior of virStrToLong_ui was different on 32-bit platforms than on 64-bit platforms. Curse you, C type promotion and narrowing rules, and strtoul specification. POSIX says that for a 32-bit long, strtol handles only 2^32 values [LONG_MIN to LONG_MAX] while strtoul handles 2^33 - 1 values [-ULONG_MAX to ULONG_MAX] with twos-complement wraparound for negatives. Thus, parsing -1 as unsigned long produces ULONG_MAX, rather than a range error. We WANT[1] this same shortcut for turning -1 into UINT_MAX when parsing to int; and get it for free with 32-bit long. But with 64-bit long, ULONG_MAX is outside the range of int and we were rejecting it as invalid; meanwhile, we were silently treating -18446744073709551615 as 1 even though it textually exceeds INT_MIN. Too bad there's not a strtoui() in libc that does guaranteed parsing to int, regardless of the size of long. The bug has been latent since 2007, introduced by Jim Meyering in commit 5d254191 in the attempt to eradicate unsafe use of strto[u]l when parsing ints and longs. How embarrassing that we are only discovering it now - so I'm adding a testsuite to ensure that it covers all the corner cases we care about. [1] Ideally, we really want the caller to be able to choose whether to allow negative numbers to wrap around to their 2s-complement counterpart, as in strtoul, or to force a stricter input range of [0 to UINT_MAX] by rejecting negative signs; this will be added in a later patch for all three int types. This patch is tested on both 32- and 64-bit; the enhanced virstringtest passes on both platforms, while virstoragetest now reliably fails on both platforms instead of just 32-bit platforms. That test will be fixed later. * src/util/virstring.c (virStrToLong_ui): Ensure same behavior regardless of platform long size. * tests/virstringtest.c (testStringToLong): New function. (mymain): Comprehensively test string to long parsing. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Daniel P. Berrange 提交于
A couple of places in the QEMU XML -> ARGV conversion code raised an error but then forgot to return an error status due to missing gotos. While fixing this also tweak style of a couple of other error reports Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 01 5月, 2014 4 次提交
-
-
由 Laine Stump 提交于
If a domain network interface that contains a <filterref> is modified "live" using "virsh update-device --live", libvirtd would crash. This was because the code supporting live update of an interface's filterref was assuming that a filterref might be added or modified, but didn't account for removing the filterref, resulting in a null dereference of the filter name. Introduced with commit 258fb278, which was first in libvirt v1.0.1. This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1093301
-
由 Peter Krempa 提交于
To avoid memory leak of the "backingStoreRaw" field when reparsing backing chains a new function is being introduced by this patch that shall be used to clear backing store information. The memory leak was introduced in commit 8823272d.
-
由 Stefan Berger 提交于
Refactor the ebiptablesTearNewRules function so that the teardown of temporary filters can also be called by the ebiptablesAllTeardown function. This fixes a problem that leaves temporary filters behind when a VM shuts down while its filters are modified. Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com> v1->v2: - test cases adjusted to expect more commands
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=808463 Well, libvirt doesn't distinguish between domain poweroff and hibernation (S4). It's hard to differentiate these two on a real machine anyway. As a result, any device that is hot(un-)plugged is lost (appears again) when domain is started again as from our POV it is a fresh cold boot. Instead of doing anything wise here, we should just document this as known limitation. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 30 4月, 2014 6 次提交
-
-
由 Daniel P. Berrange 提交于
The LXC controller itself needs to mknod the USB device node in /dev/bus/usb, so we can't block mknod permission from the cgroup. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Stefan Berger 提交于
An IP or IPv6 rule with port specification but without protocol specification cannot be instantiated by ebtables. The documentation points to 'protocol' being required but implementation does not enforce it to be given. Implement a rule validation function that checks whether the rule is valid when it is defined. This for example prevents the definition of rules like: <ip dstportstart='53'> where a protocol attribute would be required for it to be valid and for ebtables to be able to instantiate it. A valid rule then is: <ip protocol='udp' dstportstart='53'> Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
-
由 Sahid Orentino Ferdjaoui 提交于
This commit adds a new example to illustrate peer to peer domain migration with virDomainMigrateToURI. Signed-off-by: NSahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
-
由 Sahid Orentino Ferdjaoui 提交于
This commit provides the ability to virDomainMigrateToURI to check for SASL credentials when attempts to migrate a domain with the driver QEMU. Signed-off-by: NSahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
-
由 Pavel Hrdina 提交于
We need to include the testutils.h also for freebsd. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Pavel Hrdina 提交于
Freebsd doesn't know ENODATA so we have to use different EINVAL error code. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 29 4月, 2014 1 次提交
-
-
由 Eric Blake 提交于
Commit 5c43e2e0 introduced a NULL deref if there is a failure in virStorageFileGetMetadataInternal. * src/util/virstoragefile.c (virStorageFileGetMetadataFromBuf): Fix error handling. Signed-off-by: NEric Blake <eblake@redhat.com>
-