From owner-freebsd-virtualization@FreeBSD.ORG Sun Nov 3 07:18:16 2013 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F3D4CF91 for ; Sun, 3 Nov 2013 07:18:15 +0000 (UTC) (envelope-from editor@callfortesting.org) Received: from mail-pb0-f45.google.com (mail-pb0-f45.google.com [209.85.160.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CC5B12100 for ; Sun, 3 Nov 2013 07:18:15 +0000 (UTC) Received: by mail-pb0-f45.google.com with SMTP id ma3so5939203pbc.18 for ; Sun, 03 Nov 2013 00:18:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=5/scjn3PtkiFNGjF4B/VLFAPUyOlK8EBm8TmHT+ZJnk=; b=KLgbWOQhEdJ+ggJfbKr5ejZAMa0zFiYFIaunYr7JVY2cv87wss3j6aka4Zx2OYW2HM 2yC1fas9Ea/eHwv3TpixuWsdMxbMqWfDOxQjLxYfPvzx8peUUFeMiEM9s6nziDsSOMXy yVqvpSUg2bmA1AE2RejRvxqT5hWvgKFY49jcKK+QifAJHB/KNmbZT5SKm/yPYunc3Z7y hQh6bA2X/Xgf7Ms9GX3vNPdH5cJI9j64stR2VHK0v9N9uiWtawL+yIYSEr2F/X/6NPxB qvATbA/0rD4p+CFKf6sx4t5YEu1AvjV+aF1SjXoLQJvd7YraFJxDJ9V/86KvWjNqGF5s WFZg== X-Gm-Message-State: ALoCoQlTNM4nV+3lDSPIzBJ2mY5KiFwaiCUihRTE8xCY01nomdASxkDZy+DelQphlHltZfWOWnFc X-Received: by 10.69.18.171 with SMTP id gn11mr11814274pbd.63.1383463088996; Sun, 03 Nov 2013 00:18:08 -0700 (PDT) Received: from Michaels-MacBook-Pro.local (50-0-18-32.dsl.static.sonic.net. [50.0.18.32]) by mx.google.com with ESMTPSA id hz10sm20623706pbc.36.2013.11.03.00.18.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 03 Nov 2013 00:18:08 -0700 (PDT) Message-ID: <5275F8B1.105@callfortesting.org> Date: Sun, 03 Nov 2013 00:18:09 -0700 From: Michael Dexter User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: "freebsd-virtualization@freebsd.org" Subject: rc-style script for bhyve VM provisioning and management Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.14 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: Sun, 03 Nov 2013 07:18:16 -0000 Hello all from the FreeBSD 20th Anniversary Party in San Francisco, I have published a bhyve virtual machine provisioning and management framework to simplify the building and deploying of bhyve VMs during the run-up to the FreeBSD 10.0 release. As you may know, bhyve is rapidly finalizing for release in FreeBSD 10.0 and most features are finally becoming stable enough to document in a canonical manner. These scripts demonstrate the many opportunities for customization of bhyve deployments and will embrace features like OpenBSD and Linux support as soon as key components like the userland grub* arrive (currently in final testing). It will also demonstrate the use of pf to allow bhyve networking on wireless interfaces. It can be downloaded from: http://bhyve.org/bhyve-script.tar It works like a rc script but does not comply with the FreeBSD way. I am working with several developers to determine to what degree it should be compatible with existing frameworks like ezjail. ./vm0 will give the usage: usage (start|stop|load|boot|destroy|restart|list|debug mount|umount|jail|format|fetch|install|provision|wipe) Some routines like "provision" include steps like fetch (distribution sets), format (disk images or volumes) and install them. The "jail" routine demonstrates how a virtual machine can be launched using the jail(8) command, because we can, given that bhyve FreeBSD VMs are simply instances of FreeBSD with the ABI limitations of different releases. bhyve will support any vision of FreeBSD with VirtIO, specifically FreeBSD 8.4 and 8-STABLE, 9.2 and 9-STABLE, and any recent version of 10 or 11. Detailed instructions are included in the vm0 script and it is designed to simply be copied to vm1, vm2 etc. with easily-configured global variables. While tmux(1) is optional and supports both captive and detached execution, a script is included to list and attach to running VMs/sessions. A script is also provided for the easy duplication of VMs and I have tested this with up to 15 X 16 vCPU instances though far more should work without issue. Please throw everything you can at bhyve to expose any remaining flaws prior to the FreeBSD 10.0 release. All the best, Michael Dexter