[libvirt] question about qemudDomainMigratePrepare2 of qemu_driver.c from libvirt-0.6.1
by Gerrit.Slomma@drv-bund.de
Hello
I am just curious if the checking of the connection string in qemu_driver.c
from libvirt-0.6.1 in qemudDomainMigratePrepare2 is faulty.
The source is:
[...]
} else {
/* Check the URI starts with "tcp:". We will escape the
* URI when passing it to the qemu monitor, so bad
* characters in hostname part don't matter.
*/
if (!STREQLEN (uri_in, "tcp:", 6)) {
qemudReportError (dconn, NULL, NULL, VIR_ERR_INVALID_ARG,
"%s", _("only tcp URIs are supported for KVM
migrations"));
goto cleanup;
}
[...]
The second compare-string "tcp:" is only 4 characters long, therefore a
check via strncmp must fail i presumed, i isolated this comparison:
#include <stdio.h>
#include <string.h>
#define STREQLEN(a,b,n) (strncmp((a),(b),(n)) == 0)
int main ()
{
char str[][200] = { "tcp://192.168.1.14:4444" , "tcp:192.168.1.14:4444" ,
"ssh
://192.168.1.14:4444" , "ssh:192.168.1.14:4444" };
int n;
for (n=0 ; n<4 ; n++)
{
printf("testing %s against \"tcp:\" with result: ", str[n]);
if (!STREQLEN(str[n],"tcp:",6))
{
printf ("ERROR\n");
}
else
{
printf ("OK\n");
}
}
return 0;
}
and as i pressumed this gives me on the commandline:
testing tcp://192.168.1.14:4444 against "tcp:" with result: ERROR
testing tcp:192.168.1.14:4444 against "tcp:" with result: ERROR
testing ssh://192.168.1.14:4444 against "tcp:" with result: ERROR
testing ssh:192.168.1.14:4444 against "tcp:" with result: ERROR
if i change the 6 to 4 it gives
testing tcp://192.168.1.14:4444 against "tcp:" with result: OK
testing tcp:192.168.1.14:4444 against "tcp:" with result: OK
testing ssh://192.168.1.14:4444 against "tcp:" with result: ERROR
testing ssh:192.168.1.14:4444 against "tcp:" with result: ERROR
but now tcp:// also is marked as correct.
Am i missing something here and the checking in qemu_driver.c is correct?
I always get the "only tcp URIs are supported for KVM migrations" if i try
to migrate KVM-domains in virt-manager 0.7.0 and therefore searched for the
root-cause of this problem.
Kind regards, Gerrit Slomma
Mit freundlichen Grüßen, Gerrit Slomma
Team eBetrieb
Deutsche Rentenversicherung Bund
Abt. 11 - Organisation und IT-Services
Fachbereich 1170 - IT-Services und Betrieb
Bereich 1174 - Anwendungsbetrieb
Team 1174-46 - Trustcenter, eBetrieb
15 years, 7 months
[libvirt] PATCH: Fix XM driver to extract vifname= parameter
by Daniel P. Berrange
The XM driver is not currently handling the vifname= parameter for
network devices in /etc/xen config files. This patch fixes that
ommision
Daniel
diff -r e396919fa59e src/xm_internal.c
--- a/src/xm_internal.c Tue Mar 31 16:35:42 2009 +0100
+++ b/src/xm_internal.c Tue Mar 31 16:58:11 2009 +0100
@@ -991,6 +991,7 @@ xenXMDomainConfigParse(virConnectPtr con
char ip[16];
char mac[18];
char bridge[50];
+ char vifname[50];
char *key;
bridge[0] = '\0';
@@ -998,6 +999,7 @@ xenXMDomainConfigParse(virConnectPtr con
script[0] = '\0';
ip[0] = '\0';
model[0] = '\0';
+ vifname[0] = '\0';
if ((list->type != VIR_CONF_STRING) || (list->str == NULL))
goto skipnic;
@@ -1036,6 +1038,12 @@ xenXMDomainConfigParse(virConnectPtr con
len = sizeof(model)-1;
strncpy(model, data, len);
model[len] = '\0';
+ } else if (STRPREFIX(key, "vifname=")) {
+ int len = nextkey ? (nextkey - data) : sizeof(vifname)-1;
+ if (len > (sizeof(vifname)-1))
+ len = sizeof(vifname)-1;
+ strncpy(vifname, data, len);
+ vifname[len] = '\0';
} else if (STRPREFIX(key, "ip=")) {
int len = nextkey ? (nextkey - data) : 15;
if (len > 15)
@@ -1105,6 +1113,10 @@ xenXMDomainConfigParse(virConnectPtr con
!(net->model = strdup(model)))
goto no_memory;
+ if (vifname[0] &&
+ !(net->ifname = strdup(vifname)))
+ goto no_memory;
+
if (VIR_REALLOC_N(def->nets, def->nnets+1) < 0)
goto no_memory;
def->nets[def->nnets++] = net;
@@ -1994,6 +2006,10 @@ static int xenXMDomainConfigFormatNet(vi
virBufferVSprintf(&buf, ",model=%s",
net->model);
+ if (net->ifname)
+ virBufferVSprintf(&buf, ",vifname=%s",
+ net->ifname);
+
if (VIR_ALLOC(val) < 0) {
virReportOOMError(conn);
goto cleanup;
diff -r e396919fa59e tests/xmconfigdata/test-paravirt-net-vifname.cfg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/xmconfigdata/test-paravirt-net-vifname.cfg Tue Mar 31 16:58:11 2009 +0100
@@ -0,0 +1,12 @@
+name = "XenGuest1"
+uuid = "c7a5fdb0-cdaf-9455-926a-d65c16db1809"
+maxmem = 579
+memory = 394
+vcpus = 1
+bootloader = "/usr/bin/pygrub"
+on_poweroff = "destroy"
+on_reboot = "restart"
+on_crash = "restart"
+vfb = [ "type=vnc,vncunused=1,vnclisten=127.0.0.1,vncpasswd=123poi" ]
+disk = [ "phy:/dev/HostVG/XenGuest1,xvda,w" ]
+vif = [ "mac=00:16:3e:66:94:9c,bridge=br0,model=e1000,vifname=net0" ]
diff -r e396919fa59e tests/xmconfigdata/test-paravirt-net-vifname.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/xmconfigdata/test-paravirt-net-vifname.xml Tue Mar 31 16:58:11 2009 +0100
@@ -0,0 +1,33 @@
+<domain type='xen'>
+ <name>XenGuest1</name>
+ <uuid>c7a5fdb0-cdaf-9455-926a-d65c16db1809</uuid>
+ <memory>592896</memory>
+ <currentMemory>403456</currentMemory>
+ <vcpu>1</vcpu>
+ <bootloader>/usr/bin/pygrub</bootloader>
+ <os>
+ <type arch='i686' machine='xenpv'>linux</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <disk type='block' device='disk'>
+ <driver name='phy'/>
+ <source dev='/dev/HostVG/XenGuest1'/>
+ <target dev='xvda' bus='xen'/>
+ </disk>
+ <interface type='bridge'>
+ <mac address='00:16:3e:66:94:9c'/>
+ <source bridge='br0'/>
+ <target dev='net0'/>
+ <model type='e1000'/>
+ </interface>
+ <console type='pty'>
+ <target port='0'/>
+ </console>
+ <input type='mouse' bus='xen'/>
+ <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'/>
+ </devices>
+</domain>
diff -r e396919fa59e tests/xmconfigtest.c
--- a/tests/xmconfigtest.c Tue Mar 31 16:35:42 2009 +0100
+++ b/tests/xmconfigtest.c Tue Mar 31 16:58:11 2009 +0100
@@ -209,6 +209,7 @@ mymain(int argc, char **argv)
DO_TEST("paravirt-new-pvfb", 3);
DO_TEST("paravirt-new-pvfb-vncdisplay", 3);
DO_TEST("paravirt-net-e1000", 3);
+ DO_TEST("paravirt-net-vifname", 3);
DO_TEST("fullvirt-old-cdrom", 1);
DO_TEST("fullvirt-new-cdrom", 2);
DO_TEST("fullvirt-utc", 2);
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
15 years, 7 months
[libvirt] PATCH: Fix error reporting for guest with missing network
by Daniel P. Berrange
If you attempt to create a Xen guest using a virutal network that does not
exist, or is not running you get a cryptic message
# virsh create rhel5pv.xml
error: Failed to create domain from rhel5pv.xml
error: XML description for failed to build sexpr is not well formed or invalid
This is because the XenD/XM drivers are both overwriting errors that have
already been reported. The fix is simply to remove this bogus error call.
It also tweaks the original error reporting to be more meaningful.
The result is this
# virsh create rhel5pv.xml
error: Failed to create domain from rhel5pv.xml
error: Network not found: default
Daniel
diff -r 28e19af5b719 src/xend_internal.c
--- a/src/xend_internal.c Tue Mar 31 15:13:21 2009 +0100
+++ b/src/xend_internal.c Tue Mar 31 16:35:41 2009 +0100
@@ -3983,8 +3983,6 @@ xenDaemonCreateXML(virConnectPtr conn, c
return (NULL);
if (!(sexpr = xenDaemonFormatSxpr(conn, def, priv->xendConfigVersion))) {
- virXendError(conn, VIR_ERR_XML_ERROR,
- "%s", _("failed to build sexpr"));
virDomainDefFree(def);
return (NULL);
}
@@ -5362,7 +5360,7 @@ xenDaemonFormatSxprNet(virConnectPtr con
char *bridge;
if (!network) {
- virXendError(conn, VIR_ERR_NO_SOURCE, "%s",
+ virXendError(conn, VIR_ERR_NO_NETWORK, "%s",
def->data.network.name);
return -1;
}
@@ -5370,7 +5368,8 @@ xenDaemonFormatSxprNet(virConnectPtr con
bridge = virNetworkGetBridgeName(network);
virNetworkFree(network);
if (!bridge) {
- virXendError(conn, VIR_ERR_NO_SOURCE, "%s",
+ virXendError(conn, VIR_ERR_INTERNAL_ERROR,
+ _("network %s is not active"),
def->data.network.name);
return -1;
}
diff -r 28e19af5b719 src/xm_internal.c
--- a/src/xm_internal.c Tue Mar 31 15:13:21 2009 +0100
+++ b/src/xm_internal.c Tue Mar 31 16:35:41 2009 +0100
@@ -1818,11 +1818,8 @@ int xenXMDomainCreate(virDomainPtr domai
if (!(entry = virHashLookup(priv->configCache, filename)))
goto error;
- if (!(sexpr = xenDaemonFormatSxpr(domain->conn, entry->def, priv->xendConfigVersion))) {
- xenXMError(domain->conn, VIR_ERR_XML_ERROR,
- "%s", _("failed to build sexpr"));
+ if (!(sexpr = xenDaemonFormatSxpr(domain->conn, entry->def, priv->xendConfigVersion)))
goto error;
- }
ret = xenDaemonDomainCreateXML(domain->conn, sexpr);
VIR_FREE(sexpr);
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
15 years, 7 months
[libvirt] PATCH: Fix error report for unknown node devices
by Daniel P. Berrange
When requesting a non-existant device you currently get
# virsh nodedev-dumpxml foo
error: Could not find matching device 'foo'
error: invalid node device pointer in no node device with matching name
This patch fixes that to give
# virsh nodedev-dumpxml foo
error: Could not find matching device 'foo'
error: Node device not found
Daniel
diff -r 563f92056ffa src/node_device.c
--- a/src/node_device.c Tue Mar 31 15:02:30 2009 +0100
+++ b/src/node_device.c Tue Mar 31 15:13:20 2009 +0100
@@ -121,8 +121,7 @@ static virNodeDevicePtr nodeDeviceLookup
nodeDeviceUnlock(driver);
if (!obj) {
- virNodeDeviceReportError(conn, VIR_ERR_INVALID_NODE_DEVICE,
- "%s", _("no node device with matching name"));
+ virNodeDeviceReportError(conn, VIR_ERR_NO_NODE_DEVICE, NULL);
goto cleanup;
}
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
15 years, 7 months
[libvirt] PATCH: Update XenD for new location of (localtime 1) SEXPR
by Daniel P. Berrange
Newer versions of XenD have the (localtime 1) bit of the SEXPR
moved outside the (image ...) bit, and made available for both PV
and HVM guests. This patch updates our code to cope with this. For
compatability we also still put the (localtime 1) bit inside the
HVM (image ...) section too - its harmless on new XenD, and stops
us breaking old deployments. Finally, this also updates the XM
driver to accept localtime=1 for PV guests.
Daniel
diff -r 00b8aaa2555b src/xend_internal.c
--- a/src/xend_internal.c Tue Mar 31 12:02:49 2009 +0100
+++ b/src/xend_internal.c Tue Mar 31 12:26:01 2009 +0100
@@ -2423,10 +2423,15 @@ xenDaemonParseSxpr(virConnectPtr conn,
if (sexpr_int(root, "domain/image/hvm/pae"))
def->features |= (1 << VIR_DOMAIN_FEATURE_PAE);
+ /* Old XenD only allows localtime here for HVM */
if (sexpr_int(root, "domain/image/hvm/localtime"))
def->localtime = 1;
}
+ /* Current XenD allows localtime here, for PV and HVM */
+ if (sexpr_int(root, "domain/localtime"))
+ def->localtime = 1;
+
if (sexpr_node_copy(root, hvm ?
"domain/image/hvm/device_model" :
"domain/image/linux/device_model",
@@ -5603,6 +5608,10 @@ xenDaemonFormatSxpr(virConnectPtr conn,
}
virBufferVSprintf(&buf, "(on_crash '%s')", tmp);
+ /* Set localtime here for current XenD (both PV & HVM) */
+ if (def->localtime)
+ virBufferAddLit(&buf, "(localtime 1)");
+
if (!def->os.bootloader) {
if (STREQ(def->os.type, "hvm"))
hvm = 1;
@@ -5718,6 +5727,7 @@ xenDaemonFormatSxpr(virConnectPtr conn,
virBufferAddLit(&buf, "(serial none)");
}
+ /* Set localtime here to keep old XenD happy for HVM */
if (def->localtime)
virBufferAddLit(&buf, "(localtime 1)");
diff -r 00b8aaa2555b src/xm_internal.c
--- a/src/xm_internal.c Tue Mar 31 12:02:49 2009 +0100
+++ b/src/xm_internal.c Tue Mar 31 12:26:01 2009 +0100
@@ -819,10 +819,10 @@ xenXMDomainConfigParse(virConnectPtr con
goto cleanup;
else if (val)
def->features |= (1 << VIR_DOMAIN_FEATURE_APIC);
+ }
+ if (xenXMConfigGetBool(conn, conf, "localtime", &def->localtime, 0) < 0)
+ goto cleanup;
- if (xenXMConfigGetBool(conn, conf, "localtime", &def->localtime, 0) < 0)
- goto cleanup;
- }
if (xenXMConfigCopyStringOpt(conn, conf, "device_model", &def->emulator) < 0)
goto cleanup;
diff -r 00b8aaa2555b tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr Tue Mar 31 12:26:01 2009 +0100
@@ -0,0 +1,2 @@
+(domain (domid 6)(name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d2171f48fb2e068e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(localtime 1)(image (linux (kernel '/var/lib/xen/vmlinuz.2Dn2YT')(ramdisk '/var/lib/xen/initrd.img.0u-Vhq')(args ' method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test... ')))(device (vbd (dev 'xvda')(uname 'file:/root/some.img')(mode 'w'))))
+
diff -r 00b8aaa2555b tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml Tue Mar 31 12:26:01 2009 +0100
@@ -0,0 +1,27 @@
+<domain type='xen' id='6'>
+ <name>pvtest</name>
+ <uuid>596a5d21-71f4-8fb2-e068-e2386a5c413e</uuid>
+ <memory>430080</memory>
+ <currentMemory>430080</currentMemory>
+ <vcpu>2</vcpu>
+ <os>
+ <type>linux</type>
+ <kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
+ <initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
+ <cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test... </cmdline>
+ </os>
+ <clock offset='localtime'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>destroy</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <driver name='file'/>
+ <source file='/root/some.img'/>
+ <target dev='xvda' bus='xen'/>
+ </disk>
+ <console type='pty'>
+ <target port='0'/>
+ </console>
+ </devices>
+</domain>
diff -r 00b8aaa2555b tests/sexpr2xmltest.c
--- a/tests/sexpr2xmltest.c Tue Mar 31 12:02:49 2009 +0100
+++ b/tests/sexpr2xmltest.c Tue Mar 31 12:26:01 2009 +0100
@@ -145,6 +145,7 @@ mymain(int argc, char **argv)
DO_TEST("bridge-ipaddr", "bridge-ipaddr", 3);
DO_TEST("no-source-cdrom", "no-source-cdrom", 2);
DO_TEST("pci-devs", "pci-devs", 2);
+ DO_TEST("pv-localtime", "pv-localtime", 2);
DO_TEST("fv-utc", "fv-utc", 1);
DO_TEST("fv-localtime", "fv-localtime", 1);
diff -r 00b8aaa2555b tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
--- a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr Tue Mar 31 12:02:49 2009 +0100
+++ b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr Tue Mar 31 12:26:01 2009 +0100
@@ -1,1 +1,1 @@
-(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(localtime 1)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
+(vm (name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd2-75cd-aca5-1776-9660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(vcpus 1)(boot c)(cdrom '/root/boot.iso')(acpi 1)(usb 1)(parallel none)(serial none)(localtime 1)(device_model '/usr/lib64/xen/bin/qemu-dm')(vnc 1)))(device (vbd (dev 'ioemu:hda')(uname 'file:/root/foo.img')(mode 'w')))(device (vif (mac '00:16:3e:1b:b1:47')(bridge 'xenbr0')(script 'vif-bridge')(type ioemu))))
\ No newline at end of file
diff -r 00b8aaa2555b tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr Tue Mar 31 12:26:01 2009 +0100
@@ -0,0 +1,1 @@
+(vm (name 'rhel5')(memory 175)(maxmem 385)(vcpus 1)(uuid '4f77abd2-3019-58e8-3bab-6fbf2118f880')(bootloader '/usr/bin/pygrub')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)(device (tap (dev 'xvda:disk')(uname 'tap:aio:/xen/rhel5.img')(mode 'w')))(device (vif (mac '00:16:3e:1d:06:15')(bridge 'xenbr0')(script 'vif-bridge'))))
\ No newline at end of file
diff -r 00b8aaa2555b tests/xml2sexprdata/xml2sexpr-pv-localtime.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/xml2sexprdata/xml2sexpr-pv-localtime.xml Tue Mar 31 12:26:01 2009 +0100
@@ -0,0 +1,25 @@
+<domain type='xen' id='5'>
+ <name>rhel5</name>
+ <uuid>4f77abd2301958e83bab6fbf2118f880</uuid>
+ <bootloader>/usr/bin/pygrub</bootloader>
+ <memory>394240</memory>
+ <currentMemory>179200</currentMemory>
+ <vcpu>1</vcpu>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <clock offset='localtime'/>
+ <devices>
+ <interface type='bridge'>
+ <source bridge='xenbr0'/>
+ <mac address='00:16:3e:1d:06:15'/>
+ <script path='vif-bridge'/>
+ </interface>
+ <disk type='file' device='disk'>
+ <driver name='tap' type='aio'/>
+ <source file='/xen/rhel5.img'/>
+ <target dev='xvda:disk'/>
+ </disk>
+ <graphics type='vnc' port='5905'/>
+ </devices>
+</domain>
diff -r 00b8aaa2555b tests/xml2sexprtest.c
--- a/tests/xml2sexprtest.c Tue Mar 31 12:02:49 2009 +0100
+++ b/tests/xml2sexprtest.c Tue Mar 31 12:26:01 2009 +0100
@@ -130,6 +130,7 @@ mymain(int argc, char **argv)
DO_TEST("bridge-ipaddr", "bridge-ipaddr", "pvtest", 2);
DO_TEST("no-source-cdrom", "no-source-cdrom", "test", 2);
DO_TEST("pci-devs", "pci-devs", "pvtest", 2);
+ DO_TEST("pv-localtime", "pv-localtime", "pvtest", 1);
DO_TEST("fv-utc", "fv-utc", "fvtest", 1);
DO_TEST("fv-localtime", "fv-localtime", "fvtest", 1);
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
15 years, 7 months
[libvirt] PATCH: Fix duplicate methods in python binding
by Daniel P. Berrange
There are three methods with the same name in the python binding
due to a generator bug. This patch fixes them, so we get methods
networkCreateXML() and storagePoolCreateXML() instad of three
called createXML()
Daniel
diff -r e26692afef21 python/generator.py
--- a/python/generator.py Tue Mar 31 12:26:01 2009 +0100
+++ b/python/generator.py Tue Mar 31 12:36:02 2009 +0100
@@ -684,12 +684,18 @@ def nameFixup(name, classe, type, file):
elif name[0:16] == "virNetworkDefine":
func = name[3:]
func = string.lower(func[0:1]) + func[1:]
+ elif name[0:19] == "virNetworkCreateXML":
+ func = name[3:]
+ func = string.lower(func[0:1]) + func[1:]
elif name[0:16] == "virNetworkLookup":
func = name[3:]
func = string.lower(func[0:1]) + func[1:]
elif name[0:20] == "virStoragePoolDefine":
func = name[3:]
func = string.lower(func[0:1]) + func[1:]
+ elif name[0:23] == "virStoragePoolCreateXML":
+ func = name[3:]
+ func = string.lower(func[0:1]) + func[1:]
elif name[0:20] == "virStoragePoolLookup":
func = name[3:]
func = string.lower(func[0:1]) + func[1:]
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
15 years, 7 months
[libvirt] f11 virt release notes freezing
by Dale Bewley
I've been busy at my day job and not paying close enough attention to
Fedora 11 docs deadlines. Apparently the window for changes essentially
closes Wednesday (today).[1]
The notes are essentially in place. I don't think there are any gaping
holes, but I should have prompted for feedback much sooner. If you could
apply any love to the release notes[2] it would be appreciated.
= QEMU / KVM =
It is noted that QEMU and KVM are merging as a package, but I've also
separately listed the fact that QEMU is now 0.10.0 and KVM is now 84.
With the merge, might it be confusing or inaccurate to mention a
distinct new version of KVM? I'll admit to being somewhat fuzzy on
where/how that line is drawn.
I see[3] QEMU 0.10.0 in rawhide, but not 0.10.1, so I adjusted the
version in the relnotes. I copied the feature list from the 0.10.0
release announcement. If you'd care to suggest deletes or enhancements
of the list please do.
The KVM changelog since 74 (version at initial F10 release) is quite
long and not easily digestible by me at this late hour. Would anyone
care to offer some highlights or fill them into the wiki? Or, again,
should those be folded into QEMU?
= Libvirt =
I previously copied the list of changes from the releases, but did not
try to prune them down. It may be fine.
= The Current Outline =
1 Virtualization
* 1.1 Improved VNC Authentication for Virtual Machine
Management
* 1.2 Improved Graphical Console for Virtual Machines
* 1.3 KVM PCI Device Assignment
* 1.4 KVM and QEMU merge
* 1.5 SVirt Mandatory Access Control
* 1.6 Other Improvements
* 1.6.1 QEMU Updated to 0.10.0
* 1.6.2 KVM Updated to 84
* 1.6.3 libvirt Updated to 0.6.1
* 1.6.4 virt-manager Updated to 0.7.0
* 1.6.5 virtinst Updated to 0.400.3
* 1.6.6 Xen Updated to 3.3.1
* 1.7 Xen Kernel Support
Thanks for any edits or suggestions you can offer.
[1]
http://www.redhat.com/archives/fedora-docs-list/2009-March/msg00232.html
[2] http://fedoraproject.org/wiki/Documentation_Virtualization_Beat
[3] http://fedoraproject.org/wiki/User:Dale#Packages
15 years, 7 months