diff --git a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml index 4e14ef04..b18b3baa 100644 --- a/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml +++ b/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml @@ -29,6 +29,8 @@ + + 4 @@ -212,6 +214,8 @@ + + 4 diff --git a/tests/clitest.py b/tests/clitest.py index 2b175832..013953a1 100644 --- a/tests/clitest.py +++ b/tests/clitest.py @@ -393,7 +393,7 @@ cache.mode=emulate,cache.level=3 \ --numatune 1-3,4,mode=strict \ --memtune hard_limit=10,soft_limit=20,swap_hard_limit=30,min_guarantee=40 \ --blkiotune weight=100,device_path=/home/test/1.img,device_weight=200 \ ---memorybacking size=1,unit='G',nodeset='1,2-5',nosharepages=yes,locked=yes \ +--memorybacking size=1,unit='G',nodeset='1,2-5',nosharepages=yes,locked=yes,access_mode=shared,source_type=anonymous \ --features acpi=off,eoi=on,privnet=on,hyperv_synic=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=1234,vmport=off,pmu=off,vmcoreinfo=on \ --clock offset=utc,hpet_present=no,rtc_tickpolicy=merge \ --sysinfo type=smbios,bios_vendor="Acme LLC",bios_version=1.2.3,bios_date=01/01/1970,bios_release=10.22 \ diff --git a/virtinst/cli.py b/virtinst/cli.py index 1d5c8a71..35b466fa 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -1422,6 +1422,8 @@ ParserMemoryBacking.add_arg("page_unit", "unit") ParserMemoryBacking.add_arg("page_nodeset", "nodeset", can_comma=True) ParserMemoryBacking.add_arg("nosharepages", "nosharepages", is_onoff=True) ParserMemoryBacking.add_arg("locked", "locked", is_onoff=True) +ParserMemoryBacking.add_arg("access_mode", "access_mode") +ParserMemoryBacking.add_arg("source_type", "source_type") ################# diff --git a/virtinst/domain/memorybacking.py b/virtinst/domain/memorybacking.py index cef95337..c0967687 100644 --- a/virtinst/domain/memorybacking.py +++ b/virtinst/domain/memorybacking.py @@ -22,3 +22,5 @@ class DomainMemoryBacking(XMLBuilder): page_nodeset = XMLProperty("./hugepages/page/@nodeset") nosharepages = XMLProperty("./nosharepages", is_bool=True) locked = XMLProperty("./locked", is_bool=True) + access_mode = XMLProperty("./access/@mode") + source_type = XMLProperty("./source/@type")