[libvirt] [PATCH] Workaround for broken GCC in Debian Etch
by Maximilian Wilhelm
Hi again!
I missed one patch for working around a GCC bug in Debian Etch
regarding limit definitions.
Sorry for the unstripped git-format-patch outputs, I just realised
this after pressing send :(
(This seems to be not my day :))
Ciao
Max
--
Gib Dein Bestes. Dann übertriff Dich selbst!
15 years, 11 months
Re: [libvirt] VMware support and Server 2.0.1
by Matthias Bolte
2009/7/30 Timo Makinen <tmakinen(a)ee.oulu.fi>:
> On Thu, Jul 30, 2009 at 03:22:59AM +0200, Matthias Bolte wrote:
>> 2009/7/29 Timo Makinen <tmakinen(a)ee.oulu.fi>:
>> > On Wed, Jul 29, 2009 at 06:12:59PM +0200, Matthias Bolte wrote:
>> >> 2009/7/27 Timo Makinen <tmakinen(a)ee.oulu.fi>:
>> >> Could you do some basic testing beside listing and dumpxml, as I have
>> >> currently no VMware GSX installation at hand? Just test if the
>> >> following commands work as expected in virsh:
>> >>
>> >> - start
>> >> - shutdown
>> >> - reboot
>> >> - suspend
>> >> - resume
>> >> - nodeinfo
>> >> - dominfo
>> >>
>> >> Regards,
>> >> Matthias
>> >
>> > All these worked out of the box.
>>
>> Nice!
>>
>> Could you test the attached patch? It adds handling for the port in
>> the URI, extends the version checking for GSX 2.0 and fixes the bug in
>> VMX parsing.
>>
>> Matthias
>
> Works like a charm now. :)
>
> - Timo
>
Fine!
The attached second GSX patch adds a gsx:// scheme to the ESX driver,
so you can connect to a GSX host using
virsh -c gsx://host
and the driver will select the port automatically dependent on the
scheme and transport. Here gsx scheme and default transport https
result in port 8333.
Matthias
15 years, 11 months
[libvirt] [PATCH] spelling fix
by Aron Griffis
---
src/qemu_conf.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 4fe4e39..6b0b404 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -1970,7 +1970,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
if (def->nvideos) {
if (def->nvideos > 1) {
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
- "%s", _("only one video card is currentely supported"));
+ "%s", _("only one video card is currently supported"));
goto error;
}
15 years, 11 months
[libvirt] [PATCH] Remove ATTRIBUTE_UNUSED from flags to qemudDomainMigratePerform.
by Chris Lalancette
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/qemu_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index eadb53f..9fcc07a 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -6424,7 +6424,7 @@ qemudDomainMigratePerform (virDomainPtr dom,
const char *cookie ATTRIBUTE_UNUSED,
int cookielen ATTRIBUTE_UNUSED,
const char *uri,
- unsigned long flags ATTRIBUTE_UNUSED,
+ unsigned long flags,
const char *dname ATTRIBUTE_UNUSED,
unsigned long resource)
{
--
1.6.0.6
15 years, 11 months
[libvirt] [PATCH] Add a comment about setting errors after qemudStartVMDaemon().
by Chris Lalancette
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/qemu_driver.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index fcfbfbc..eadb53f 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -6390,6 +6390,9 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
*/
snprintf (migrateFrom, sizeof (migrateFrom), "tcp:0.0.0.0:%d", this_port);
if (qemudStartVMDaemon (dconn, driver, vm, migrateFrom, -1) < 0) {
+ /* Note that we don't set an error here because qemudStartVMDaemon
+ * should have already done that.
+ */
if (!vm->persistent) {
virDomainRemoveInactive(&driver->domains, vm);
vm = NULL;
--
1.6.0.6
15 years, 11 months
[libvirt] [PATCH] Fix an erroneous debug error to KVM; it should read QEMU/KVM.
by Chris Lalancette
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/qemu_driver.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index 5f4b28b..fcfbfbc 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -6321,7 +6321,7 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
*/
if (!STRPREFIX (uri_in, "tcp:")) {
qemudReportError (dconn, NULL, NULL, VIR_ERR_INVALID_ARG,
- "%s", _("only tcp URIs are supported for KVM migrations"));
+ "%s", _("only tcp URIs are supported for KVM/QEMU migrations"));
goto cleanup;
}
--
1.6.0.6
15 years, 11 months
[libvirt] [PATCH] Convert a few stray users of free() in libvirt.c to VIR_FREE().
by Chris Lalancette
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/libvirt.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/libvirt.c b/src/libvirt.c
index 167359f..9fd864d 100644
--- a/src/libvirt.c
+++ b/src/libvirt.c
@@ -3020,7 +3020,7 @@ virDomainMigrate (virDomainPtr domain,
ret = dconn->driver->domainMigratePrepare2
(dconn, &cookie, &cookielen, uri, &uri_out, flags, dname,
bandwidth, dom_xml);
- free (dom_xml);
+ VIR_FREE (dom_xml);
if (ret == -1) goto done;
if (uri == NULL && uri_out == NULL) {
virLibConnError (conn, VIR_ERR_INTERNAL_ERROR,
@@ -3062,8 +3062,8 @@ virDomainMigrate (virDomainPtr domain,
}
done:
- free (uri_out);
- free (cookie);
+ VIR_FREE (uri_out);
+ VIR_FREE (cookie);
return ddomain;
error:
--
1.6.0.6
15 years, 11 months
[libvirt] [PATCH] Use virGetHostname instead of gethostname.
by Chris Lalancette
Fix up qemudDomainMigratePrepare2 to use virGetHostname instead of
gethostname. Besides the fact that virGetHostname is far more clever,
there was a latent bug in the handling that could cause a buffer overflow
on a very long hostname.
Signed-off-by: Chris Lalancette <clalance(a)redhat.com>
---
src/qemu_driver.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/qemu_driver.c b/src/qemu_driver.c
index cee2164..83cbcf3 100644
--- a/src/qemu_driver.c
+++ b/src/qemu_driver.c
@@ -6270,11 +6270,12 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
virDomainDefPtr def = NULL;
virDomainObjPtr vm = NULL;
int this_port;
- char hostname [HOST_NAME_MAX+1];
+ char *hostname;
char migrateFrom [64];
const char *p;
virDomainEventPtr event = NULL;
int ret = -1;;
+ int internalret;
*uri_out = NULL;
@@ -6300,14 +6301,16 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
if (port == QEMUD_MIGRATION_NUM_PORTS) port = 0;
/* Get hostname */
- if (gethostname (hostname, HOST_NAME_MAX+1) == -1) {
+ if ((hostname = virGetHostname()) == NULL) {
virReportSystemError (dconn, errno,
"%s", _("failed to determine host name"));
goto cleanup;
}
/* Caller frees */
- if (virAsprintf(uri_out, "tcp:%s:%d", hostname, this_port) < 0) {
+ internalret = virAsprintf(uri_out, "tcp:%s:%d", hostname, this_port);
+ VIR_FREE(hostname);
+ if (internalret < 0) {
virReportOOMError (dconn);
goto cleanup;
}
--
1.6.0.6
15 years, 11 months