diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml index f6606a18c..7a3ac7c39 100644 --- a/tests/data/cli/compare/virt-install-many-devices.xml +++ b/tests/data/cli/compare/virt-install-many-devices.xml @@ -43,7 +43,7 @@ - + 9 diff --git a/tests/test_cli.py b/tests/test_cli.py index 19399452f..0ad72e6b4 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -543,7 +543,7 @@ memorytune0.vcpus=0-3,memorytune0.node0.id=0,memorytune0.node0.bandwidth=60 --blkiotune weight=100,device_path=/home/test/1.img,device_weight=200,read_bytes_sec=10000,write_bytes_sec=10000,read_iops_sec=20000,write_iops_sec=20000 ---memorybacking size=1,unit='G',nodeset=0,1,nosharepages=yes,locked=yes,discard=yes,allocation.mode=immediate,access_mode=shared,source_type=file,hugepages.page.size=12,hugepages.page1.size=1234,hugepages.page1.unit=MB,hugepages.page1.nodeset=2 +--memorybacking size=1,unit='G',nodeset=0,1,nosharepages=yes,locked=yes,discard=yes,allocation.mode=immediate,access_mode=shared,source_type=file,hugepages.page.size=12,hugepages.page1.size=1234,hugepages.page1.unit=MB,hugepages.page1.nodeset=2,allocation.threads=8 --iothreads iothreads=5,iothreadids.iothread1.id=1,iothreadids.iothread2.id=2 diff --git a/virtinst/cli.py b/virtinst/cli.py index 09dea4667..2548ac11f 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -2230,6 +2230,7 @@ class ParserMemoryBacking(VirtCLIParser): cls.add_arg("source.type", "source_type") cls.add_arg("discard", "discard", is_onoff=True) cls.add_arg("allocation.mode", "allocation_mode") + cls.add_arg("allocation.threads", "allocation_threads") ################# diff --git a/virtinst/domain/memorybacking.py b/virtinst/domain/memorybacking.py index c883c57d8..c00e15863 100644 --- a/virtinst/domain/memorybacking.py +++ b/virtinst/domain/memorybacking.py @@ -34,5 +34,6 @@ class DomainMemoryBacking(XMLBuilder): access_mode = XMLProperty("./access/@mode") source_type = XMLProperty("./source/@type") allocation_mode = XMLProperty("./allocation/@mode") + allocation_threads = XMLProperty("./allocation/@threads", is_int=True) pages = XMLChildProperty(_HugepagesPage, relative_xpath="./hugepages")