From owner-freebsd-questions@freebsd.org Mon May 30 18:35:09 2016 Return-Path: Delivered-To: freebsd-questions@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 89C0CB54271 for ; Mon, 30 May 2016 18:35:09 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from inet08.hamilton.harte-lyne.ca (inet08.hamilton.harte-lyne.ca [216.185.71.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "inet08.hamilton.harte-lyne.ca", Issuer "CA HLL ISSUER 01" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F3AF1DCE for ; Mon, 30 May 2016 18:35:09 +0000 (UTC) (envelope-from byrnejb@harte-lyne.ca) Received: from localhost (localhost [127.0.0.1]) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTP id B1C516221A for ; Mon, 30 May 2016 14:35:01 -0400 (EDT) X-Virus-Scanned: amavisd-new at harte-lyne.ca Received: from inet08.hamilton.harte-lyne.ca ([127.0.0.1]) by localhost (inet08.hamilton.harte-lyne.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SPhdc8sRzZsW for ; Mon, 30 May 2016 14:34:59 -0400 (EDT) Received: from webmail.harte-lyne.ca (inet04.hamilton.harte-lyne.ca [216.185.71.24]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by inet08.hamilton.harte-lyne.ca (Postfix) with ESMTPSA id 97E4662219 for ; Mon, 30 May 2016 14:34:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=harte-lyne.ca; s=dkim_hll; t=1464633299; bh=2ONEShtVZzjQeeOHRvmjUeu8d9UqoOhFKignFuvYDrs=; h=Date:Subject:From:To:Reply-To; b=WicQsZisqw2RiaZrZpxA6FahCb80fe5Qqz5REfc+4dc9aUypoLn26V8gCiaNIEzt1 uW25Gf0qsR6AsE5pZ7U5j8nztY0meOgUhpvK9NZVxNqhPvA+W57wc/Do/GYkz20E/r CZwE67GdZxlVR7imISnI4awN2npzkaTPt2LIewOc8vJYXATsCmq3dDYJUgNB2wfcvW 51qcLGKKCtRxa1aTdJu+3fLA/lF3oOErYmvismVvRNdAq0fmhTlNvuxwf7tYRQdWnj yc/gu6NhRjSIyRpTAumBDCZtazNk35/LxIrEkpv4NJJBwqbwHKWjd6UuDUOjb55zyf avUqrbbuG3kHQ== Received: from 216.185.71.44 (SquirrelMail authenticated user byrnejb) by webmail.harte-lyne.ca with HTTP; Mon, 30 May 2016 14:34:59 -0400 Message-ID: Date: Mon, 30 May 2016 14:34:59 -0400 Subject: Creating a BHyve guest From: "James B. Byrne" To: freebsd-questions@freebsd.org Reply-To: byrnejb@harte-lyne.ca User-Agent: SquirrelMail/1.4.22-4.el6 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2016 18:35:09 -0000 I am trying, without much success, to create a FreeBSD guest on a FreeBSD host, both version 10.3. These are the steps I have followed thus far (refs.: the Handbook s. 21.7 and the wiki https://wiki.freebsd.org/Jenkins/VMSetup ). To create the BHyve based VM on the FreeBSD host the following steps were followed. 1. We are using the zfs file system which combines both file-system and volume management. We first create a pool to hold our VM disk images. These are where the storage used by the VM will be created. zfs create zroot/vm 2. Next we set the mode for the VM storage pool image files to be considered devices. This provides certain improvements in performance and security as it relates to VM guests. zfs set volmode=dev zroot/vm zfs get volmode zroot/vm 3. Now we create a disk image file to hold the VM. We will name it after the vm that we intend to create (samba_dc01) so that it is readily identifiable on the host. The existing MS AD-DC can only support a 120Gbyte disk which is only 50% utilised so a 200Gbyte (-V 200G) should prove sufficient. zfs create -V 200G zroot/vm/samba_dc01.img find /dev -name samba_dc01\* /dev/zvol/zroot/vm/samba_dc01.img 4. At this point a suitable install source must be obtained. These are usually disk files that contain a CD-ROM or DVD iso9660 formatted data disk. Because of the format specification sued these are often referred to simply as isos. In this case the FreeBSD isos are found at ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.3/. The version number (10.3) naturally will change over time and so must be accounted for when specifying the url. The utility wget or curl can be used to directly download the appropriate iso image file to a suitable location on the host's file system. However the install image file is transferred it is important that the downloaded file be checked against its SHA256 or SHA512 signature as given on the source site to insure that the download is intact and is identical to the file on the source. The checksums are contained in a suitable named file provided from the host. In this case it was ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/ISO-IMAGES/10.3/CHECKSUM.SHA256-FreeBSD-10.3-RELEASE-amd64 sha256 -q /root/FreeBSD-10.3-RELEASE-amd64-dvd1.iso 3f33fc506b18d752564c3ba92419592a489fceef43f73827c42a4e4d31fd4b7d grep FreeBSD-10.3-RELEASE-amd64-dvd1.iso CHECKSUM.SHA256-FreeBSD-10.3-RELEASE-amd64 SHA256 (FreeBSD-10.3-RELEASE-amd64-dvd1.iso) = 3f33fc506b18d752564c3ba92419592a489fceef43f73827c42a4e4d31fd4b7d 5. Once the iso image for the installer is downloaded, in this case to the /root directory, and its checksum verified then the process of creating a new FreeBSD VM instance is carried out using the supplied shell script. sh /usr/share/examples/bhyve/vmrun.sh \ -c 2 -m 4096M -t tap0 \ -d /dev/zvol/zroot/vm/samba_dc01.img \ -i -I /root/FreeBSD-10.3-RELEASE-amd64-dvd1.iso \ samba_dc01 This all seems to work as documented. I configure the new vm, confirm my choices and shut down. When I attempt to restart the new system using either of the following then the attempt fails. bhyve -A -H -P -s 0:0,hostbridge \ > -s 1:0,lpc \ > -s 2:0,virtio-net,tap0 \ > -s 3:0,virtio-blk,/dev/zvol/zroot/vm/samba_dc01.img \ > -l com1,stdio -c 2 -m 4096M \ > samba_dc01 virtual machine cannot be booted or sh /usr/share/examples/bhyve/vmrun.sh \ > -c 2 -m 4096M -t tap0 \ > -d samba_dc01.img \ > samba_dc01 Launching virtual machine "samba_dc01" ... Installation CDROM image "./release.iso" is not readable I cannot see any other steps in the documentation that I have read. What am I missing or what am I doing wrong? -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3