From owner-freebsd-emulation@FreeBSD.ORG Mon Aug 9 21:15:39 2010 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B0381065676 for ; Mon, 9 Aug 2010 21:15:39 +0000 (UTC) (envelope-from bounces@nabble.com) Received: from kuber.nabble.com (kuber.nabble.com [216.139.236.158]) by mx1.freebsd.org (Postfix) with ESMTP id 52CD78FC08 for ; Mon, 9 Aug 2010 21:15:39 +0000 (UTC) Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1OiZh4-0000P9-Jn for freebsd-emulation@freebsd.org; Mon, 09 Aug 2010 14:15:38 -0700 Message-ID: <29392196.post@talk.nabble.com> Date: Mon, 9 Aug 2010 14:15:38 -0700 (PDT) From: Hubert Tournier To: freebsd-emulation@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: hubert@frbsd.org References: Subject: Re: VirtualBox: out of swap space X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Aug 2010 21:15:39 -0000 Hello, Samuel Mart=C3=ADn Moro wrote: > Sometimes, when I start a VM, all other running VM stop Never had that. Though, when I can only launch one VM, it usually means tha= t there's a discrepency between my running FreeBSD kernel, FreeBSD userland, VirtualBox kmod and/or VirtualBox. Syncing all of that usually solves the issue. Samuel Mart=C3=ADn Moro wrote: >=20 > I see a few 'pid xxxx (VirtualBox), uid 0, was killed: out of swap space' > I've got 8Gb of RAM, and so assumed I wouldn't need any swap. >=20 Just compute the free memory space after booting, without VirtualBox loaded (you can see that with top or the following snippet): PAGES_FREE=3D`sysctl -n vm.stats.vm.v_free_count` PAGES_INACTIVE=3D`sysctl -n vm.stats.vm.v_inactive_count` PAGES_CACHE=3D`sysctl -n vm.stats.vm.v_cache_count` PAGES_LIBRES=3D`expr ${PAGES_FREE} + ${PAGES_INACTIVE} + ${PAGES_CACHE}` TAILLE_PAGES=3D`sysctl -n vm.stats.vm.v_page_size` MEMOIRE_LIBRE=3D`expr ${PAGES_LIBRES} \* ${TAILLE_PAGES} / 1048576` echo "${MEMOIRE_LIBRE}M free memory" Then subtract, for each VM, the RAM requested plus 100 MB, and 60 MB for th= e two VirtualBox processes (rough values for headless VM). If you are already negative (without doing anything else), then you will either need to add swap (if you don't mind low performances) or reduce the number of running VM or their memory requirements. Samuel Mart=C3=ADn Moro wrote: > Have I to reinstall my server to add some swap? (and if so, how much?!) >=20 No, you just need to add a swap device somewhere. See http://www.freebsd.org/doc/handbook/adding-swap-space.html in the handbook. Samuel Mart=C3=ADn Moro wrote: > Second problem: When I'm creating a disk (in VirtualBox) [...] these > guests display some gvfs errors, about not finding ad0. If they don't find ad0, are you sure you declared an IDE controller(s) and disk(s) in your guest VMs? (IDE=3Dad0 through ad3, SATA=3Dad4 and above). Samuel Mart=C3=ADn Moro wrote: > I could have finished already if I just had installed a Linux host in the > first place [...] Is there some hope sticking with BSD? [...] I'm > seriously thinking on dropping that BSD idea, and choosing some random > linux to make it work... You should use the OS you're most comfortable with... or be prepared to mak= e some efforts! At least if you want people to help you... Regards, Hubert --=20 View this message in context: http://old.nabble.com/VirtualBox%3A-out-of-sw= ap-space-tp29389270p29392196.html Sent from the freebsd-emulation mailing list archive at Nabble.com.