From nobody Mon Aug 05 17:19:58 2024 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wd38x0xbLz5SNjV; Mon, 05 Aug 2024 17:20:01 +0000 (UTC) (envelope-from freebsd@omnilan.de) Received: from mx0.gentlemail.de (mx0.gentlemail.de [IPv6:2001:41d0:700:4a43:a25:de0:0:13]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wd38w5CMxz4kWs; Mon, 5 Aug 2024 17:20:00 +0000 (UTC) (envelope-from freebsd@omnilan.de) Authentication-Results: mx1.freebsd.org; none Received: from mh0.gentlemail.de (mh0.gentlemail.de [135.125.173.218]) by mx0.gentlemail.de (8.18.1/8.18.1) with ESMTP id 475HJxgn032505; Mon, 5 Aug 2024 17:19:59 GMT (envelope-from freebsd@omnilan.de) Received: from [172.21.3.1] (s1.omnilan.de [217.91.127.234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mh0.gentlemail.de (Postfix) with ESMTPSA id 63EE419FE; Mon, 05 Aug 2024 17:19:59 +0000 (UTC) Message-ID: <053f3382-7191-4ced-82d4-1278d5d98223@omnilan.de> Date: Mon, 5 Aug 2024 19:19:58 +0200 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: RFC: rc(8) script for bhyve(8) on FreeBSD To: Mario Marietto Cc: freebsd-current@freebsd.org, virtualization@freebsd.org References: <178d585e-2ce0-4b69-a017-8af7f9b78a57@omnilan.de> Content-Language: en-US, de-DE From: Harry Schmalzbauer Organization: OmniLAN In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16276, ipnet:2001:41d0::/32, country:FR] X-Rspamd-Queue-Id: 4Wd38w5CMxz4kWs On 2024-08-05 19:04, Mario Marietto wrote: > Hello. > > I'm also interested in writing a script to manage the bhyve vms. Even if > I suspect that my approach will be different. My idea is to ask the user > what he wants to do and then the script will configure the vm getting > the information provided by the user. > I will give a look at /etc/rc.d/bhyve,but I don't think I will study > cirrina,it seems very complicated. To avoid misunderstandings: /etc/rc.d/bhyve is not meant to 'manage' bhyve(8) VMs in the sense of configuring bhyve(8) or the host which runs the guest operating system. It's just to start/stop already defined VMs at boot time. Managing VM's means utlizing $EDITOR /etc/bhyve.d/yourvm.cfg to me. bhyve_config(5) is what /etc/rc.d/bhyve relies on and where the VM config happens. cirrina seems to be a completely different tool. From the page: »Only UEFI boot is supported, no bhyveload.« Another showstopper for me: »./cirrinactl switch set-uplink -n bridge0 -u em0« (I never use if_bridge(4) for HyperVisor networking) All you can do with /etc/rc.d/bhyve is service bhyve start [vmname] [...] service bhyve stop [vmname] [...] and expect to have all VMs running after rebooting, which you wrote a config file for and placed it into /etc/bhyve.d/ Best, -harry