[libvirt] [PATCH] Solaris PV is localtime. Allow this setting through the conversions
by john.levon@sun.com
# HG changeset patch
# User john.levon(a)sun.com
# Date 1233198416 28800
# Node ID 76d670ab6ea5476be96441ea88af94644c985201
# Parent f0247b9f4da199c01412d5bd0f9d7d888cbb84de
Solaris PV is localtime. Allow this setting through the conversions.
Signed-off-by: John Levon <john.levon(a)sun.com>
diff --git a/src/xend_internal.c b/src/xend_internal.c
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -2272,10 +2272,12 @@ xenDaemonParseSxpr(virConnectPtr conn,
def->features |= (1 << VIR_DOMAIN_FEATURE_APIC);
if (sexpr_int(root, "domain/image/hvm/pae"))
def->features |= (1 << VIR_DOMAIN_FEATURE_PAE);
-
- if (sexpr_int(root, "domain/image/hvm/localtime"))
+ }
+
+ if (sexpr_int(root, "domain/localtime") ||
+ sexpr_int(root, "domain/image/hvm/localtime") ||
+ sexpr_int(root, "domain/image/linux/localtime"))
def->localtime = 1;
- }
if (sexpr_node_copy(root, hvm ?
"domain/image/hvm/device_model" :
@@ -5338,6 +5340,14 @@ xenDaemonFormatSxpr(virConnectPtr conn,
}
virBufferVSprintf(&buf, "(on_crash '%s')", tmp);
+ /*
+ * xend puts localtime in image/{hvm,linux}/, but is clearly
+ * bootloader independent. As a simple workaround, we define it
+ * here - xend happily picks it up from here.
+ */
+ if (def->localtime)
+ virBufferAddLit(&buf, "(localtime 1)");
+
if (!def->os.bootloader) {
if (STREQ(def->os.type, "hvm"))
hvm = 1;
@@ -5453,9 +5463,6 @@ xenDaemonFormatSxpr(virConnectPtr conn,
virBufferAddLit(&buf, "(serial none)");
}
- if (def->localtime)
- virBufferAddLit(&buf, "(localtime 1)");
-
if (def->sounds) {
virBufferAddLit(&buf, "(soundhw '");
if (xenDaemonFormatSxprSound(conn, def, &buf) < 0)
diff --git a/src/xm_internal.c b/src/xm_internal.c
--- a/src/xm_internal.c
+++ b/src/xm_internal.c
@@ -818,10 +818,11 @@ 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;
@@ -1972,6 +1973,9 @@ virConfPtr xenXMDomainConfigFormat(virCo
if (xenXMConfigSetInt(conf, "vcpus", def->vcpus) < 0)
goto no_memory;
+ if (def->localtime && xenXMConfigSetInt(conf, "localtime", 1) < 0)
+ goto no_memory;
+
if (def->cpumask &&
!(cpus = virDomainCpuSetFormat(conn, def->cpumask, def->cpumasklen)) < 0)
goto cleanup;
@@ -2034,9 +2038,6 @@ virConfPtr xenXMDomainConfigFormat(virCo
(1 << VIR_DOMAIN_FEATURE_APIC)) ? 1 : 0) < 0)
goto no_memory;
-
- if (xenXMConfigSetInt(conf, "localtime", def->localtime ? 1 : 0) < 0)
- goto no_memory;
if (priv->xendConfigVersion == 1) {
for (i = 0 ; i < def->ndisks ; i++) {
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime2.sexpr b/tests/sexpr2xmldata/sexpr2xml-fv-localtime2.sexpr
new file mode 100644
--- /dev/null
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime2.sexpr
@@ -0,0 +1,1 @@
+(domain (domid 3)(name 'fvtest')(memory 400)(maxmem 400)(vcpus 1)(uuid 'b5d70dd275cdaca517769660b059d8bc')(on_poweroff 'destroy')(on_reboot 'restart')(on_crash 'restart')(localtime 1)(image (hvm (kernel '/usr/lib/xen/boot/hvmloader')(device_model '/usr/lib64/xen/bin/qemu-dm')(boot c)(cdrom '/root/boot.iso')(acpi 1)(vnc 1)(keymap ja)))(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))))
diff --git a/tests/sexpr2xmldata/sexpr2xml-fv-localtime2.xml b/tests/sexpr2xmldata/sexpr2xml-fv-localtime2.xml
new file mode 100644
--- /dev/null
+++ b/tests/sexpr2xmldata/sexpr2xml-fv-localtime2.xml
@@ -0,0 +1,41 @@
+<domain type='xen' id='3'>
+ <name>fvtest</name>
+ <uuid>b5d70dd2-75cd-aca5-1776-9660b059d8bc</uuid>
+ <memory>409600</memory>
+ <currentMemory>409600</currentMemory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ <loader>/usr/lib/xen/boot/hvmloader</loader>
+ <boot dev='hd'/>
+ </os>
+ <features>
+ <acpi/>
+ </features>
+ <clock offset='localtime'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/lib64/xen/bin/qemu-dm</emulator>
+ <disk type='file' device='disk'>
+ <driver name='file'/>
+ <source file='/root/foo.img'/>
+ <target dev='hda' bus='ide'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='file'/>
+ <source file='/root/boot.iso'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ </disk>
+ <interface type='bridge'>
+ <mac address='00:16:3e:1b:b1:47'/>
+ <source bridge='xenbr0'/>
+ <script path='vif-bridge'/>
+ <target dev='vif3.0'/>
+ </interface>
+ <input type='mouse' bus='ps2'/>
+ <graphics type='vnc' port='5903' autoport='no' keymap='ja'/>
+ </devices>
+</domain>
diff --git a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
new file mode 100644
--- /dev/null
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.sexpr
@@ -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 --git a/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
new file mode 100644
--- /dev/null
+++ b/tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml
@@ -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 --git a/tests/sexpr2xmltest.c b/tests/sexpr2xmltest.c
--- a/tests/sexpr2xmltest.c
+++ b/tests/sexpr2xmltest.c
@@ -129,6 +129,7 @@ mymain(int argc, char **argv)
DO_TEST("pv-vfb-new-vncdisplay", "pv-vfb-new-vncdisplay", 3);
DO_TEST("fv-autoport", "fv-autoport", 3);
DO_TEST("pv-bootloader", "pv-bootloader", 1);
+ DO_TEST("pv-localtime", "pv-localtime", 1);
DO_TEST("disk-file", "disk-file", 2);
DO_TEST("disk-block", "disk-block", 2);
@@ -145,6 +146,7 @@ mymain(int argc, char **argv)
DO_TEST("fv-utc", "fv-utc", 1);
DO_TEST("fv-localtime", "fv-localtime", 1);
+ DO_TEST("fv-localtime2", "fv-localtime2", 1);
DO_TEST("fv-usbmouse", "fv-usbmouse", 1);
DO_TEST("fv-usbtablet", "fv-usbtablet", 1);
DO_TEST("fv-kernel", "fv-kernel", 1);
diff --git a/tests/xmconfigdata/test-escape-paths.cfg b/tests/xmconfigdata/test-escape-paths.cfg
--- a/tests/xmconfigdata/test-escape-paths.cfg
+++ b/tests/xmconfigdata/test-escape-paths.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-localtime.cfg b/tests/xmconfigdata/test-fullvirt-localtime.cfg
--- a/tests/xmconfigdata/test-fullvirt-localtime.cfg
+++ b/tests/xmconfigdata/test-fullvirt-localtime.cfg
@@ -3,13 +3,13 @@ maxmem = 579
maxmem = 579
memory = 394
vcpus = 1
+localtime = 1
builder = "hvm"
kernel = "/usr/lib/xen/boot/hvmloader"
boot = "d"
pae = 1
acpi = 1
apic = 1
-localtime = 1
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
--- a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
+++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-old-cdrom.cfg b/tests/xmconfigdata/test-fullvirt-old-cdrom.cfg
--- a/tests/xmconfigdata/test-fullvirt-old-cdrom.cfg
+++ b/tests/xmconfigdata/test-fullvirt-old-cdrom.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
cdrom = "/root/boot.iso"
on_poweroff = "destroy"
on_reboot = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg
--- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg
+++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.cfg b/tests/xmconfigdata/test-fullvirt-serial-file.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-file.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-file.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.cfg b/tests/xmconfigdata/test-fullvirt-serial-null.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-null.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-null.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg
--- a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg
+++ b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-sound.cfg b/tests/xmconfigdata/test-fullvirt-sound.cfg
--- a/tests/xmconfigdata/test-fullvirt-sound.cfg
+++ b/tests/xmconfigdata/test-fullvirt-sound.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg
--- a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg
+++ b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg
--- a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg
+++ b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-fullvirt-utc.cfg b/tests/xmconfigdata/test-fullvirt-utc.cfg
--- a/tests/xmconfigdata/test-fullvirt-utc.cfg
+++ b/tests/xmconfigdata/test-fullvirt-utc.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "restart"
on_crash = "restart"
diff --git a/tests/xmconfigdata/test-no-source-cdrom.cfg b/tests/xmconfigdata/test-no-source-cdrom.cfg
--- a/tests/xmconfigdata/test-no-source-cdrom.cfg
+++ b/tests/xmconfigdata/test-no-source-cdrom.cfg
@@ -9,7 +9,6 @@ pae = 1
pae = 1
acpi = 1
apic = 1
-localtime = 0
on_poweroff = "destroy"
on_reboot = "destroy"
on_crash = "destroy"
diff --git a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
--- a/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
+++ b/tests/xml2sexprdata/xml2sexpr-fv-localtime.sexpr
@@ -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)(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 --git a/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
new file mode 100644
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-pv-localtime.sexpr
@@ -0,0 +1,1 @@
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(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'))))
\ No newline at end of file
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-localtime.xml b/tests/xml2sexprdata/xml2sexpr-pv-localtime.xml
new file mode 100644
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-pv-localtime.xml
@@ -0,0 +1,24 @@
+<domain type='xen' id='15'>
+ <name>pvtest</name>
+ <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
+ <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>
+ <memory>430080</memory>
+ <vcpu>2</vcpu>
+ <clock offset='localtime'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>destroy</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <source file='/root/some.img'/>
+ <target dev='xvda'/>
+ </disk>
+ <console tty='/dev/pts/4'/>
+ </devices>
+</domain>
+
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-utc.sexpr b/tests/xml2sexprdata/xml2sexpr-pv-utc.sexpr
new file mode 100644
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-pv-utc.sexpr
@@ -0,0 +1,1 @@
+(vm (name 'pvtest')(memory 420)(maxmem 420)(vcpus 2)(uuid '596a5d21-71f4-8fb2-e068-e2386a5c413e')(on_poweroff 'destroy')(on_reboot 'destroy')(on_crash 'destroy')(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'))))
\ No newline at end of file
diff --git a/tests/xml2sexprdata/xml2sexpr-pv-utc.xml b/tests/xml2sexprdata/xml2sexpr-pv-utc.xml
new file mode 100644
--- /dev/null
+++ b/tests/xml2sexprdata/xml2sexpr-pv-utc.xml
@@ -0,0 +1,24 @@
+<domain type='xen' id='15'>
+ <name>pvtest</name>
+ <uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
+ <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>
+ <memory>430080</memory>
+ <vcpu>2</vcpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>destroy</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <source file='/root/some.img'/>
+ <target dev='xvda'/>
+ </disk>
+ <console tty='/dev/pts/4'/>
+ </devices>
+</domain>
+
diff --git a/tests/xml2sexprtest.c b/tests/xml2sexprtest.c
--- a/tests/xml2sexprtest.c
+++ b/tests/xml2sexprtest.c
@@ -112,6 +112,8 @@ mymain(int argc, char **argv)
DO_TEST("pv-vfb-new", "pv-vfb-new", "pvtest", 3);
DO_TEST("pv-vfb-new-auto", "pv-vfb-new-auto", "pvtest", 3);
DO_TEST("pv-bootloader", "pv-bootloader", "pvtest", 1);
+ DO_TEST("pv-localtime", "pv-localtime", "pvtest", 1);
+ DO_TEST("pv-utc", "pv-utc", "pvtest", 1);
DO_TEST("disk-file", "disk-file", "pvtest", 2);
DO_TEST("disk-block", "disk-block", "pvtest", 2);
15 years, 9 months
[libvirt] [PATCH] don't print uninitialized in debug diagnostic
by Jim Meyering
FYI, this was caught by bleeding-edge gcc (built from git just this morning).
There are a few other problems, too.
>From a3149ae688f4f7eac3ee001f8f4d5997d3f23eeb Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Thu, 5 Feb 2009 18:57:07 +0100
Subject: [PATCH] don't print uninitialized in debug diagnostic
* qemud/mdns.c (libvirtd_mdns_timeout_new): Don't use local, t,
uninitialized.
---
qemud/mdns.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemud/mdns.c b/qemud/mdns.c
index b13a6e5..ae6ff08 100644
--- a/qemud/mdns.c
+++ b/qemud/mdns.c
@@ -309,7 +309,7 @@ static AvahiTimeout *libvirtd_mdns_timeout_new(const AvahiPoll *api ATTRIBUTE_UN
AvahiTimeout *t;
struct timeval now;
long long nowms, thenms, timeout;
- AVAHI_DEBUG("Add timeout %p TV %p", t, tv);
+ AVAHI_DEBUG("Add timeout TV %p", tv);
if (VIR_ALLOC(t) < 0)
return NULL;
--
1.6.1.2.511.gc5d3f
15 years, 9 months
[libvirt] [PATCH] Allow off-line removal of devices via xend
by john.levon@sun.com
# HG changeset patch
# User john.levon(a)sun.com
# Date 1233806617 28800
# Node ID 507c2058c5f3c37894c573c4559eab58c5b52d7d
# Parent 0b9d8336e5e089b19ac8381fdc77eadc72ef9eb7
Allow off-line removal of devices via xend
We must avoid xenstore if the domain isn't running. For disks, this
works in all xend versions; for NICs, however, this requires a change in
netif.py to allow matching by MAC address. Preferring the device ID but
falling back to the device ref works best with all versions of xend.
Signed-off-by: John Levon <john.levon(a)sun.com>
diff --git a/src/xend_internal.c b/src/xend_internal.c
--- a/src/xend_internal.c
+++ b/src/xend_internal.c
@@ -92,11 +92,17 @@ xenDaemonFormatSxprNet(virConnectPtr con
int xendConfigVersion,
int isAttach);
static int
-virDomainXMLDevID(virDomainPtr domain,
- virDomainDeviceDefPtr dev,
- char *class,
- char *ref,
- int ref_len);
+virDomainDevRef(virDomainPtr domain,
+ virDomainDeviceDefPtr dev,
+ char *class,
+ char *ref,
+ int ref_len);
+static int
+virDomainDevID(virDomainPtr domain,
+ int type,
+ const char *ref,
+ char *devid,
+ int devid_len);
#endif
#define virXendError(conn, code, fmt...) \
@@ -3858,7 +3864,7 @@ xenDaemonAttachDevice(virDomainPtr domai
virDomainDeviceDefPtr dev = NULL;
virDomainDefPtr def = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
- char class[8], ref[80];
+ char class[8], ref[80], devid[80];
if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)) {
virXendError((domain ? domain->conn : NULL), VIR_ERR_INVALID_ARG,
@@ -3914,15 +3920,24 @@ xenDaemonAttachDevice(virDomainPtr domai
sexpr = virBufferContentAndReset(&buf);
- if (virDomainXMLDevID(domain, dev, class, ref, sizeof(ref))) {
+ devid[0] = '\0';
+
+ if (virDomainDevRef(domain, dev, class, ref, sizeof(ref)) == -1)
+ goto cleanup;
+
+ if (domain->id > 0 &&
+ virDomainDevID(domain, dev->type, ref, devid, sizeof(devid)) != -1) {
+ VIR_DEBUG("device_configure(ref = %s, devid = %s): %s",
+ ref, devid, sexpr);
+ /* device exists, attempt to modify it */
+ ret = xend_op(domain->conn, domain->name, "op", "device_configure",
+ "config", sexpr, "dev", devid, NULL);
+ } else {
+ VIR_DEBUG("device_create(ref = %s, devid = %s): %s",
+ ref, devid, sexpr);
/* device doesn't exist, define it */
ret = xend_op(domain->conn, domain->name, "op", "device_create",
"config", sexpr, NULL);
- }
- else {
- /* device exists, attempt to modify it */
- ret = xend_op(domain->conn, domain->name, "op", "device_configure",
- "config", sexpr, "dev", ref, NULL);
}
cleanup:
@@ -3945,7 +3960,7 @@ xenDaemonDetachDevice(virDomainPtr domai
xenDaemonDetachDevice(virDomainPtr domain, const char *xml)
{
xenUnifiedPrivatePtr priv;
- char class[8], ref[80];
+ char class[8], ref[80], devid[80];
virDomainDeviceDefPtr dev = NULL;
virDomainDefPtr def = NULL;
int ret = -1;
@@ -3976,11 +3991,41 @@ xenDaemonDetachDevice(virDomainPtr domai
def, xml, VIR_DOMAIN_XML_INACTIVE)))
goto cleanup;
- if (virDomainXMLDevID(domain, dev, class, ref, sizeof(ref)))
+ if (dev->type != VIR_DOMAIN_DEVICE_NET &&
+ dev->type != VIR_DOMAIN_DEVICE_DISK) {
+ virXendError(domain->conn, VIR_ERR_INTERNAL_ERROR,
+ _("can't detach device of type %d"), dev->type);
goto cleanup;
+ }
+
+ /*
+ * First acquire a static reference to the device (MAC address or
+ * destination disk). We'll use this if the domain isn't running,
+ * otherwise we'll rely upon the XenStore devid.
+ */
+
+ if (virDomainDevRef(domain, dev, class, ref, sizeof(ref)) == -1) {
+ virXendError(domain->conn, VIR_ERR_INTERNAL_ERROR,
+ _("can't detach device: not found "));
+ goto cleanup;
+ }
+
+ if (domain->id >= 0) {
+ if (virDomainDevID(domain, dev->type, ref, devid, sizeof(devid))) {
+ virXendError(domain->conn, VIR_ERR_INTERNAL_ERROR,
+ _("can't detach device: not found "));
+ goto cleanup;
+ }
+ } else {
+ strncpy(devid, ref, 80);
+ }
+
+ VIR_DEBUG("device_destroy(type = %s, ref = %s, devid = %s)",
+ class, ref, devid);
ret = xend_op(domain->conn, domain->name, "op", "device_destroy",
- "type", class, "dev", ref, "force", "0", "rm_cfg", "1", NULL);
+ "type", class, "dev", devid, "force", "0",
+ "rm_cfg", "1", NULL);
cleanup:
virDomainDefFree(def);
@@ -5502,12 +5547,48 @@ error:
/**
- * virDomainXMLDevID:
+ * virDomainXMLDevRef:
* @domain: pointer to domain object
* @dev: pointer to device config object
* @class: Xen device class "vbd" or "vif" (OUT)
* @ref: Xen device reference (OUT)
*
+ * Return the class (vbd/vif) and reference (MAC address / disk
+ * destination) of the given device.
+ *
+ * Returns 0 in case of success, -1 in case of failure.
+ */
+static int
+virDomainDevRef(virDomainPtr domain,
+ virDomainDeviceDefPtr dev,
+ char *class,
+ char *ref,
+ int ref_len)
+{
+ if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
+ if (dev->data.disk->dst == NULL)
+ return -1;
+ strncpy(ref, dev->data.disk->dst, ref_len);
+ strcpy(class, "vbd");
+ } else if (dev->type == VIR_DOMAIN_DEVICE_NET) {
+ virFormatMacAddr(dev->data.net->mac, ref);
+ strcpy(class, "vif");
+ } else {
+ virXendError(NULL, VIR_ERR_NO_SUPPORT,
+ _("no support for device type %d"), dev->type);
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * virDomainXMLDevID:
+ * @domain: pointer to domain object
+ * @class: either 'vbd' or 'vif'
+ * @ref: Xen device reference
+ * @devid: Xen device ID (OUT)
+ *
* Set class according to XML root, and:
* - if disk, copy in ref the target name from description
* - if network, get MAC address from description, scan XenStore and
@@ -5516,54 +5597,41 @@ error:
* Returns 0 in case of success, -1 in case of failure.
*/
static int
-virDomainXMLDevID(virDomainPtr domain,
- virDomainDeviceDefPtr dev,
- char *class,
- char *ref,
- int ref_len)
+virDomainDevID(virDomainPtr domain,
+ int type,
+ const char *ref,
+ char *devid,
+ int devid_len)
{
xenUnifiedPrivatePtr priv = domain->conn->privateData;
- char *xref;
-
- if (dev->type == VIR_DOMAIN_DEVICE_DISK) {
- strcpy(class, "vbd");
- if (dev->data.disk->dst == NULL)
- return -1;
- xenUnifiedLock(priv);
- xref = xenStoreDomainGetDiskID(domain->conn, domain->id,
- dev->data.disk->dst);
- xenUnifiedUnlock(priv);
- if (xref == NULL)
- return -1;
-
- strncpy(ref, xref, ref_len);
- free(xref);
- ref[ref_len - 1] = '\0';
- } else if (dev->type == VIR_DOMAIN_DEVICE_NET) {
- char mac[30];
- virDomainNetDefPtr def = dev->data.net;
- snprintf(mac, sizeof(mac), "%02x:%02x:%02x:%02x:%02x:%02x",
- def->mac[0], def->mac[1], def->mac[2],
- def->mac[3], def->mac[4], def->mac[5]);
-
- strcpy(class, "vif");
-
- xenUnifiedLock(priv);
- xref = xenStoreDomainGetNetworkID(domain->conn, domain->id,
- mac);
- xenUnifiedUnlock(priv);
- if (xref == NULL)
- return -1;
-
- strncpy(ref, xref, ref_len);
- free(xref);
- ref[ref_len - 1] = '\0';
+ char *id = NULL;
+
+ if (domain->id < 0) {
+ virXendError(domain->conn, VIR_ERR_INTERNAL_ERROR,
+ _("devid not available for shutdown domain"));
+ return -1;
+ }
+
+ xenUnifiedLock(priv);
+
+ if (type == VIR_DOMAIN_DEVICE_DISK) {
+ id = xenStoreDomainGetDiskID(domain->conn, domain->id, ref);
+
+ } else if (type == VIR_DOMAIN_DEVICE_NET) {
+ id = xenStoreDomainGetNetworkID(domain->conn, domain->id, ref);
} else {
virXendError(NULL, VIR_ERR_NO_SUPPORT,
- "%s", _("hotplug of device type not supported"));
+ _("no support for device type %d"), type);
+ }
+
+ xenUnifiedUnlock(priv);
+
+ if (id == NULL)
return -1;
- }
-
+
+ strncpy(devid, id, devid_len);
+ VIR_FREE(id);
+ devid[devid_len - 1] = '\0';
return 0;
}
15 years, 9 months
[libvirt] [PATCH] Improve error reporting in virsh
by john.levon@sun.com
# HG changeset patch
# User john.levon(a)sun.com
# Date 1233870902 28800
# Node ID fe7d1aae6184476568fcd3da379207375d8a05a6
# Parent 9fecb1254ee1dad6efeedc50239852104a6f40e2
Improve error reporting in virsh
Rather than verbosely printing every error, save the last error and
report that only if the entire command fails.
Signed-off-by: John Levon <john.levon(a)sun.com>
diff --git a/src/virsh.c b/src/virsh.c
--- a/src/virsh.c
+++ b/src/virsh.c
@@ -93,22 +93,6 @@ typedef enum {
} vshErrorLevel;
/*
- * The error handler for virsh
- */
-static void
-virshErrorHandler(void *unused, virErrorPtr error)
-{
- if ((unused != NULL) || (error == NULL))
- return;
-
- /* Suppress the VIR_ERR_NO_XEN error which fails as non-root */
- if ((error->code == VIR_ERR_NO_XEN) || (error->code == VIR_ERR_OK))
- return;
-
- virDefaultErrorFunc(error);
-}
-
-/*
* virsh command line grammar:
*
* command_line = <command>\n | <command>; <command>; ...
@@ -319,6 +303,46 @@ static int namesorter(const void *a, con
const char **sb = (const char**)b;
return strcasecmp(*sa, *sb);
+}
+
+static virErrorPtr last_error;
+
+/*
+ * Quieten libvirt until we're done with the command.
+ */
+static void
+virshErrorHandler(void *unused, virErrorPtr error)
+{
+ virFreeError(last_error);
+ last_error = virSaveLastError();
+ if (getenv("VIRSH_DEBUG") != NULL)
+ virDefaultErrorFunc(error);
+}
+
+/*
+ * Report an error when a command finishes. This is better than before
+ * (when correct operation would report errors), but it has some
+ * problems: we lose the smarter formatting of virDefaultErrorFunc(),
+ * and it can become harder to debug problems, if errors get reported
+ * twice during one command. This case shouldn't really happen anyway,
+ * and it's IMHO a bug that libvirt does that sometimes.
+ */
+static void
+virshReportError(vshControl *ctl)
+{
+ if (last_error == NULL)
+ return;
+
+ if (last_error->code == VIR_ERR_OK) {
+ vshError(ctl, FALSE, "%s", _("unknown error"));
+ goto out;
+ }
+
+ vshError(ctl, FALSE, "%s", last_error->message);
+
+out:
+ virFreeError(last_error);
+ last_error = NULL;
}
@@ -6102,6 +6126,9 @@ vshCommandRun(vshControl *ctl, const vsh
if (ctl->timing)
GETTIMEOFDAY(&after);
+
+ if (ret == FALSE)
+ virshReportError(ctl);
if (STREQ(cmd->def->name, "quit")) /* hack ... */
return ret;
15 years, 9 months
[libvirt] [PATCH] Introduce virSaveLastError(), virFreeError()
by john.levon@sun.com
# HG changeset patch
# User john.levon(a)sun.com
# Date 1233870901 28800
# Node ID 2c12bdf95e5e5f7d00b606df679364463555d76e
# Parent 059167552cb467c107870c3b739438ca107116a8
Introduce virSaveLastError(), virFreeError()
Allow applications to store a copy of the last error reported.
Signed-off-by: John Levon <john.levon(a)sun.com>
diff --git a/include/libvirt/virterror.h b/include/libvirt/virterror.h
--- a/include/libvirt/virterror.h
+++ b/include/libvirt/virterror.h
@@ -172,8 +172,10 @@ typedef void (*virErrorFunc) (void *user
*/
virErrorPtr virGetLastError (void);
+virErrorPtr virSaveLastError (void);
void virResetLastError (void);
void virResetError (virErrorPtr err);
+void virFreeError (virErrorPtr err);
virErrorPtr virConnGetLastError (virConnectPtr conn);
void virConnResetLastError (virConnectPtr conn);
diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
--- a/src/libvirt_public.syms
+++ b/src/libvirt_public.syms
@@ -247,4 +247,10 @@ LIBVIRT_0.6.0 {
} LIBVIRT_0.5.0;
+LIBVIRT_0.6.1 {
+ global:
+ virFreeError;
+ virSaveLastError;
+} LIBVIRT_0.6.0;
+
# .... define new API here using predicted next version number ....
diff --git a/src/virterror.c b/src/virterror.c
--- a/src/virterror.c
+++ b/src/virterror.c
@@ -286,6 +286,27 @@ virCopyLastError(virErrorPtr to)
}
/**
+ * virSaveLastError:
+ *
+ * Save the last error into a new error object.
+ *
+ * Returns a pointer to the copied error or NULL if allocation failed.
+ * It is the caller's responsibility to free the error with
+ * virFreeError().
+ */
+virErrorPtr
+virSaveLastError(void)
+{
+ virErrorPtr to;
+
+ if (VIR_ALLOC(to) < 0)
+ return NULL;
+
+ virCopyLastError(to);
+ return to;
+}
+
+/**
* virResetError:
* @err: pointer to the virError to clean up
*
@@ -303,6 +324,18 @@ virResetError(virErrorPtr err)
memset(err, 0, sizeof(virError));
}
+/**
+ * virFreeError:
+ * @err: error to free
+ *
+ * Resets and frees the given error.
+ */
+void
+virFreeError(virErrorPtr err)
+{
+ virResetError(err);
+ VIR_FREE(err);
+}
/**
* virResetLastError:
15 years, 9 months
[libvirt] Leaky virsh?
by John Levon
Running virsh with the remote driver (as it always is on Solaris), it
leaks pretty heavily:
thewhip:~ # yes "start fewfewf" | virsh >/dev/null 2>&1 &
[1] 6388
# prstat -c -p 6388
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
6388 root 10M 6788K sleep 59 0 0:00:02 0.2% virsh/1
Total: 1 processes, 1 lwps, load averages: 0.32, 0.12, 0.06
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
6388 root 11M 7104K sleep 59 0 0:00:02 0.3% virsh/1
Total: 1 processes, 1 lwps, load averages: 0.34, 0.12, 0.06
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP
6388 root 11M 7160K sleep 59 0 0:00:02 0.3% virsh/1
Total: 1 processes, 1 lwps, load averages: 0.36, 0.13, 0.07
Can you reproduce on Linux anyone?
regards
john
15 years, 9 months
[libvirt] [PATCH/RFC]: don't ignore errors to save the domain status file
by Guido Günther
Hi,
we currently don't report errors to save qemu's domain status file back
to the caller. That was o.k. as long as the code was there for testing
but now that the XML is being picked up on daemon restart we must
handle these.
The attached patch does that, although I'm not confident that it's
enough. While we return error on device attach/unattach the device
actually got attached/unattached already. Same is true for
suspend/resume.
A better solution would be to write out the new domain status into a
temp file and simply call rename(2) on it when the attach/unattach
succeeds and discard it if it fails. This would minimize the possible
error conditions like disk full, missing permissions to write into that
directory etc. Does this sound reasonable?
O.k. to apply the attached version for now?
Cheers,
-- Guido
15 years, 9 months
[libvirt] [PATCH] turn off strict-aliasing warnings in two files
by Jim Meyering
Without these changes and with gcc-4.4,
I'd get 4 warnings (2 in each file)
about strict-aliasing violations.
-Wstrict-aliasing is worth keeping in general, so I
have disabled it only for the two offending files.
The #if avoids the pragma on versions of gcc that don't recognize it.
>From 7d7f8e5dd9754d2bbca1a0ec2f3a47d4eae9df30 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering(a)redhat.com>
Date: Fri, 6 Feb 2009 11:45:39 +0100
Subject: [PATCH] turn off strict-aliasing warnings in two files
* qemud/qemud.c: Disable gcc's strict-aliasing warnings in this file.
* src/bridge.c: Likewise.
---
qemud/qemud.c | 5 +++++
src/bridge.c | 5 +++++
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/qemud/qemud.c b/qemud/qemud.c
index effb336..c3521e3 100644
--- a/qemud/qemud.c
+++ b/qemud/qemud.c
@@ -21,6 +21,11 @@
* Author: Daniel P. Berrange <berrange(a)redhat.com>
*/
+/* Tell gcc not to warn about aliasing (e.g., sockaddr_in) in this file. */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
#include <config.h>
#include <sys/types.h>
diff --git a/src/bridge.c b/src/bridge.c
index 8e577dd..62fa711 100644
--- a/src/bridge.c
+++ b/src/bridge.c
@@ -19,6 +19,11 @@
* Mark McLoughlin <markmc(a)redhat.com>
*/
+/* Tell gcc not to warn about aliasing (e.g., sockaddr_in) in this file. */
+#if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__
+# pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#endif
+
#include <config.h>
#if defined(WITH_BRIDGE)
--
1.6.1.2.511.gc5d3f
15 years, 9 months
[libvirt] I have been looking over James Morris patches for svirt.
by Daniel J Walsh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
What is the process to get them into libvirt?
I have begun to look at the second componant of the libvirt change.
James patch, allows libvirt to read the SELinux context out of the xml
database and execute qemu with the context. The second componant is to
pass the context of the image(s) and allow libvirt to not only set the
image, but also update the default labels on disk, so a relabel will not
change the context.
I have some patches to do this, but want to make sure the original
patches are acceptable?
The last changes and perhaps the most difficult is figuring out how to
get the labels into the XML database in the first place.
I guess virt_manager will somehow figure out what the labels should be
and assign them.
Dan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAkmMeZEACgkQrlYvE4MpobMZcwCePmE1aF3zJURS2up7ERoxNU4V
Ho8AoIwBMN7/f4zBCIDTpbnLg13FfPOG
=rHH5
-----END PGP SIGNATURE-----
15 years, 9 months
[libvirt] FreeNodeMemory
by Gihan Munasinghe
Hi
Is there a specific reason for not having a "free_memory" with in the
"virNodeInfo" structure.
I can see there is "virNodeGetFreeMemory(connection)" which currently
not implemented for XEN..
I can add the patch to do this..
But I would like to clarify why we have not add "free_memory" in to the
virNodeInfo structure..
Thanks
--
Gihan Munasinghe
R&D Team Leader
XCalibre Communications Ltd.
www.flexiscale.com
15 years, 9 months