From Fedora Project Wiki
Description
How to test
- edit the guest <memory> section
- # virsh edit <guest-name>
- <memory>1048576</memory>
- <currentMemory>524288</currentMemory>
- # virsh start <guest-name>
- set guest memory using non-integer
# virsh setmem <guest-name,id,uuid> abc
- set guest memory larger than max memory
# virsh setmem <guest-name,id,uuid>1248576
- reduce guest memory
# virsh setmem <guest-name,id,uuid> 655360
- reboot guest then check the memory
- # virsh shutdown <guest-name>
- # virsh start <guest-name>
- # virsh dumpxml <guest-name>
- login guest
- guest> cat /proc/meminfo | grep -i memtotal
Expected Results
- Step#1: guest started successfully
- Step#2: error: Invalid value of 0 for memory size
- Step#3: error: Requested memory size 1248576 kb is larger than maximum of 1048576 kb
- Step#4: return nothing
- Step#5: the memory of guest is approximate to 655360