From owner-freebsd-virtualization@freebsd.org Wed May 24 15:54:50 2017 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 45C8BD7BF72 for ; Wed, 24 May 2017 15:54:50 +0000 (UTC) (envelope-from ghislain@ghislain.net) Received: from mail02.aqueos.net (mail02.aqueos.net [94.125.164.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DA10133D for ; Wed, 24 May 2017 15:54:49 +0000 (UTC) (envelope-from ghislain@ghislain.net) Received: from localhost (localhost [127.0.0.1]) by mail02.aqueos.net (Postfix) with ESMTP id 319A45C9A5C for ; Wed, 24 May 2017 17:47:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail02.aqueos.net Received: from mail02.aqueos.net ([127.0.0.1]) by localhost (mail02.aqueos.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QgrEAN_BbzSx for ; Wed, 24 May 2017 17:47:39 +0200 (CEST) Received: from [172.18.18.127] (adsl2.aqueos.com [81.56.195.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail02.aqueos.net (Postfix) with ESMTPSA id 6758D5C4037 for ; Wed, 24 May 2017 17:47:39 +0200 (CEST) To: freebsd-virtualization@freebsd.org From: ghislain Subject: bhyve with hostile guest Message-ID: Date: Wed, 24 May 2017 17:47:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: fr-FR Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 May 2017 15:54:50 -0000 Hi, Well windows or linux guests are perhaps considered hostiles anyway so... :p I have an issue, i do not like the way linux evolves and i am looking at moving to another OS but i have legacy system to still mange that i wanted to virtualize. So of course i stumbled on bhyve. I start my journey into freeBSD and at the same time virtualisation world (as i am thinking switching from linux world i need to smooth it with linux guests) and i had a little question about hostile guests. On some system like jails, containers, cgroups etc.. there exist some limit you can set to the cpu usage, ram usage and disk IO a guest can do so it do not take over the host complete ressource starving all other guest from them. I wanted to know if bhyve have some mechanics to limit usage of a guest that would go rogue (hacked or simply a bug in a script), typical limits are - network bandwidth - IO bandwidth / iops - Ram amount => this one seems pretty obvious - CPU => on this one i am not sure with the -H if we can share part of a CPU and what mode, hard limits, limit with overcommit on idle etc... as i do not see any "load balancing" options i am thinking there is not apart limiting ram amount and the cpu pinning but then 100% can be used. one bhyve frontend i looked at : vm-bhyves, has some options like : limit_pcpu="" limit_rbps="" limit_wbps="" limit_riops="" limit_wiops="" but it sems to use some outside of bhyve guru magic from the BSD kernel, docs of rctl say its process limits but i guess the VM could be just one process :) network limits could be put down farther the lane i mean this does not seems to be the bhyve realm but more the normal network Qos in the kernel that could be used on the virtual switches. So, with network out of the picture and if ram is ok as it seems what if a guest goes wild on cpu and disk io ? (lets say on a mono core system for the discution). does the world explose into flame ? I am pretty sure some of you must have had a guest run wild so it you have field experience do not hesitate to share :) best regards, Ghislain.