WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Remove temporary {kernel, ramdisk} file when VmError

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Remove temporary {kernel, ramdisk} file when VmError occurred
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Fri, 02 Mar 2007 23:51:17 +0900
Delivery-date: Fri, 02 Mar 2007 06:51:17 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

I tested the xm create command with the pygrub bootloader. When I gave 
a wrong memory parameter, a temporary kernel file and a temporary ramdisk 
file were left in the directory "/var/run/xend/boot/". 

# ls -l /var/run/xend/boot/
total 0
# xm create /etc/xen/vm1-pygrub memory=8192
Using config file "/etc/xen/vm1-pygrub".
Error: Not enough free memory and dom0_min_mem is 0, so I cannot release any 
more.  I need 8388608 KiB but only have 6147892.
# ls -l /var/run/xend/boot/
total 4072
-rw------- 1 root root 1894458 Mar  2 19:26 boot_kernel.C0dFE9
-rw------- 1 root root 2261525 Mar  2 19:26 boot_ramdisk.Sq4fww
#


When free memory is not enough, balloon.free() causes VmError exception. 
However, _initDomain() is not catching VmError exception, so 
image.cleanupBootloading() is not executed. As the result, the temporary 
kernel file and the temporary ramdisk file were left in the directory 
"/var/run/xend/boot/". 
This patch fixes _initDomain(). _initDomain() catches VmError exception, 
and executes image.cleanupBootloading(). 


Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

Attachment: Catch_VmError_in_initDomain.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] Remove temporary {kernel, ramdisk} file when VmError occurred, Masaki Kanno <=