From owner-freebsd-virtualization@freebsd.org Wed May 13 15:26:20 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 EA77F2F8F6C for ; Wed, 13 May 2020 15:26:20 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-io1-xd2e.google.com (mail-io1-xd2e.google.com [IPv6:2607:f8b0:4864:20::d2e]) (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 49Mdmq251Kz4BG6 for ; Wed, 13 May 2020 15:26:19 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: by mail-io1-xd2e.google.com with SMTP id w25so3789570iol.12 for ; Wed, 13 May 2020 08:26:19 -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=6SNypDpAWcS6rLBU2xilMGwTzQHVJdeclRsLZMyHYcM=; b=VSyeQukyZeixh9yl8Z8+/0fC4iONIwoKFAAhxduGQKP+oVmy8tAUXsN17ZMZtCBoOH hGbqXzNAaKRGrvwfOoHTfLrRaaYaI+hjwtd9m08em9HZPAwuePcb3l/ANwvTj+u9gVPn St16+4W4aRjWabh6CVi6ve9/w63fUFTQkyB/Xk0KcWo1WTDmgepYbRsHLpu3zHAt42K6 JP48JTOVE/W2hZRN3vsM1l5sL/Eto8fhpPMxXlJQ27AvdBcWHjA/pg8i3qlY92VyVR5A DCrhurN4NxHNmil/1a+K2NKDpgFF8KR7LYWxbAXuTwY4MtUaILtNAXo2QYrFpHwLbJtt CzEA== 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=6SNypDpAWcS6rLBU2xilMGwTzQHVJdeclRsLZMyHYcM=; b=cj1CnflXsppQ5xpR8NjOyNXucHVt5AoydPDReWVzv5aSKuQwVYlahf8m46ud6jnT3j NA761MH1RW4dY+VZ1r4uw+tRFlTaplCYLxpGneOJOZqbLbhZan4zth1u7sQoXRAuq/wh KsXSCJ9fcFSxYOZCOjmcJ1/sUd2WZp7Qoc1t1ymvR3cHCD7xzHFc1jHWnIgjgVTAa8Hj AI3IPES8N+rvLb+eWUg4z/viTuKqS1t/rcuvELsCJ/CN+qA+M+d0ATM/CJk0cnzRDjwu vJxNg2IxrTVny9MwFgFk3lGtavyQw2DgWvJnoT5xOkJL1eLhy5q5cBqH3KsbvEhNJqYd 94zQ== X-Gm-Message-State: AGi0PuZfEay5LP5VJ248UXUrq+TGdPY3eecH9Ok08zeO17t8T/7Xukx4 64BW5HawRRGkXHug5A7/tykjqhsKdr5wvsztv34= X-Google-Smtp-Source: APiQypLhknUZ97cxFKHzTBP8H/r0GYjAHZtSv6OpjA4zW/y4KLFlHi/m0Vhp86VbiXEdwJGQ1yVwIX/NLZf/+kCKVkA= X-Received: by 2002:a6b:bc85:: with SMTP id m127mr25135617iof.89.1589383578143; Wed, 13 May 2020 08:26:18 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Aryeh Friedman Date: Wed, 13 May 2020 11:26:06 -0400 Message-ID: Subject: Re: Bhyve iso To: Brandon helsley Cc: "freebsd-virtualization@freebsd.org" X-Rspamd-Queue-Id: 49Mdmq251Kz4BG6 X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=VSyeQuky; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of aryehfriedman@gmail.com designates 2607:f8b0:4864:20::d2e as permitted sender) smtp.mailfrom=aryehfriedman@gmail.com X-Spamd-Result: default: False [-2.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:c]; FREEMAIL_FROM(0.00)[gmail.com]; 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)[]; IP_SCORE(0.00)[ip: (-6.07), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.42), country: US(-0.05)]; 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)[e.2.d.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)[]; 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: Wed, 13 May 2020 15:26:21 -0000 On Wed, May 13, 2020 at 11:05 AM Brandon helsley < brandon.helsley@hotmail.com> wrote: > So a script is a list of commands? I looked at petite cloud and wasn't > sure what it is. Does it generate a script that is a list of commands? > Yes a script, in its simplest form (Unix shell scripts are Turing complete and thus in theory can do anything is possible to do on a general purpose computer), is a list of commands. PetiteCloud is a web (and as soon I get back to it in any serious way API frontend) to bhyve and other hypervisors. In order to do it's work it generates scripts and runs them (this was a purposeful design decision so the user can customize the script later and it also off loads as much of the work as possible onto the underlaying OS, thus the name petite). In the jargon of the web page this is the cloud foundation layer on which you can layer higher level cloud computing services on. > > Sent from Outlook Mobile > ------------------------------ > *From:* Aryeh Friedman > *Sent:* Monday, May 11, 2020 9:13:12 AM > *To:* Brandon helsley > *Cc:* freebsd-virtualization@freebsd.org < > freebsd-virtualization@freebsd.org> > *Subject:* Re: Bhyve iso > > > > 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 > -- Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org