[libvirt] [PATCH] Resolve valgrind error
by John Ferlan
Commit id '1acfc171' resulted in the following valgrind failure:
==25317== 136 (24 direct, 112 indirect) bytes in 1 blocks are definitely lost in loss record 4 of 4
==25317== at 0x4A06B6F: calloc (vg_replace_malloc.c:593)
==25317== by 0x4C6F851: virAlloc (viralloc.c:124)
==25317== by 0x4C71493: virBitmapNew (virbitmap.c:74)
==25317== by 0x4C71B79: virBitmapNewData (virbitmap.c:434)
==25317== by 0x402EF2: test8 (virbitmaptest.c:436)
==25317== by 0x40499F: virtTestRun (testutils.c:157)
==25317== by 0x402E8D: mymain (virbitmaptest.c:474)
==25317== by 0x404FDA: virtTestMain (testutils.c:719)
==25317== by 0x39D0821A04: (below main) (in /usr/lib64/libc-2.16.so)
---
tests/virbitmaptest.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/tests/virbitmaptest.c b/tests/virbitmaptest.c
index 90be0e2..2464c33 100644
--- a/tests/virbitmaptest.c
+++ b/tests/virbitmaptest.c
@@ -432,24 +432,25 @@ static int test8(const void *v ATTRIBUTE_UNUSED)
{
virBitmapPtr bitmap = NULL;
char data[108] = {0x00,};
+ int ret = -1;
bitmap = virBitmapNewData(data, sizeof(data));
if (!bitmap)
- goto error;
+ goto cleanup;
if (!virBitmapIsAllClear(bitmap))
- goto error;
+ goto cleanup;
if (virBitmapSetBit(bitmap, 11) < 0)
- goto error;
+ goto cleanup;
if (virBitmapIsAllClear(bitmap))
- goto error;
+ goto cleanup;
- return 0;
-error:
+ ret = 0;
+cleanup:
virBitmapFree(bitmap);
- return -1;
+ return ret;
}
static int
--
1.8.1.4
11 years, 7 months
[libvirt] [PATCH] Fix compilation error in util/vircgroup.c
by Stefan Berger
Fix the error
util/vircgroup.c: In function 'virCgroupNewDomainPartition':
util/vircgroup.c:1299:11: error: declaration of 'dirname' shadows a
global declaration [-Werror=shadow]
Signed-off-by: Stefan Berger <stefanb(a)linux.vnet.ibm.com>
---
src/util/vircgroup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Index: libvirt-acl/src/util/vircgroup.c
===================================================================
--- libvirt-acl.orig/src/util/vircgroup.c
+++ libvirt-acl/src/util/vircgroup.c
@@ -1296,13 +1296,13 @@ int virCgroupNewDomainPartition(virCgrou
virCgroupPtr *group)
{
int rc;
- char *dirname = NULL;
+ char *directoryname = NULL;
- if (virAsprintf(&dirname, "%s.%s.libvirt",
+ if (virAsprintf(&directoryname, "%s.%s.libvirt",
name, driver) < 0)
return -ENOMEM;
- rc = virCgroupNew(dirname, partition, -1, group);
+ rc = virCgroupNew(directoryname, partition, -1, group);
if (rc == 0) {
/*
@@ -1322,7 +1322,7 @@ int virCgroupNewDomainPartition(virCgrou
}
}
- VIR_FREE(dirname);
+ VIR_FREE(directoryname);
return rc;
}
#else
11 years, 7 months
[libvirt] [libvirt-glib] Fix year in NEWS
by Christophe Fergeau
We switched from 2012 to 2013!!
---
I've pushed this under the trivial rule.
Christophe
NEWS | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/NEWS b/NEWS
index b5f0c84..b1f4a80 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
libvirt-glib News
=================
-0.1.6 - Mar 18, 2012
+0.1.6 - Mar 18, 2013
====================
- Prefer g_strlcpy over strncpy
@@ -14,7 +14,7 @@
- Replace FSF address with URL in copyright headers
- Add API for changing Spice compression parameters.
-0.1.5 - Jan 14, 2012
+0.1.5 - Jan 14, 2013
====================
- Add support for bridge interface types in guest XML
--
1.8.1.4
11 years, 7 months
[libvirt] [PATCH 0/7] Add support for guest-based CPU-hotplug and unplug
by Peter Krempa
This is a initial support for guest-agent based cpu hotplug that was commited
in upstream qemu and should be released in qemu 1.5.0.
This patchset relies on the existing qemuDomainSetVcpusFlags API that is not
really ideal for this purpose but is usable. I'm planing on adding a
specific-cpu hotplug API later that will allow more control.
Peter Krempa (7):
lib: Fix docs about return value of virDomainGetVcpusFlags()
virsh-domain: Refactor cmdVcpucount and fix output on inactive domains
qemu_agent: Add support for appending arrays to commands
qemu_agent: Introduce helpers for agent based CPU hot(un)plug
Introduce flag VIR_DOMAIN_VCPU agent, for agent based CPU
unlpug(shutdown).
qemu: Implement request of vCPU state using the guest agent
qemu: Implement support for VIR_DOMAIN_VCPU in qemuDomainSetVcpusFlags
include/libvirt/libvirt.h.in | 1 +
src/libvirt.c | 9 +-
src/qemu/qemu_agent.c | 141 +++++++++++++++++++++
src/qemu/qemu_agent.h | 12 ++
src/qemu/qemu_driver.c | 181 ++++++++++++++++++++++++---
tools/virsh-domain.c | 283 +++++++++++++++++++++----------------------
tools/virsh.pod | 13 +-
7 files changed, 474 insertions(+), 166 deletions(-)
--
1.8.1.5
11 years, 7 months
[libvirt] [PATCH v4 00/11] Add support for guests with TPM passthrough device
by Stefan Berger
Hello!
The following set of patches adds support to libvirt for
adding a TPM passthrough device to a QEMU guest. Support for
this was recently accepted into QEMU.
This set of patches borrows a lot from the recently added support
for rng's.
Regards,
Stefan
---
v3->v4:
- followed tree to ce65b435
- followed comments on v3
v2->v3:
- followed tree to 03122d7b
- some nits I found fixed
v1->v2:
- Followed Daniel Berrange's comments
(except for the one on de-consolidating the JSON monitor code)
11 years, 7 months
[libvirt] [PATCH 1/2] qemu: Support discard for disk
by Osier Yang
QEMU introduced "discard" option for drive since commit a9384aff53,
<...>
@var{discard} is one of "ignore" (or "off") or "unmap" (or "on") and
controls whether @dfn{discard} (also known as @dfn{trim} or @dfn{unmap})
requests are ignored or passed to the filesystem. Some machine types
may not support discard requests.
</...>
This patch exposes the support in libvirt.
---
docs/formatdomain.html.in | 8 +++++
docs/schemas/domaincommon.rng | 11 +++++++
src/conf/domain_conf.c | 18 +++++++++++
src/conf/domain_conf.h | 10 ++++++
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 3 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 11 +++++++
.../qemuxml2argv-disk-discard.args | 8 +++++
.../qemuxml2argvdata/qemuxml2argv-disk-discard.xml | 36 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 3 ++
tests/qemuxml2xmltest.c | 2 ++
12 files changed, 112 insertions(+)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-discard.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-discard.xml
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 0cc56d9..f1cee14 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1676,6 +1676,14 @@
network. By default copy-on-read is off.
<span class='since'>Since 0.9.10 (QEMU and KVM only)</span>
</li>
+ <li>
+ The optional <code>discard</code> attribute controls whether
+ to discard (also known as "trim" or "unmap") requests are
+ ignored or passed to the filesystem. The value can be either
+ "on" (allow the discard request to be passed) or "off" (ingore
+ the discard request).
+ <span class='since'>Since 1.0.5 (QEMU and KVM only)</span>
+ </li>
</ul>
</dd>
<dt><code>boot</code></dt>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 468c49c..4b71e16 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1304,6 +1304,9 @@
<optional>
<ref name="copy_on_read"/>
</optional>
+ <optional>
+ <ref name="discard"/>
+ </optional>
<empty/>
</element>
</define>
@@ -1399,6 +1402,14 @@
<value>off</value>
</choice>
</attribute>
+ </define>
+ <define name="discard">
+ <attribute name='discard'>
+ <choice>
+ <value>on</value>
+ <value>off</value>
+ </choice>
+ </attribute>
</define>
<define name="controller">
<element name="controller">
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 548368e..4925a80 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -728,6 +728,10 @@ VIR_ENUM_IMPL(virDomainTPMModel, VIR_DOMAIN_TPM_MODEL_LAST,
VIR_ENUM_IMPL(virDomainTPMBackend, VIR_DOMAIN_TPM_TYPE_LAST,
"passthrough")
+VIR_ENUM_IMPL(virDomainDiskDiscard, VIR_DOMAIN_DISK_DISCARD_LAST,
+ "default",
+ "on",
+ "off")
#define VIR_DOMAIN_XML_WRITE_FLAGS VIR_DOMAIN_XML_SECURE
#define VIR_DOMAIN_XML_READ_FLAGS VIR_DOMAIN_XML_INACTIVE
@@ -4324,6 +4328,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
char *wwn = NULL;
char *vendor = NULL;
char *product = NULL;
+ char *discard = NULL;
int expected_secret_usage = -1;
int auth_secret_usage = -1;
@@ -4551,6 +4556,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
ioeventfd = virXMLPropString(cur, "ioeventfd");
event_idx = virXMLPropString(cur, "event_idx");
copy_on_read = virXMLPropString(cur, "copy_on_read");
+ discard = virXMLPropString(cur, "discard");
} else if (!mirror && xmlStrEqual(cur->name, BAD_CAST "mirror") &&
!(flags & VIR_DOMAIN_XML_INACTIVE)) {
char *ready;
@@ -4997,6 +5003,14 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
def->copy_on_read = cor;
}
+ if (discard) {
+ if ((def->discard = virDomainDiskDiscardTypeFromString(discard)) <= 0) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unknown disk discard mode '%s'"), discard);
+ goto error;
+ }
+ }
+
if (devaddr) {
if (virDomainParseLegacyDeviceAddress(devaddr,
&def->info.addr.pci) < 0) {
@@ -5116,6 +5130,7 @@ cleanup:
VIR_FREE(ioeventfd);
VIR_FREE(event_idx);
VIR_FREE(copy_on_read);
+ VIR_FREE(discard);
VIR_FREE(devaddr);
VIR_FREE(serial);
virStorageEncryptionFree(encryption);
@@ -13291,6 +13306,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
const char *event_idx = virDomainVirtioEventIdxTypeToString(def->event_idx);
const char *copy_on_read = virDomainVirtioEventIdxTypeToString(def->copy_on_read);
const char *sgio = virDomainDiskSGIOTypeToString(def->sgio);
+ const char *discard = virDomainDiskDiscardTypeToString(def->discard);
char uuidstr[VIR_UUID_STRING_BUFLEN];
@@ -13367,6 +13383,8 @@ virDomainDiskDefFormat(virBufferPtr buf,
virBufferAsprintf(buf, " event_idx='%s'", event_idx);
if (def->copy_on_read)
virBufferAsprintf(buf, " copy_on_read='%s'", copy_on_read);
+ if (def->discard)
+ virBufferAsprintf(buf, " discard='%s'", discard);
virBufferAddLit(buf, "/>\n");
}
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index f1f01fa..fdf5d93 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -600,6 +600,14 @@ enum virDomainDiskSGIO {
VIR_DOMAIN_DISK_SGIO_LAST
};
+enum virDomainDiskDiscard {
+ VIR_DOMAIN_DISK_DISCARD_DEFAULT = 0,
+ VIR_DOMAIN_DISK_DISCARD_ON,
+ VIR_DOMAIN_DISK_DISCARD_OFF,
+
+ VIR_DOMAIN_DISK_DISCARD_LAST
+};
+
typedef struct _virDomainBlockIoTuneInfo virDomainBlockIoTuneInfo;
struct _virDomainBlockIoTuneInfo {
unsigned long long total_bytes_sec;
@@ -682,6 +690,7 @@ struct _virDomainDiskDef {
bool rawio_specified;
int rawio; /* no = 0, yes = 1 */
int sgio; /* enum virDomainDiskSGIO */
+ int discard; /* enum virDomainDiskDiscard */
size_t nseclabels;
virSecurityDeviceLabelDefPtr *seclabels;
@@ -2416,6 +2425,7 @@ VIR_ENUM_DECL(virDomainDiskIo)
VIR_ENUM_DECL(virDomainDiskSecretType)
VIR_ENUM_DECL(virDomainDiskSGIO)
VIR_ENUM_DECL(virDomainDiskTray)
+VIR_ENUM_DECL(virDomainDiskDiscard)
VIR_ENUM_DECL(virDomainIoEventFd)
VIR_ENUM_DECL(virDomainVirtioEventIdx)
VIR_ENUM_DECL(virDomainDiskCopyOnRead)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 30fdcd7..a24bf5c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -140,6 +140,7 @@ virDomainDiskDefFree;
virDomainDiskDefGenSecurityLabelDef;
virDomainDiskDefGetSecurityLabelDef;
virDomainDiskDeviceTypeToString;
+virDomainDiskDiscardTypeToString;
virDomainDiskErrorPolicyTypeFromString;
virDomainDiskErrorPolicyTypeToString;
virDomainDiskFindByBusAndDst;
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b174672..278012c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -222,6 +222,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"tpm-tis",
"query-tpm-models", /* 140 */
+ "drive-discard",
);
struct _virQEMUCaps {
@@ -963,6 +964,8 @@ virQEMUCapsComputeCmdFlags(const char *help,
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_COPY_ON_READ);
if (strstr(help, "bps="))
virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_IOTUNE);
+ if (strstr(help, "discard"))
+ virQEMUCapsSet(qemuCaps, QEMU_CAPS_DRIVE_DISCARD);
}
if ((p = strstr(help, "-vga")) && !strstr(help, "-std-vga")) {
const char *nl = strstr(p, "\n");
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 7a0f191..17c5335 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -180,6 +180,7 @@ enum virQEMUCapsFlags {
QEMU_CAPS_DEVICE_TPM_PASSTHROUGH = 138, /* -tpmdev passthrough */
QEMU_CAPS_DEVICE_TPM_TIS = 139, /* -device tpm_tis */
QEMU_CAPS_TPM_MODELS = 140, /* query-tpm-models QMP command */
+ QEMU_CAPS_DRIVE_DISCARD = 141, /* -drive discard=off(ignore)|on(unmap) */
QEMU_CAPS_LAST, /* this must always be the last item */
};
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 63b9350..36f20eb 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2987,6 +2987,17 @@ qemuBuildDriveStr(virConnectPtr conn ATTRIBUTE_UNUSED,
}
}
+ if (disk->discard) {
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DRIVE_DISCARD)) {
+ virBufferAsprintf(&opt, ",discard=%s",
+ virDomainDiskDiscardTypeToString(disk->discard));
+ } else {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("discard is not supported by this QEMU binary"));
+ goto error;
+ }
+ }
+
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MONITOR_JSON)) {
const char *wpolicy = NULL, *rpolicy = NULL;
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-discard.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-discard.args
new file mode 100644
index 0000000..02e2ddb
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-discard.args
@@ -0,0 +1,8 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test \
+/usr/bin/qemu -S -M pc-0.13 -m 1024 -smp 1 -nographic -nodefaults \
+-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot dc -usb \
+-drive file=/var/lib/libvirt/images/f14.img,if=none,id=drive-virtio-disk0,discard=on \
+-device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \
+-drive file=/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso,if=none,media=cdrom,id=drive-ide0-1-0,discard=off \
+-device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-discard.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-discard.xml
new file mode 100644
index 0000000..fa38a2d
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-discard.xml
@@ -0,0 +1,36 @@
+<domain type='qemu'>
+ <name>test</name>
+ <uuid>92d7a226-cfae-425b-a6d3-00bbf9ec5c9e</uuid>
+ <memory unit='KiB'>1048576</memory>
+ <currentMemory unit='KiB'>1048576</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-0.13'>hvm</type>
+ <boot dev='cdrom'/>
+ <boot dev='hd'/>
+ <bootmenu enable='yes'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>restart</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='file' device='disk'>
+ <driver name='qemu' type='qcow2' discard='on'/>
+ <source file='/var/lib/libvirt/images/f14.img'/>
+ <target dev='vda' bus='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </disk>
+ <disk type='file' device='cdrom'>
+ <driver name='qemu' type='raw' discard='off'/>
+ <source file='/var/lib/libvirt/Fedora-14-x86_64-Live-KDE.iso'/>
+ <target dev='hdc' bus='ide'/>
+ <readonly/>
+ <address type='drive' controller='0' bus='1' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index be6c759..e09e070 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -575,6 +575,9 @@ mymain(void)
QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_COPY_ON_READ,
QEMU_CAPS_VIRTIO_TX_ALG, QEMU_CAPS_DEVICE,
QEMU_CAPS_VIRTIO_BLK_SCSI, QEMU_CAPS_VIRTIO_BLK_SG_IO);
+ DO_TEST("disk-discard",
+ QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_DISCARD,
+ QEMU_CAPS_DEVICE);
DO_TEST("disk-snapshot",
QEMU_CAPS_DRIVE, QEMU_CAPS_DRIVE_CACHE_V2, QEMU_CAPS_DRIVE_FORMAT);
DO_TEST("event_idx",
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 3a1683f..7f32661 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -255,6 +255,8 @@ mymain(void)
DO_TEST("disk-scsi-disk-vpd");
DO_TEST("disk-source-pool");
+ DO_TEST("disk-discard");
+
DO_TEST("virtio-rng-random");
DO_TEST("virtio-rng-egd");
--
1.8.1.4
11 years, 7 months
[libvirt] [Concern] Whether some clock element stability need to be check before migration?
by Xuesong Zhang
hi,
This is xuesong from libvirt-QE, which is the feature owner of stable guest ABI in rhel7.
I met one issue, but didn't know whether it is one bug or not, since in Guest ABI , some aspects belong to "a host-side configuration parameter".
So, would you please kindly help to check it? Thanks.
Description
While check the guest clock ABI stability, some scenario fails.
version
kernel-3.8.0-0.43.el7.x86_64
qemu-kvm-1.3.0-6.el7.x86_64
libvirt-1.0.3-1.el7.x86_64
reproduced
100%
Steps
1. prepare migration env on two hosts.
2. prepare one guest with the parallel.
......
<clock offset='localtime'>
<timer name='rtc' tickpolicy='catchup' track='guest'>
<catchup threshold='123' slew='120' limit='10000'/>
</timer>
<timer name='pit' tickpolicy='delay'/>
</clock>
....
3. start and dumpxml this gust
# virsh start mig
Domain mig started
# virsh dumpxml mig > mig.xml
4. Change "localtime" to "utc" in the generated xml "mig.xml".
......
<clock offset='utc'>
<timer name='rtc' tickpolicy='catchup' track='guest'>
<catchup threshold='123' slew='120' limit='10000'/>
</timer>
<timer name='pit' tickpolicy='delay'/>
</clock>
....
5. migration with the modified xml is successfully.------------------it is issue, should prompt error message.
# virsh migrate --live --xml mig.xml mig qemu+ssh://{$target host IP}/system
6. run step3 again, then change timer name "pit" to "platform". Note, maker sure only one change point in the xml. then migration with the modified xml. ----------------this result is as expect
# virsh migrate mig --live --xml mig.xml qemu+ssh://10.66.83.38/system
error: unsupported configuration: Target timer platform does not match source pit
7. run step3 again, then delete timer name "pit". Note, maker sure only one change point in the xml. then migration with the modified xml.-----------------the result is as expect
#virsh migrate mig --live --xml mig.xml qemu+ssh://10.66.83.38/system
error: unsupported configuration: Target domain timers do not match source
8. run step3 again, then change timer track from "guest" to "wall". Note, maker sure only one change point in the xml. then migration with the modified xml.
The migration is succssful.------------------------------------------------------------------------------------------------------------------it is issue, should prompt error message.
# virsh migrate --live --xml mig.xml mig qemu+ssh://{$target host IP}/system
9. run step3 again, then change timer tickpolicy from "catchup" to "delay". Note, maker sure only one change point in the xml. then migration with the modified xml.
The migration is succssful.------------------------------------------------------------------------------------------------------------------it is issue, should prompt error message.
# virsh migrate --live --xml mig.xml mig qemu+ssh://{$target host IP}/system
Actual result
The result in step 6 and 7 is as expected, the result of step 5, 8 and 9 is wrong.
Expect result
The clock element stability in step 5, 8 and 9 need to be check before migration.
Addtional info:
Below is all checks about clock in upstream 1.0.4 maint branch:
In timer check
Function virDomainTimerDefCheckABIStability only check
1.NAME :src->name != dst->name
2.PRESENT :src->present != dst->present)
3.FREQUENCY :src->name == VIR_DOMAIN_TIMER_NAME_TSC) {
if (src->frequency != dst->frequency)
}
4.MODE src->mode != dst->mode
And in another function , check
timer's numbers
5.NUMBERS : src->clock.ntimers != dst->clock.ntimers
Best Regards,
Zhang Xuesong
IRC: xuzhang
internal phone: 88393
11 years, 7 months
[libvirt] [PATCH 0/2] Check domain status before virsh suspend or resume
by John Ferlan
https://bugzilla.redhat.com/show_bug.cgi?id=906644
Added checks to both virsh suspend and virsh resume for the domain to be
in a the right state before trying the suspend/resume. Similar checks to
examples/domsuspend/suspend.c.
Although not stated in case, any thoughts on adding a --force for both?
John Ferlan (2):
virsh: Add check for domain state before attempting resume
virsh: Add check for domain state before attempting suspend
tools/virsh-domain.c | 40 +++++++++++++++++++++++++++++++---------
1 file changed, 31 insertions(+), 9 deletions(-)
--
1.8.1.4
11 years, 7 months
[libvirt] [PATCH] Add missing param to virCgroupForDriver stub
by Daniel P. Berrange
From: "Daniel P. Berrange" <berrange(a)redhat.com>
The virCgroupForDriver method recently gained an 'int controllers'
parameter, but the stub impl did not
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
Pushed as a Win32 build breaker fix
---
src/util/vircgroup.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
index dc2b431..56d56f9 100644
--- a/src/util/vircgroup.c
+++ b/src/util/vircgroup.c
@@ -984,7 +984,8 @@ out:
int virCgroupForDriver(const char *name ATTRIBUTE_UNUSED,
virCgroupPtr *group ATTRIBUTE_UNUSED,
bool privileged ATTRIBUTE_UNUSED,
- bool create ATTRIBUTE_UNUSED)
+ bool create ATTRIBUTE_UNUSED,
+ int controllers ATTRIBUTE_UNUSED)
{
/* Claim no support */
return -ENXIO;
--
1.8.1.4
11 years, 7 months