|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-devel
[Xen-devel] [PATCH] Add memory size checking for xm create/mem-set	comma
 
Hi,
The "xm create" command does not check the value of memory size 
now. The "xm mem-set" command does not check, too. 
When I tested the "xm create" and the "xm mem-set" command by 
setting an obviously wrong value to the memory size, the results 
were as follows. 
# xm create /xen/vm1.conf memory=0
Using config file "/xen/vm1.conf".
Error: (22, 'Invalid argument')
# xm create /xen/vm1.conf memory=-1
Using config file "/xen/vm1.conf".
Error: (22, 'Invalid argument')
# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      506     2 r-----   108.4
vm1                                5      128     1 -b----    31.3
# xm mem-set vm1 0
# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      506     2 r-----   109.2
vm1                                5       27     1 -b----    31.8
 *The following message was output to the console of domU.
   Out of Memory: Kill process 2 (migration/0) score 0 and children.
# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      506     2 r-----   159.2
vm1                                7      128     1 -b----    31.6
# xm mem-set vm1 -1
# xm list
Name                              ID Mem(MiB) VCPUs State  Time(s)
Domain-0                           0      506     2 r-----   159.9
vm1                                7       -1     1 -b----    31.6
I think that the xm/xend should check the obviously wrong memory 
size, and should show an error message. 
This patch adds the checking of obviously wrong memory size 
about the "xm create" and "xm mem-set" command. 
# xm create /xen/vm1.conf memory=0
Using config file "/xen/vm1.conf".
Error: invalid memory size
# xm create /xen/vm1.conf memory=-1
Using config file "/xen/vm1.conf".
Error: invalid memory size
# xm mem-set vm1 0
Error: Invalid memory size
# xm mem-set vm1 -1
Error: Invalid memory size
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Best regards,
 Kan
 
 
memory_size.patch 
Description: Binary data 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread>
 |  
- [Xen-devel] [PATCH] Add memory size checking for xm create/mem-set	command,
Masaki Kanno <=
 
 
 |  
  
 | 
    | 
  
  
    |   | 
    |