- 17 5月, 2011 3 次提交
-
-
由 Hu Tao 提交于
This new function allows aditional flags to be passed into from the virsh command line.
-
由 Matthias Bolte 提交于
virStreamNew needs to dispatch the error that virGetStream reports on failure. remoteCreateClientStream can fail due to virStreamNew or due to VIR_ALLOC. Report OOM error for VIR_ALLOC failure to report errors in all error cases. Remove OOM error reporting from remoteCreateClientStream callers.
-
由 Jiri Denemark 提交于
virsh didn't call virInitialize(), which (among other things) initializes virLastErr thread local variable. As a result of that, virsh could just segfault in virEventRegisterDefaultImpl() since that is the first call that touches (resets) virLastErr. I have no idea what lucky coincidence made this bug visible but I was able to reproduce it in 100% cases but only in one specific environment which included building in sandbox.
-
- 16 5月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
The v2 migration protocol was accidentally missing out the finish step, when prepare succeeded, but returned an invalid URI * src/libvirt.c: Teardown VM if prepare returns invalid URI
-
由 Daniel P. Berrange 提交于
Migration just seems to go from bad to worse. We already had to introduce a second migration protocol when adding the QEMU driver, since the one from Xen was insufficiently flexible to cope with passing the data the QEMU driver required. It turns out that this protocol still has some flaws that we need to address. The current sequence is * Src: DumpXML - Generate XML to pass to dst * Dst: Prepare - Get ready to accept incoming VM - Generate optional cookie to pass to src * Src: Perform - Start migration and wait for send completion - Kill off VM if successful, resume if failed * Dst: Finish - Wait for recv completion and check status - Kill off VM if unsuccessful The problems with this are: - Since the first step is a generic 'DumpXML' call, we can't add in other migration specific data. eg, we can't include any VM lease data from lock manager plugins - Since the first step is a generic 'DumpXML' call, we can't emit any 'migration begin' event on the source, or have any hook that runs right at the start of the process - Since there is no final step on the source, if the Finish method fails to receive all migration data & has to kill the VM, then there's no way to resume the original VM on the source This patch attempts to introduce a version 3 that uses the improved 5 step sequence * Src: Begin - Generate XML to pass to dst - Generate optional cookie to pass to dst * Dst: Prepare - Get ready to accept incoming VM - Generate optional cookie to pass to src * Src: Perform - Start migration and wait for send completion - Generate optional cookie to pass to dst * Dst: Finish - Wait for recv completion and check status - Kill off VM if failed, resume if success - Generate optional cookie to pass to src * Src: Confirm - Kill off VM if success, resume if failed The API is designed to allow both input and output cookies in all methods where applicable. This lets us pass around arbitrary extra driver specific data between src & dst during migration. Combined with the extra 'Begin' method this lets us pass lease information from source to dst at the start of migration Moving the killing of the source VM out of Perform and into Confirm, means we can now recover if the dst host can't successfully Finish receiving migration data.
-
由 Daniel P. Berrange 提交于
Fix some driver names: s/virDrvCPUCompare/virDrvCompareCPU/ s/virDrvCPUBaseline/virDrvBaselineCPU/ s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/ s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/ s/virDrvSecretListSecrets/virDrvListSecrets/ And some driver struct field names: s/getFreeMemory/nodeGetFreeMemory/
-
由 Jiri Denemark 提交于
-
- 13 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
* src/libvirt.c: new function virDomainScreenshot
-
- 12 5月, 2011 4 次提交
-
-
由 Eric Blake 提交于
The public API and RPC over-the-wire format have no flags argument, so neither should the internal callback API. This simplifies the RPC generator. * src/driver.h (virDrvNWFilterDefineXML): Drop argument that does not match public API. * src/nwfilter/nwfilter_driver.c (nwfilterDefine): Likewise. * src/libvirt.c (virNWFilterDefineXML): Likewise. * daemon/remote_generator.pl: Drop special case.
-
由 Eric Blake 提交于
* src/libvirt.c (VIR_DOMAIN_DEBUG_1): Convert to single statement. Suggested by Jiri Denemark.
-
由 Eric Blake 提交于
This one's tricker than the VIR_DEBUG0() removal, but the end result is still C99 compliant, and reasonable with enough comments. * src/libvirt.c (VIR_ARG10, VIR_HAS_COMMA) (VIR_DOMAIN_DEBUG_EXPAND, VIR_DOMAIN_DEBUG_PASTE): New macros. (VIR_DOMAIN_DEBUG): Rewrite to handle one argument, moving multi-argument guts to... (VIR_DOMAIN_DEBUG_1): New macro. (VIR_DOMAIN_DEBUG0): Rename to VIR_DOMAIN_DEBUG_0.
-
由 Lai Jiangshan 提交于
These VIR_XXXX0 APIs make us confused, use the non-0-suffix APIs instead. How do these coversions works? The magic is using the gcc extension of ##. When __VA_ARGS__ is empty, "##" will swallow the "," in "fmt," to avoid compile error. example: origin after CPP high_level_api("%d", a_int) low_level_api("%d", a_int) high_level_api("a string") low_level_api("a string") About 400 conversions. 8 special conversions: VIR_XXXX0("") -> VIR_XXXX("msg") (avoid empty format) 2 conversions VIR_XXXX0(string_literal_with_%) -> VIR_XXXX(%->%%) 0 conversions VIR_XXXX0(non_string_literal) -> VIR_XXXX("%s", non_string_literal) (for security) 6 conversions Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 11 5月, 2011 2 次提交
-
-
由 Matthias Bolte 提交于
This matches the public API and helps to get rid of some special case code in the remote generator. Rename driver API functions and XDR protocol structs. No functional change included outside of the remote generator.
-
由 Lai Jiangshan 提交于
-
- 10 5月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
assert() is forbidden in libvirt code, and these two cases would in fact never execute due to earlier error checks. * src/libvirt.c: Remove assert() usage
-
- 26 4月, 2011 1 次提交
-
-
由 Mark Wu 提交于
They don't make any sense when used together.
-
- 21 4月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Remove the artificial minimum of 4096 KB for guest memory. It's drivers' job to set the limit if needed.
-
- 17 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
And from all related macros and functions.
-
- 09 4月, 2011 3 次提交
-
-
由 Taku Izumi 提交于
This patch implements the code to support virDomainSetMaxMemory API, and to support VIR_DOMAIN_MEM_MAXIMUM flag in qemudDomainSetMemoryFlags function. As a result, we can change the maximum memory size of inactive QEMU guests. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Taku Izumi 提交于
This patch introduces VIR_DOMAIN_MEM_MAXIMUM flag. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
由 Jean-Baptiste Rouault 提交于
Move "returns" keyword from beginning of API doc lines when it does not describe return values. Maybe the API doc extractor could be changed to look for "returns: " to avoid such confusion.
-
- 08 4月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch introduces VIR_DOMAIN_MEM_CURRENT flag and modifies virDomainSetMemoryFlags function to support it. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 05 4月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Removes multiple 4kb stack allocations. Removes TODO comments as suggested by Daniel P. Berrange.
-
- 01 4月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 29 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
New APIs are added allowing streaming of content to/from storage volumes. * include/libvirt/libvirt.h.in: Add virStorageVolUpload and virStorageVolDownload APIs * src/driver.h, src/libvirt.c, src/libvirt_public.syms: Stub code for new APIs * src/storage/storage_driver.c, src/esx/esx_storage_driver.c: Add dummy entries in driver table for new APIs
-
- 22 3月, 2011 1 次提交
-
-
由 Daniel P. Berrange 提交于
It is possible to set a migration speed limit when starting migration. This new API allows the speed limit to be changed on the fly to adjust to changing conditions * src/driver.h, src/libvirt.c, src/libvirt_public.syms, include/libvirt/libvirt.h.in: Add virDomainMigrateSetMaxSpeed * 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/vmware/vmware_driver.c, src/xen/xen_driver.c, src/libxl/libxl_driver.c: Stub new API
-
- 19 3月, 2011 1 次提交
-
-
由 Tiziano Mueller 提交于
The current description suggests that you always have to provide a valid typeVer pointer. But if you want only the libvirt version it's also possible to set type and typeVer to NULL to skip the hypervisor part.
-
- 18 3月, 2011 1 次提交
-
-
由 Jim Fehlig 提交于
Add a new xen driver based on libxenlight [1], which is the primary toolstack starting with Xen 4.1.0. The driver is stateful and runs privileged only. Like the existing xen-unified driver, the libxenlight driver is accessed with xen:// URI. Driver selection is based on the status of xend. If xend is running, the libxenlight driver will not load and xen:// connections are handled by xen-unified. If xend is not running *and* the libxenlight driver is available, xen:// connections are deferred to the libxenlight driver. V6: - Address several code style issues noted by Daniel Veillard - Make drive work with xen:/// URI - Hold domain object reference while domain is injected in libvirt event loop. Race found and fixed by Markus Groß. V5: - Ensure events are unregistered when domain private data is destroyed. Discovered and fixed by Markus Groß. V4: - Handle restart of libvirtd, reconnecting to previously started domains - Rebased to current master - Tested against Xen 4.1 RC7-pre (c/s 22961:c5d121fd35c0) V3: - Reserve vnc port within driver when autoport=yes V2: - Update to Xen 4.1 RC6-pre (c/s 22940:5a4710640f81) - Rebased to current master - Plug memory leaks found by Stefano Stabellini and valgrind - Handle SHUTDOWN_crash domain death event [1] http://lists.xensource.com/archives/html/xen-devel/2009-11/msg00436.html
-
- 15 3月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch fix a simple bug in virDomainSetMemoryFlags function. The patch sent before lacks the consideration of the case where the driver doesn't support virDomainSetMemoryFlags API. Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 14 3月, 2011 1 次提交
-
-
由 Guido Günther 提交于
As pointed on CVE-2011-1146, some API forgot to check the read-only status of the connection for entry point which modify the state of the system or may lead to a remote execution using user data. The entry points concerned are: - virConnectDomainXMLToNative - virNodeDeviceDettach - virNodeDeviceReAttach - virNodeDeviceReset - virDomainRevertToSnapshot - virDomainSnapshotDelete * src/libvirt.c: fix the above set of entry points to error on read-only connections
-
- 11 3月, 2011 2 次提交
-
-
由 Gui Jianfeng 提交于
Implements virDomainSetBlkioParameters and virDomainGetBlkioParameters and initialization Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
由 Taku Izumi 提交于
This patch introduces a new libvirt API (virDomainSetMemoryFlags) and a flag (virDomainMemoryModFlags). Signed-off-by: NTaku Izumi <izumi.taku@jp.fujitsu.com>
-
- 21 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Done mechanically with: $ git grep -l '\bDEBUG0\? *(' | xargs -L1 sed -i 's/\bDEBUG0\? *(/VIR_&/' followed by manual deletion of qemudDebug in daemon/libvirtd.c, along with a single 'make syntax-check' fallout in the same file, and the actual deletion in src/util/logging.h. * src/util/logging.h (DEBUG, DEBUG0): Delete. * daemon/libvirtd.h (qemudDebug): Likewise. * global: Change remaining clients over to VIR_DEBUG counterpart.
-
- 16 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/libvirt.c (virDomainMemoryStats): Check domain before flags.
-
- 09 2月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/libvirt.c (virConnectGetSysinfo): New function. * docs/formatdomain.html.in: Mention it.
-
- 26 1月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
- 19 1月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
A large number of return values used 'return (0)' instead of simply 'return 0'. Remove all these redundant brackets so the style is consistent throughout the file * src/libvirt.c: Remove redundant brackets
-
由 Daniel P. Berrange 提交于
The driver table only has 10 slots, but there are potentially 11 drivers that need activating. Improve the error message when driver registration fails * src/libvirt.c: Increase driver table size & improve errors
-
由 Daniel P. Berrange 提交于
The virLibConnError() function (and related ones) do not correctly report line number info. Turn them all into macros so line numbers are reported correctly. Drop the connection object in all of them since it is no longer used. Also from the virLibConnWarning() equivalents completely. Now that the Xen driver is running 100% inside libvirtd, those codepaths for secondary drivers cannot be reached. * src/libvirt.c: Replace error functions with macros
-
由 Matthias Bolte 提交于
The public object is called NWFilter but the corresponding private object is called NWFilterPool. I don't see compelling reasons for this Pool suffix. One might argue that an NWFilter is a "pool" of rules, etc. Remove the Pool suffix from NWFilterPool. No functional change included.
-