From owner-freebsd-virtualization@freebsd.org Mon May 11 15:13:26 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3B6FC2E3BB4 for ; Mon, 11 May 2020 15:13:26 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) (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 49LPZr64Vcz4g41 for ; Mon, 11 May 2020 15:13:24 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-il1-x129.google.com with SMTP id b71so1990023ilg.8 for ; Mon, 11 May 2020 08:13:24 -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=pZHhyYlgmxapzWOqkjHQPyPTgo6oNCzxx/R/9sEHw0c=; b=oNK2je8Tw0YjjBfBh2wic6HVVaBRswlWYjj6R8aWLi97/mlQtp/KeDXfHz3WH3P3Wn LqAhbQDKVRsbr74Y5C+W+LWINYyy2Nfk2Vtg0qPHzKc8Y9EUDU2uqWECmCIM5EL5e4CU MuWjfT6FC6KLWOS5cyoYLJpEn+mSXuKQUpA9+KQYO9jHO30oGT9WX4wIWrPHijzQjGcF oht7f48crBiGStPYBpRikS/hkYDpJm6zCzH9lOF8ee+KY0gXhLSeoe2dHXwsexvcSCTG V6rXjvUz+wfpTEdrzPsmO+wtYb4TLWu6waya7K7FbDbq+r/yDsn+dMLFbukxYzuAy8Zq W9Mg== 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=pZHhyYlgmxapzWOqkjHQPyPTgo6oNCzxx/R/9sEHw0c=; b=m19Ep7HC+7iXbHjRaQWT1nk/Ih6J+r4liYCyhpvAwNJzAI/3UCDouMT9U704KxkmOf aMAQjqAlH7Q+9aNkp1wdYR2ieCrXGx//37Q214eGFLKi7bwV0s3u76pW3ijLYnJe/nql sw/G36bL/5SgSHEXx2Z9Szv29TGlU8jh6xtU3wQiLq9DAnQmAPOPZhlNm6NYO4cFFd9f b+LcWcJFgeSta6pPsUgxdMJ5755C7cBV5FyIouqOwVMhXsd5QGhliAWHjJQk27h0Or67 P+fjErvf3PDX4j/X+vCXwixI4Uu4pb7s/ZAZTfIhyiM+IRZj3xslfO1kS8/Nzv7cwXgV ywsQ== X-Gm-Message-State: AGi0PuYG6s81DOd38MPq8EV3jeiZbqC12Nx6VX0XYh7cZ2wdVfpY/vcW FrlJIAk93t4ecBgW4nWR66HyOswEg3SKJyqqs50= X-Google-Smtp-Source: APiQypJpwb1+gYX7+E6BuvxNbMl+N3fyM5z2d8lqJZt9+cQr5Mz7bIhdVuGN/CoNh4d8qz1EF5wqL7MpWs1wgZK/hUE= X-Received: by 2002:a92:5e16:: with SMTP id s22mr17307958ilb.81.1589210003827; Mon, 11 May 2020 08:13:23 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aryeh Friedman Date: Mon, 11 May 2020 11:13:12 -0400 Message-ID: Subject: Re: Bhyve iso To: Brandon helsley Cc: "freebsd-virtualization@freebsd.org" X-Rspamd-Queue-Id: 49LPZr64Vcz4g41 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=oNK2je8T; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::129 as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-1.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; URI_COUNT_ODD(1.00)[15]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FREEMAIL_TO(0.00)[hotmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; IP_SCORE_FREEMAIL(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[9.2.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; HTTP_TO_IP(1.00)[]; IP_SCORE(0.00)[ip: (-8.76), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.33 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, 11 May 2020 15:13:26 -0000 On Mon, May 11, 2020 at 11:00 AM Brandon helsley < brandon.helsley@hotmail.com> wrote: > What does script mean? > Refer to the man pages for each command. The 10,000 ft view of the script though is the first call to bhyve does the install and the second one restarts the machine after the install. The way each iteration is done is basically as follows: 1. Stop/destroy any existing running instances of the machine (Install only 1a. Create the file(s) needed to back the virtual hard drive(s)) 2. Set up the networking needed connect the VM into the external LAN with a valid/routable connection 3. Run bhyve 4. Do any additional book keeping needed to allow PetiteCloud (the program that generated the script) to manage the VM instance from it's web interface > Sent from Outlook Mobile > ------------------------------ > *From:* Aryeh Friedman > *Sent:* Monday, May 11, 2020 8:05:59 AM > *To:* Brandon helsley > *Cc:* freebsd-virtualization@freebsd.org < > freebsd-virtualization@freebsd.org> > *Subject:* Re: Bhyve iso > > > > On Mon, May 11, 2020 at 9:45 AM Brandon helsley < > brandon.helsley@hotmail.com> wrote: > > What is option for adding another drive? Ahci is under -s but I don't see > anything relevant. > > > Here is an example script for install FreeBSD and then rebooting the VM > after the install: > > #!/bin/sh > # > # Generated by PetiteCloud 0.2.6 > # > > truncate -s 750G /vms/pri/dfdebf870cff2e43 > ifconfig tap6 destroy > ifconfig tap6 create > ifconfig tap6 up > sleep 5 > ifconfig bridge0 addm tap6 up > bhyvectl --destroy --vm=adda5345720edee1 > /usr/sbin/bhyve -c cores=4 -m 8192 -AI -H -P -w -g 0 -s 0:0,hostbridge -s > 1,virtio-net,tap6 -s 2,ahci-hd,/vms/pri/dfdebf870cff2e43 -s > 3,ahci-cd,/vms/cds/FreeBSD-12.1-RELEASE-amd64-dvd1.iso -s 29,fbuf,tcp= > 0.0.0.0:5906,w=800,h=600 -s 30,xhci,tablet -s 31,lpc -l com1,stdio -l > bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd adda5345720edee1 > echo $!>/var/run/petitecloud/adda5345720edee1 > sleep 10 > ifconfig tap6 destroy > ifconfig tap6 create > ifconfig tap6 up > sleep 5 > ifconfig bridge0 addm tap6 up > bhyvectl --destroy --vm=adda5345720edee1 > /usr/sbin/bhyve -c cores=4 -m 8192 -AI -H -P -w -g 0 -s 0:0,hostbridge -s > 1,virtio-net,tap6 -s 2,ahci-hd,/vms/pri/dfdebf870cff2e43 -s 29,fbuf,tcp= > 0.0.0.0:5906,w=800,h=600 -s 30,xhci,tablet -s 31,lpc -l com1,/dev/nmdm6B > -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd > adda5345720edee1&>/dev/null > echo $!>/var/run/petitecloud/adda5345720edee1 > sleep 10 > > > Sent from Outlook Mobile > ------------------------------ > *From:* Aryeh Friedman > *Sent:* Monday, May 11, 2020 7:32:23 AM > *To:* Brandon helsley > *Cc:* freebsd-virtualization@freebsd.org < > freebsd-virtualization@freebsd.org> > *Subject:* Re: Bhyve iso > > > > On Mon, May 11, 2020 at 9:26 AM Brandon helsley < > brandon.helsley@hotmail.com> wrote: > > In setting up bhyve today, or at least learning how, and I'm stuck at the > part after I create with truncate the device map image. I'm supposed to put > an iso with the devicemap.img and then boot from grub. How do I complete > this last step with the iso? Could someone please help? > > > See man page for bhyve but basically what you do is you add an other drive > like you do the disks but instead of saying the block device is AHCI-HD or > VirtIOBlk you say it is AHCI-CD. > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > > > > -- > Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org > -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org