Bug 698164

Summary: Guest domain will be dead, after set a few memory
Product: Red Hat Enterprise Linux 5 Reporter: wangyimiao <yimwang>
Component: libvirtAssignee: Libvirt Maintainers <libvirt-maint>
Status: CLOSED NOTABUG QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 5.7CC: berrange, ccui, dyuan, eblake, jyang, llim
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-04-20 11:49:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
guest domain console info none

Description wangyimiao 2011-04-20 10:47:44 UTC
Created attachment 493431 [details]
guest domain console info

Description of problem:
Guest domain will be dead ,after set a few memory.

Version-Release number of selected component (if applicable):
libvirt-0.8.2-18.el5
kernel-2.6.18-252.el5
kvm-qemu-img-83-229.el5

How reproducible:
5/5

Steps to Reproduce:

1.Start a RHEL domain guest.

# virsh start r6.0
Domain r6.0 started

2.After guest full started,set current memory down to a few value
   
# virsh setmem r6.0  5200


Actual results:
Guest domain will be dead, after set a few memory

Expected results:
After set a few memory to domain guest, the guest will be works fine or can not set that few values.

Additional info:
Snapshot please sees the attachment.

Comment 1 Daniel Berrangé 2011-04-20 11:00:27 UTC
> # virsh setmem r6.0  5200


You have told the guest OS that it can only use 5 MB of memory. It is now in complete swap-death hell and will never record.  This is expected behaviour if you set such a memory target that is orders of magnitude below what the OS can cope with.

Comment 2 wangyimiao 2011-04-20 11:35:16 UTC
Hi 'Daniel',

 If 'virsh' can support set 5 MB memory for guest ,the guest domian will auto kill  process. And that may be let some data lost and destroy domain guest.
so I think this is a bug,virsh should give a waring or error message for user and stop user do that dangerous operations.

Comment 3 wangyimiao 2011-04-20 11:39:35 UTC
So I reopen it.

Comment 5 Daniel Berrangé 2011-04-20 11:49:16 UTC
Every guest OS has a different minimal level of memory. So if virsh attempted to enforce any 'minimum' level, it would be too large for some OS and too small for other OS. It can't win, so the only option is not to enforce a minimum limit & let the admin decide what is appropriate.