Description of problem:
I cannot use the command virsh qemu-monitor-command --hmp WindowsXP_SP3 'pmemsave 0 444444 memorydump.img'
The error occurs with pmemsave as well as with memsave.
The error message given is: Could not open 'memorydump.img'
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Stop Virtual machine
2. virsh qemu-monitor-command --hmp WindowsXP_SP3 'pmemsave 0 444444 memorydump.img'
Could not open 'memorydump.img'
Successful dump of the Virtual Memory to the given filename.
Tried to dump the memory off a Windows XP Machine with SP3.
I tried to use the commands directly from the Qemu-Monitor command but that worked fine as expected.
The hypervisor is used was kvm
When run via libvirt, QEMU is run as user qemu:qemu and under a restricted SELinux/AppArmour security context. Any monitor command that involves QEMU creating files on disk is thus likely to be blocked.
libvirt does already support these monitor commands via the virDomainMemoryPeek API, but for some reason they are not wired up into virsh.
yeah I think in this case the answer is to point it at /tmp, and disable selinux