diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 6bd02ccdd5..2bcc6d714b 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -2622,6 +2622,17 @@
Throughput limits since 1.2.11 and QEMU 1.7
+ group_name
+ The optional group_name
provides the cability
+ to share I/O throttling quota between multiple drives. This
+ prevents end-users from circumventing a hosting provider's
+ throttling policy by splitting 1 large drive in N small drives
+ and getting N times the normal throttling quota. Any name may
+ be used.
+
+ group_name since 3.0.0 and QEMU 2.4
+
+
total_bytes_sec_max_length
The optional total_bytes_sec_max_length
element is the maximum duration in seconds for the
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index bb903ef38f..2800552759 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4997,6 +4997,11 @@
+
+
+
+
+
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index b8e019ae14..14c12f89e5 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7401,6 +7401,9 @@ virDomainDiskDefIotuneParse(virDomainDiskDefPtr def,
PARSE_IOTUNE(read_iops_sec_max_length);
PARSE_IOTUNE(write_iops_sec_max_length);
+ def->blkdeviotune.group_name =
+ virXPathString("string(./iotune/group_name)", ctxt);
+
if ((def->blkdeviotune.total_bytes_sec &&
def->blkdeviotune.read_bytes_sec) ||
(def->blkdeviotune.total_bytes_sec &&
@@ -20630,6 +20633,7 @@ virDomainDiskDefFormat(virBufferPtr buf,
def->blkdeviotune.read_iops_sec_max ||
def->blkdeviotune.write_iops_sec_max ||
def->blkdeviotune.size_iops_sec ||
+ def->blkdeviotune.group_name ||
def->blkdeviotune.total_bytes_sec_max_length ||
def->blkdeviotune.read_bytes_sec_max_length ||
def->blkdeviotune.write_bytes_sec_max_length ||
@@ -20658,6 +20662,11 @@ virDomainDiskDefFormat(virBufferPtr buf,
def->blkdeviotune.size_iops_sec);
}
+ if (def->blkdeviotune.group_name) {
+ virBufferEscapeString(buf, "%s \n",
+ def->blkdeviotune.group_name);
+ }
+
FORMAT_IOTUNE(total_bytes_sec_max_length);
FORMAT_IOTUNE(read_bytes_sec_max_length);
FORMAT_IOTUNE(write_bytes_sec_max_length);
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-group-num.xml b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-group-num.xml
new file mode 100644
index 0000000000..e2a9999ee8
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-blkdeviotune-group-num.xml
@@ -0,0 +1,61 @@
+
+ QEMUGuest1
+ c7a5fdbd-edaf-9455-926a-d65c16db1809
+ 219100
+ 219100
+ 1
+
+ hvm
+
+
+
+ destroy
+ restart
+ destroy
+
+ /usr/bin/qemu
+
+
+
+
+
+ 5000
+ 6000
+ 10000
+ 11000
+ libvirt_iotune_group1
+
+
+
+
+
+
+
+
+ 5000
+ 5500
+ 3500
+ 4000
+ 6000
+ 6500
+ 7000
+ 7500
+ 2000
+ libvirt_iotune_group2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-blkdeviotune-group-num.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-blkdeviotune-group-num.xml
new file mode 120000
index 0000000000..2ed9a68317
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-blkdeviotune-group-num.xml
@@ -0,0 +1 @@
+../qemuxml2argvdata/qemuxml2argv-blkdeviotune-group-num.xml
\ No newline at end of file
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 4c7f147db6..ddd17cb1ee 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -611,6 +611,7 @@ mymain(void)
DO_TEST("usb-redir-filter-version", NONE);
DO_TEST("blkdeviotune", NONE);
DO_TEST("blkdeviotune-max", NONE);
+ DO_TEST("blkdeviotune-group-num", NONE);
DO_TEST("blkdeviotune-max-length", NONE);
DO_TEST("controller-usb-order", NONE);