From owner-freebsd-virtualization@freebsd.org Mon Apr 29 14:29:55 2019 Return-Path: Delivered-To: freebsd-virtualization@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 865921590FC6 for ; Mon, 29 Apr 2019 14:29:55 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-io1-xd34.google.com (mail-io1-xd34.google.com [IPv6:2607:f8b0:4864:20::d34]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D60A84B70 for ; Mon, 29 Apr 2019 14:29:55 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: by mail-io1-xd34.google.com with SMTP id y6so9116865ior.5 for ; Mon, 29 Apr 2019 07:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aFlI5HX/kqrNOAYhfHscIlLGGmFWb4JE7kKMSURK0+0=; b=LtVZE1ozKgJMP7oWrOln+MshjCnaOfUDshjPmPGzBICVHXWGOF4DUi9LnxQmBXbebS Okehkr/ao3WaRYU0ehTgvXfzzE44D1bDSiuE2oTa5MIyGPsK1zGNpysshvCo2vHBTqxf nnJVe8eHK/iFC7ADdnShYah7AxxzAG24clfZwIsfOfCKnQ/J5LlDa00KCqYj8aIJVcUL KF7xW8uS2Ujj8mDapkkp4YhT9DJJG21ksEH/ia3iIFcCxnfDCcR9Vgq/Sdbn8YbzugRb 6O1Ud8i8uSE7Q3zgg0ZH5boSVjquSJclFmSEZQIsChvJ/Pah5kmt/M7iB8J+LaExAX8q AHBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aFlI5HX/kqrNOAYhfHscIlLGGmFWb4JE7kKMSURK0+0=; b=rwqBryXKa0kQXbkBVUtq+hW+ZSJUJlp1UDYswEip4AixuhRY0ymsxDVvoSp93I9Uz1 Ek6Rh449fWKcETtCwrCHMUy6Kn3rMNiUMrlA2CAWVOU/j/HnFXjdZnliN430F9Ts4Yg+ Ub4zDG+r5IcHyjgSVT06mCUhUnmTkD4YrgV6o5lwMd2hPhajXtDr5ZaHRsBfiGXPmY3X CxpPxz3vN8YA3Oq6Du4JSp5IL7c+XNwZ3X1GRVdB4LgBE/oQ9WFjPktywGcUlfc/74sq MBXdjAStttswZ3tsDxoMZNi7zeihDHa9Ni8Sag7LyNOnls+qKlIj1XY4dhBqUC1oN5jG LtKQ== X-Gm-Message-State: APjAAAV8C3HQgBW6tMH02boBvZA5PenxDNgaodH0JD1LevyuUY5N5ZUi D5j2NgRi2xSaLH4LI+J8J9MOfe1fYzSd3P95K4vO8iad X-Google-Smtp-Source: APXvYqyIhgHdRH3l/PNioPVmiAIeYdC//K+EwzrWc0mu8vMeOw2pQMgRUh0UDgShaL2Uqjxj9f9zTbkb0eIPv+Bb3tU= X-Received: by 2002:a5d:9f4c:: with SMTP id u12mr1268991iot.72.1556548194287; Mon, 29 Apr 2019 07:29:54 -0700 (PDT) MIME-Version: 1.0 References: <20190428044118.GA46284@admin.sibptus.ru> <1DE7A90B-E3AB-4F1E-9A3A-981B18751F8E@punkt.de> <20190429082408.GA84142@admin.sibptus.ru> In-Reply-To: <20190429082408.GA84142@admin.sibptus.ru> From: Adam Date: Mon, 29 Apr 2019 09:29:42 -0500 Message-ID: Subject: Re: [vm-bhyve] shutting down VMs and kern.init_shutdown_timeout To: Victor Sudakov Cc: FreeBSD virtualization X-Rspamd-Queue-Id: 1D60A84B70 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.970,0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 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: Mon, 29 Apr 2019 14:29:55 -0000 On Mon, Apr 29, 2019 at 3:24 AM Victor Sudakov wrote: > Patrick M. Hausen wrote: > > > > > Am 28.04.2019 um 06:41 schrieb Victor Sudakov : > > > "if the /etc/rc.shutdown does not terminate within 120 seconds, init > will > > > terminate it. The timeout can be configured via the sysctl variable > > > kern.init_shutdown_timeout.=E2=80=9C > > > > What=E2=80=99s keeping you from increasing that timeout for your > > particular requirements? > > Is that really necessary? Am I correct assuming that any VM is supposed > to shut down within 2 minutes or else the bhyve processes will be > killed? Or is this kern.init_shutdown_timeout only about the rc.shutdown > script itself and not its children? > FreeBSD is tuned as a general purpose server OS. If you find the defaults don't meet your needs, you can change them. That's why tunables exist. > > IMHO 2 minutes are a reasonable > > default for a system that does not run hypervisor VMs - > > which is probably the vast majority. > > > > Anyone with the knowledge to implement a virtualized > > environment > > The lack of information about this caveat in > https://wiki.freebsd.org/bhyve, man vm-bhyve, > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/virtualization= -host-bhyve.html > and other sources suggests that this particular knowledge may be > limited. Other hypervisors (non-bhyve) probably wait for all VMs to stop. > RH implemented this relatively recently. https://bugzilla.redhat.com/show_bug.cgi?id=3D1334982 > can simply set that to a more suitable value, > > can=E2=80=99t he/she? > > Yes if they know about it. There should be a warning somewhere in the > documentation if we want to be serious about FreeBSD as a hypervisor. > > Or better still, a warning that rcshutdown_timeout (if set) and > kern.init_shutdown_timeout can be too low when running vm-bhyve and > such is desirable. > Why don't you simply write a wrapper script which calls shutdown after shutting down guests? I doubt many admins on any hypervisor are gratuitously calling shutdown on host with important guests running. --=20 Adam