- 24 6月, 2011 3 次提交
-
-
由 Eric Blake 提交于
When adding virDomainGetVcpusFlags in commit ea3f5c68, I did enough rebasing that the doc comments in libvirt.c no longer matched the final chosen enum names in libvirt.h. And now we've gone ahead and deprecated the names VIR_DOMAIN_VCPU_{LIVE,CONFIG}. * src/libvirt.c (virDomainGetVcpusFlags): Fix comment.
-
由 Eric Blake 提交于
This reverts commit 6419f596.
-
由 Daniel P. Berrange 提交于
If an application is using libvirt + KVM as a piece of its internal infrastructure to perform a specific task, it can be desirable to guarentee the VM dies when the virConnectPtr disconnects from libvirtd. This ensures the app can't leak any VMs it was using. Adding VIR_DOMAIN_START_AUTOKILL as a flag when starting guests enables this to be done. * include/libvirt/libvirt.h.in: All VIR_DOMAIN_START_AUTOKILL * src/qemu/qemu_driver.c: Support automatic killing of guests upon connection close * tools/virsh.c: Add --autokill flag to 'start' and 'create' commands
-
- 23 6月, 2011 2 次提交
-
-
由 Matthias Bolte 提交于
apibuild.py expects a sentence that starts with "Returns" describing the return value of a function.
-
由 Eric Blake 提交于
* src/libvirt.c (virConnectClose): Mention reference count return. Reported by Michal Novotny, analyzed by Matthias Bolte.
-
- 17 6月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
The API can be used to query current state of an interface to VMM used to control a domain. In QEMU world this translates into monitor connection.
-
- 16 6月, 2011 2 次提交
-
-
由 Matthias Bolte 提交于
virStreamRecv is for reading. Also add some missing punctuation to virStreamSend's documentation.
-
由 Eric Blake 提交于
Even though rpc uses 'unsigned int' for the _len parameter that passes the length of item<length>, the public libvirt APIs all use 'int' and filter out lengths < 0, except for virDomainSendKey. * include/libvirt/libvirt.h.in (virDomainSendKey): All other APIs use int for array length. * src/libvirt.c (virDomainSendKey): Adjust. * src/driver.h (virDrvDomainSendKey): Likewise. * daemon/remote_generator.pl: Likewise.
-
- 15 6月, 2011 4 次提交
-
-
由 Adam Litke 提交于
* src/libvirt.c: implement the main entry points Signed-off-by: NAdam Litke <agl@us.ibm.com> Acked-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Minoru Usui 提交于
Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
由 Minoru Usui 提交于
Signed-off-by: NMinoru Usui <usui@mxm.nes.nec.co.jp>
-
由 Lai Jiangshan 提交于
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
-
- 14 6月, 2011 2 次提交
-
-
由 Osier Yang 提交于
Qemu once supported following memory stats which will returned by "query_balloon": stat_put(dict, "actual", actual); stat_put(dict, "mem_swapped_in", dev->stats[VIRTIO_BALLOON_S_SWAP_IN]); stat_put(dict, "mem_swapped_out", dev->stats[VIRTIO_BALLOON_S_SWAP_OUT]); stat_put(dict, "major_page_faults", dev->stats[VIRTIO_BALLOON_S_MAJFLT]); stat_put(dict, "minor_page_faults", dev->stats[VIRTIO_BALLOON_S_MINFLT]); stat_put(dict, "free_mem", dev->stats[VIRTIO_BALLOON_S_MEMFREE]); stat_put(dict, "total_mem", dev->stats[VIRTIO_BALLOON_S_MEMTOT]); But it later disabled all the stats except "actual" by commit 07b0403dfc2b2ac179ae5b48105096cc2d03375a. libvirt doesn't parse "actual", so user will always see a empty result with "virsh dommemstat $domain". Even qemu haven't disabled the stats, we should support parsing "actual".
-
由 Hu Tao 提交于
This patch deprecates following enums: VIR_DOMAIN_MEM_CURRENT VIR_DOMAIN_MEM_LIVE VIR_DOMAIN_MEM_CONFIG VIR_DOMAIN_VCPU_LIVE VIR_DOMAIN_VCPU_CONFIG VIR_DOMAIN_DEVICE_MODIFY_CURRENT VIR_DOMAIN_DEVICE_MODIFY_LIVE VIR_DOMAIN_DEVICE_MODIFY_CONFIG And modify internal codes to use virDomainModificationImpact.
-
- 13 6月, 2011 1 次提交
-
-
由 Taku Izumi 提交于
This patch introduces a new libvirt API virDomainPinVcpuFlags, a direct extension from the existing virDomainPinVcpu
-
- 08 6月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Detected by Coverity. Commit a98d8f0d tried to make uuid debugging more robust, but missed some APIs. And on the APIs that it visited, the mere act of preparing the debug message ends up dereferencing uuid prior to the null check. Which means the APIs which are supposed to gracefully reject NULL arguments now end up with SIGSEGV. * src/libvirt.c (VIR_UUID_DEBUG): New macro. (virDomainLookupByUUID, virDomainLookupByUUIDString) (virNetworkLookupByUUID, virNetworkLookupByUUIDString) (virStoragePoolLookupByUUID, virStoragePoolLookupByUUIDString) (virSecretLookupByUUID, virSecretLookupByUUIDString) (virNWFilterLookupByUUID, virNWFilterLookupByUUIDString): Avoid null dereference.
-
- 07 6月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
virGetVersion itself doesn't take a virConnectPtr, but in order to obtain the hypervisor version against which libvirt was compiled it is used in combination with virConnectGetType like this: hvType = virConnectGetType(conn) virGetVersion(&libVer, hvType, &typeVer) When virConnectGetType is called on a remote connection then the remote driver returns the type of the underlying driver on the server side, for example QEMU. Then virGetVersion compares hvType to a set of strings that depend on configure options and returns LIBVIR_VERSION_NUMBER in most cases. Now this fails in case libvirt on the client side is just compiled with the remote driver enabled only and the server side has the actual driver such as the QEMU driver. It just happens to work when the actual driver is enabled on client and server side. But that's not always true. I noticed this on FreeBSD: freebsd# virsh -c qemu+tcp://192.168.178.22/system version Compiled against library: libvir 0.9.2 error: failed to get the library version error: this function is not supported by the connection driver: virGetVersion This is not FreeBSD specific, happens on Windows as well due to the similar driver support configuration. The problem is that virConnectGetType returns QEMU, but virGetVersion on the client side only accepts Remote as hvType due to all other drivers being disabled on the client side. Daniel P. Berrange suggested to get rid of all the conditional code in virGetVersion, ignoring the hvType and always setting typeVer to LIBVIR_VERSION_NUMBER. virConnectGetVersion is supposed to be used to obtain the hypervisor version.
-
- 04 6月, 2011 1 次提交
-
-
由 Eric Blake 提交于
This commit is safe precisely because there has been no release for any of the enum values being deleted (they were added post-0.9.1). After the 0.9.2 release, we can then take advantage of virDomainModificationImpact in more places. * include/libvirt/libvirt.h.in (virDomainModificationImpact): New enum. (virDomainSchedParameterFlags, virMemoryParamFlags): Delete, since these were never released, and the new enum works fine here. * src/libvirt.c (virDomainGetMemoryParameters) (virDomainSetMemoryParameters) (virDomainGetSchedulerParametersFlags) (virDomainSetSchedulerParametersFlags): Update documentation. * src/qemu/qemu_driver.c (qemuDomainSetMemoryParameters) (qemuDomainGetMemoryParameters, qemuSetSchedulerParametersFlags) (qemuSetSchedulerParameters, qemuGetSchedulerParametersFlags) (qemuGetSchedulerParameters): Adjust clients. * tools/virsh.c (cmdSchedinfo, cmdMemtune): Likewise. Based on ideas by Daniel Veillard and Hu Tao.
-
- 02 6月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
* tools/virsh.c: Add screenshot command * tools/virsh.pod: Document new command * src/libvirt.c: Fix off-be-one error
-
- 29 5月, 2011 2 次提交
-
-
由 Eric Blake 提交于
If we can choose live or config when setting, then we need to be able to choose which one we are querying. Also, make the documentation clear that set must use a non-empty subset (some of the hypervisors fail if params is NULL). * include/libvirt/libvirt.h.in (virDomainGetSchedulerParametersFlags): New prototype. * src/libvirt.c (virDomainGetSchedulerParametersFlags): Implement it. * src/libvirt_public.syms: Export it. * python/generator.py (skip_impl): Don't auto-generate. * src/driver.h (virDrvDomainGetSchedulerParametersFlags): New callback.
-
由 Eric Blake 提交于
Rather mechanical in nature. * src/driver.h: Use newer virTypedParameter API names. * src/libvirt.c: Likewise. * daemon/remote.c: Likewise. * src/esx/esx_driver.c: Likewise. * src/libxl/libxl_driver.c: Likewise. * src/lxc/lxc_driver.c: Likewise. * src/qemu/qemu_driver.c: Likewise. * src/remote/remote_driver.c: Likewise. * src/test/test_driver.c: Likewise. * src/xen/xen_driver.c: Likewise. * src/xen/xen_hypervisor.c: Likewise. * src/xen/xen_hypervisor.h: Likewise. * src/xen/xend_internal.c: Likewise. * tools/virsh.c: Likewise.
-
- 28 5月, 2011 1 次提交
-
-
由 Michal Privoznik 提交于
-
- 27 5月, 2011 1 次提交
-
-
由 Hu Tao 提交于
drivers implementing domainSetSchedulerParametersFlags should check flags themselves.
-
- 25 5月, 2011 6 次提交
-
-
由 Daniel P. Berrange 提交于
The current virDomainMigrateFinish3 method signature attempts to distinguish two types of errors, by allowing return with ret== 0, but ddomain == NULL, to indicate a failure to start the guest. This is flawed, because when ret == 0, there is no way for the virErrorPtr details to be sent back to the client. Change the signature of virDomainMigrateFinish3 so it simply returns a virDomainPtr, in the same way as virDomainMigrateFinish2 The disk locking code will protect against the only possible failure mode this doesn't account for (loosing conenctivity to libvirtd after Finish3 starts the CPUs, but before the client sees the reply for Finish3). * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Change virDomainMigrateFinish3 to return a virDomainPtr instead of int * src/remote/remote_driver.c, src/remote/remote_protocol.x, daemon/remote.c, src/qemu/qemu_driver.c, src/qemu/qemu_migration.c: Update for API change
-
由 Daniel P. Berrange 提交于
When doing migration, if an error occurs in Perform, it must not be overwritten during Finish/Confirm steps. If an error occurs in Finish, it must not be overwritten in Confirm. Previous commit a9d12c24 added code to qemudDomainMigrateFinish2 to preserve the error. This is not the right place, because it is not applicable in non-p2p migration. The src/libvirt.c virDomainMigrateV2/3 methods need code to preserve errors for non-p2p migration, while the doPeer2PeerMigrate2 and doPeer2PeerMigrate3 methods contain code to preverse errors for p2p migration. Remove the bogus error preservation from qemudDomainMigrateFinish2 and qemudDomainMigrateFinish3. Fix virDomainMigrateV3 and doPeer2PeerMigrate3 so that they preserve any error hit during the Finish3 step, before invoking Confirm3. Finally if qemuMigrationFinish fails to resume the CPUs, it must preserve the error before tearing down the VM, so that VM cleanup doesn't overwrite it. * src/libvirt.c: Preserve error before invoking Confirm3 * src/qemu/qemu_driver.c: Remove bogus error preservation code in qemudDomainMigrateFinish2/qemudDomainMigrateFinish3 * src/qemu/qemu_migration.c: Preserve error before invoking Confirm3 and after resume fails in qemuMigrationFinish.
-
由 Daniel P. Berrange 提交于
* src/libvirt.c: Add further debug lines in helper APIs for migration * src/qemu/qemu_migration.c: Add debug lines for all internal migration API parameters
-
由 Daniel P. Berrange 提交于
There are two pieces of information which are desirable for migration, which cannot be supplied by applications - The explicit QEMU migration URI, while using Peer2Peer migration - An override for the target VM XML This introduces two new public APIs to support these extra parameters. There is no need for extra wire protocool changes, since this is supported by the v3 migration enhancements * include/libvirt/libvirt.h.in, src/libvirt.c, src/libvirt_public.syms: Add virDomainMigrate2 and virDomainMigrateToURI2
-
由 Daniel P. Berrange 提交于
The virDomainMigratePerform3 currently has a single URI parameter whose meaning varies. It is either - A QEMU migration URI (normal migration) - A libvirtd connection URI (peer2peer migration) Unfortunately when using peer2peer migration, without also using tunnelled migration, it is possible that both URIs are required. This adds a second URI parameter to the virDomainMigratePerform3 method, to cope with this scenario. Each parameter how has a fixed meaning. NB, there is no way to actually take advantage of this yet, since virDomainMigrate/virDomainMigrateToURI do not have any way to provide the 2 separate URIs * daemon/remote.c, src/remote/remote_driver.c, src/remote/remote_protocol.x, src/remote_protocol-structs: Add the second URI parameter to perform3 message * src/driver.h, src/libvirt.c, src/libvirt_internal.h: Add the second URI parameter to Perform3 method * src/libvirt_internal.h, src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Update to handle URIs correctly
-
由 Daniel P. Berrange 提交于
This extends the v3 migration protocol such that the virDomainMigrateBegin3 and virDomainMigratePerform3 methods accept an application supplied XML config for the target VM. If the 'xmlin' parameter is NULL, then Begin3 uses the current guest XML as normal. A driver implementing the Begin3 method should either reject all non-NULL 'xmlin' parameters, or strictly validate that the app supplied XML does not change guest ABI. The Perform3 method also needed the xmlin parameter to cope with the Peer2Peer migration sequence. NB it is not yet possible to use this capability since neither of the public virDomainMigrate/virDomainMigrateToURI methods have a way to pass in XML. * daemon/remote.c, src/remote/remote_driver.c, src/remote/remote_protocol.x, src/remote_protocol-structs: Add 'remote_string xmlin' parameter to begin3/perform3 RPC messages * src/libvirt.c, src/driver.h, src/libvirt_internal.h: Add 'const char *xmlin' parameter to Begin3/Perform3 methods * src/qemu/qemu_driver.c, src/qemu/qemu_migration.c, src/qemu/qemu_migration.h: Pass xmlin parameter around migration methods
-
- 19 5月, 2011 7 次提交
-
-
由 Daniel P. Berrange 提交于
The internal virDomainMigratePeer2Peer and virDomainMigrateDirect helper methods were not checking whether the target supports the v3 migration protocol. * src/libvirt.c: Use v3 migration protocol for p2p/direct migration if available.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Improve invalid argument checks in the size query case. The drivers already relied on this unchecked behavior. Relax the implementation of virDomainGet(Memory|Blkio)MemoryParameters in the drivers and allow to pass more memory than necessary for all parameters.
-
由 Matthias Bolte 提交于
-
由 Matthias Bolte 提交于
Add invalid argument checks for params and nparams to the public API and remove them from the drivers (e.g. xend). Add subset handling to libxl and test drivers.
-
由 Matthias Bolte 提交于
params and nparams are essential and cannot be NULL. Check this in libvirt.c and remove redundant checks from the drivers (e.g. xend). Instead of enforcing that nparams must point to exact same value as returned by virDomainGetSchedulerType relax this to a lower bound check. This is what some drivers (e.g. xen hypervisor and esx) already did. Other drivers (e.g. xend) didn't check nparams at all and assumed that there is enough space in params. Unify the behavior in all drivers to a lower bound check and update nparams to the number of valid values in params on success.
-
由 Matthias Bolte 提交于
Some drivers assumed it can be NULL (e.g. qemu and lxc) and check it before assigning to it, other drivers assumed it must be non-NULL (e.g. test and esx) and just assigned to it. Unify this to nparams being optional and document it.
-
- 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 1 次提交
-
-
由 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
-