From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Bareiro Subject: Re: Modifying RAM during runtime on guest Date: Wed, 9 Sep 2009 07:20:35 -0300 Message-ID: <20090909102035.GA15296@defiant.freesoftware.org> References: <20090908205207.GC4513@defiant.freesoftware.org> <200909081618.09680.iggy@theiggy.com> Reply-To: dbareiro@gmx.net Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" To: KVM General Return-path: Received: from mail.gmx.net ([213.165.64.20]:54680 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752022AbZIIKUi (ORCPT ); Wed, 9 Sep 2009 06:20:38 -0400 Received: from defiant (defiant.freesoftware.org [10.1.0.65]) by hermes.freesoftware.org (Postfix) with ESMTP id 3DD645C for ; Wed, 9 Sep 2009 07:19:50 -0300 (ART) Content-Disposition: inline In-Reply-To: <200909081618.09680.iggy@theiggy.com> Sender: kvm-owner@vger.kernel.org List-ID: --UugvWAfsgieZRqgk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Brian. On Tuesday, 08 September 2009 16:18:09 -0500, Brian Jackson wrote: > > I'm trying to modify the amount of RAM that has some of guests. Host > > has 2.6.30 kernel with KVM-88. > >=20 > > In one of guest I didn't have problems when decreasing the amount of > > memory from 3584 MIB to 1024 MiB. This guest has 2.6.26-2-686 stock > > kernel. Also I was trying to decrease the amount RAM of another guest > > from 3584 MiB to 2048 MiB, but it didn't work. This other guest has > > 2.6.24-etchnhalf.1-686-bigmem stock kernel. Does Ballooning in guest > > require 2.6.25 or superior? > I don't know, if that kernel has a virtio-balloon driver, I'd think that > was all you need to balloon memory. Then can be that it is related to kernel that is using the guest: # uname -a Linux aprender01 2.6.24-etchnhalf.1-686-bigmem #1 SMP Mon Jul 27 03:56:49 U= TC 2009 i686 GNU/Linux # cat config-2.6.24-etchnhalf.1-686-bigmem | grep -i virtio # > > Thinking that it could be an impediment related to the kernel version > > of guest, I tried to increase the memory of another one guest with > > 2.6.26-2-686 from 512 MIB to 1024 MIB, but this didn't work either. > You can only grow memory up to the amount you specified on the command > line if you've already ballooned down. Good. Thanks for clarifying to me this detail. > So if you specify "-m 1024M" on the command line, then shrink it to 512, > you could then balloon it back up to a max of 1024. According to the tests that I was doing in guest with kernel with support for virtio, shrinking works, but when trying to return to the amount of initial memory, seems that it fails and I lose connectivity by serial console and ssh. In the guest: # uname -a Linux central 2.6.26-2-amd64 #1 SMP Sun Jul 26 20:35:48 UTC 2009 x86_64 GNU= /Linux # cat config-2.6.26-2-amd64 | grep -i virtio CONFIG_NET_9P_VIRTIO=3Dm CONFIG_VIRTIO_BLK=3Dm CONFIG_VIRTIO_NET=3Dm CONFIG_HW_RANDOM_VIRTIO=3Dm CONFIG_VIRTIO=3Dm CONFIG_VIRTIO_RING=3Dm CONFIG_VIRTIO_PCI=3Dm CONFIG_VIRTIO_BALLOON=3Dm In the host: # telnet localhost 4045 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. QEMU 0.10.50 monitor - type 'help' for more information (qemu) (qemu) info balloon balloon: actual=3D512 (qemu) balloon 256 (qemu) info balloon balloon: actual=3D256 (qemu) (qemu) balloon 512 (qemu) info balloon balloon: actual=3D36 At this moment I'm unable to connect by serial console to the guest and the ssh sessions are freeze nevertheless kvm process of the guest is running. Using a VNC client I see several messages of this type in the guest: Out of memory: kill process xxxx () score xx or a child Killed process xxxx () Finally: Kernel panic - not syncing - Out of memory and no killable processes... Thanks for your reply. Regards, Daniel --=20 Fingerprint: BFB3 08D6 B4D1 31B2 72B9 29CE 6696 BF1B 14E6 1D37 Powered by Debian GNU/Linux Squeeze - Linux user #188.598 --UugvWAfsgieZRqgk Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqngXMACgkQZpa/GxTmHTfmwwCfVYc/j+J05s9Jn8vBbDK/Ypm5 wUUAn3gCz32ISOj6DsHdIJjY2U+T2UIt =u8a4 -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk--