From owner-freebsd-virtualization@FreeBSD.ORG Mon Jan 27 10:09:20 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 282565AE for ; Mon, 27 Jan 2014 10:09:20 +0000 (UTC) Received: from mail-pd0-f180.google.com (mail-pd0-f180.google.com [209.85.192.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id ED60015A5 for ; Mon, 27 Jan 2014 10:09:17 +0000 (UTC) Received: by mail-pd0-f180.google.com with SMTP id x10so5558747pdj.39 for ; Mon, 27 Jan 2014 02:09:11 -0800 (PST) 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=7xJVdJRQkYoEyhbTWqdy+VGd+U+7yz2l2c7/KVZHTiY=; b=KvIq2agiJItftDtOyxuDZZ5roxp4tiqxEECyinQqGoa/rA2PXsG9PcRIFigWfQdVug X0jiX+mVIqdxA+uTrRpEWNEU1UIQHWUk1o30LOHEbtD3q3g7ZUNN67hitqCLp+nLEHmG rsNOgl2L8RPSdz6r3wlK0nGM1BjZo+DYHDIu8QIWfHNyfnrasIB8YxCdIcdXm/FL8eY5 nrE7i4ilUCtQwKPEQXIy8YzuslD06+mNc8636Psg79IMFJpLM/r8JV6ZmPN6v5F2q6Vd xV+HfXwTBmokLW05TeF35NKCQAvfSiNGsTIXU4B+u2R3sFQcIsGz+OnOHa0rvIkiYDs/ bZBQ== X-Gm-Message-State: ALoCoQn+WtBFqhSigiHsC+qTOiRWXopjTVX7XEBaew99U1diff/oRds/gYzghYPxLwDj3wbwtEQi X-Received: by 10.68.241.198 with SMTP id wk6mr29345818pbc.11.1390817350926; Mon, 27 Jan 2014 02:09:10 -0800 (PST) Received: from Michaels-MacBook-Pro.local (c-98-246-202-204.hsd1.or.comcast.net. [98.246.202.204]) by mx.google.com with ESMTPSA id xs1sm81370344pac.7.2014.01.27.02.09.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Jan 2014 02:09:10 -0800 (PST) Message-ID: <52E63047.3040709@callfortesting.org> Date: Mon, 27 Jan 2014 02:09:11 -0800 From: Michael Dexter User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: "freebsd-virtualization@freebsd.org" Subject: CFT: vmrc Virtual Machine rc script Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.17 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, 27 Jan 2014 10:09:20 -0000 Hello all, For the one-week anniversary of bhyve's release, I wish to share the next iteration of my virtual machine scripts that have evolved from a 2005 jail rc/disk image framework to a FreeBSD 9.0 bhyve binary and VM build script to a 10.* sequential provision script. It's primary purpose is to facilitate the exposure of bugs in bhyve and related FreeBSD components but you may find it useful for continuous VM use or for integration into your own scripts. Because bhyve is only the latest multiplicity solution on FreeBSD, this rc script includes basic jail and qemu support and could include chroot, simh and GXemul support. Of these, QEMU is intended to help prepare OSs like OpenBSD that require VirtIO and console adjustments prior to booting under bhyve. Synopsis: Unpack vmrc.tar Run 'sh install.sh' or perform the steps manually Verify your host_nic and host_zpool in /usr/local/etc/vm.conf /usr/local/etc/rc.d/vm (Show usage) /usr/local/etc/rc.d/vm provision vm0 (Note: /usr/local/vm/vm0/vm0.conf) (Fetches OS install media, formats disk, installs to disk) /usr/local/etc/rc.d/vm start vm0 (Loads and boots vm0) Alternatively: /usr/local/etc/rc.d/vm iso vm0 (Fetches and boots and ISO image) "ISO" mode will prepare a disk image to install the OS to and includes fetch support for FreeBSD, Ubuntu and CentOS. Manual scripts exist in install/ to fetch FreeNAS, pfSense and OpenBSD. Status: Know issues and known desired features are at the end of instructions.txt plus various "fix:" notes throughout the script. This is not mature enough for packaging yet but does some things quite reliably and is ready for feedback. Because development is ongoing, I invite you to mail me about issues directly and I can post it to something like GitHub if there is interest. Please read the instructions.txt to avoid FAQ's and I have done my best to make the script itself readable. Site: http://bhyve.org/vmrc/ Download: http://bhyve.org/vmrc/vmrc.tar (latest version) Thank you Neel, Peter, John and Tycho for your hard work on bhyve. Thank you Devin for greatly improving this script and Allan at ScaleEngine for testing it and providing resources for bhyve's overall improvement. Thank you for testing bhyve! Michael