From: Masaki Kanno Subject: [PATCH] Remove temporary {kernel, ramdisk} file when VmError occurred Date: Fri, 02 Mar 2007 23:51:17 +0900 Message-ID: <76C75CDA3BADB8kanno.masaki@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-J8fhTYRaO1ZShTX1narPf" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-J8fhTYRaO1ZShTX1narPf Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Description: Mail message body 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 Best regards, Kan --Boundary-J8fhTYRaO1ZShTX1narPf Content-Type: application/octet-stream; name="Catch_VmError_in_initDomain.patch" Content-Disposition: attachment; filename="Catch_VmError_in_initDomain.patch" Content-Transfer-Encoding: base64 ZGlmZiAtciAxMzk3OTRkNTU4OTggdG9vbHMvcHl0aG9uL3hlbi94ZW5kL1hlbmREb21haW5J bmZvLnB5Ci0tLSBhL3Rvb2xzL3B5dGhvbi94ZW4veGVuZC9YZW5kRG9tYWluSW5mby5weQlU aHUgTWFyIDAxIDE3OjU5OjE3IDIwMDcgKzAwMDAKKysrIGIvdG9vbHMvcHl0aG9uL3hlbi94 ZW5kL1hlbmREb21haW5JbmZvLnB5CUZyaSBNYXIgMDIgMjA6MzE6NDAgMjAwNyArMDkwMApA QCAtMTUwMiw3ICsxNTAyLDcgQEAgY2xhc3MgWGVuZERvbWFpbkluZm86CiAgICAgICAgICAg ICBzZWxmLmluZm9bJ3N0YXJ0X3RpbWUnXSA9IHRpbWUudGltZSgpCiAKICAgICAgICAgICAg IHNlbGYuX3N0YXRlU2V0KERPTV9TVEFURV9SVU5OSU5HKQotICAgICAgICBleGNlcHQgUnVu dGltZUVycm9yLCBleG46CisgICAgICAgIGV4Y2VwdCAoUnVudGltZUVycm9yLCBWbUVycm9y KSwgZXhuOgogICAgICAgICAgICAgbG9nLmV4Y2VwdGlvbigiWGVuZERvbWFpbkluZm8uaW5p dERvbWFpbjogZXhjZXB0aW9uIG9jY3VycmVkIikKICAgICAgICAgICAgIHNlbGYuaW1hZ2Uu Y2xlYW51cEJvb3Rsb2FkaW5nKCkKICAgICAgICAgICAgIHJhaXNlIFZtRXJyb3Ioc3RyKGV4 bikpCg== --Boundary-J8fhTYRaO1ZShTX1narPf Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-J8fhTYRaO1ZShTX1narPf--