Bug 728806 - Memsave,pmemsave command not usable from virsh with qemu-monitor-command
Summary: Memsave,pmemsave command not usable from virsh with qemu-monitor-command
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-07 19:48 UTC by flying
Modified: 2016-03-23 13:09 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-23 13:09:45 UTC


Attachments (Terms of Use)

Description flying 2011-08-07 19:48:17 UTC
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):
0.8.8


Steps to Reproduce:
1. Stop Virtual machine
2. virsh qemu-monitor-command --hmp WindowsXP_SP3 'pmemsave 0 444444 memorydump.img' 

  
Actual results:
Could not open 'memorydump.img'

Expected results:

Successful dump of the Virtual Memory to the given filename.


Additional info:

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.

Comment 1 flying 2011-08-07 19:52:59 UTC
The hypervisor is used was kvm

Comment 2 Daniel Berrangé 2011-08-08 09:28:40 UTC
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.

Comment 3 Cole Robinson 2016-03-23 13:09:45 UTC
yeah I think in this case the answer is to point it at /tmp, and disable selinux


Note You need to log in before you can comment on or make changes to this bug.