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/
Home Products Support Community News


[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

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 
This patch fixes _initDomain(). _initDomain() catches VmError exception, 
and executes image.cleanupBootloading(). 

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

Best regards,

Attachment: Catch_VmError_in_initDomain.patch
Description: Binary data

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Remove temporary {kernel, ramdisk} file when VmError occurred, Masaki Kanno <=