From nobody Sat Feb 17 00:17:50 2024 X-Original-To: freebsd-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 4Tc8XC4tRQz5B6KQ for ; Sat, 17 Feb 2024 00:18:03 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tc8XC38bLz4rP0 for ; Sat, 17 Feb 2024 00:18:03 +0000 (UTC) (envelope-from aryeh.friedman@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a3d0d26182dso282800366b.1 for ; Fri, 16 Feb 2024 16:18:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708129082; x=1708733882; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=vMeFg43fMrkZyunHrDRXdLrw0ByenSUY5/pNznikAaY=; b=Dq/5o49k4GTygaGONuH+FnyIECn18W0dmcPq30DWQVnL1SqU+IEHCdRIdVEgnxA3rk ulVEqfBzhAvl/5aueJ5N3Oem1pFGIuR39KOSPUaezyiVLUKmEVTymKLmeWOMmX1Cvwfp 5OM4QRXs2w0jvbpUD9+k9iVddePQiCblxTVwCvZ+Ml96+tqza1CkuobcNUnRYGUjU1an WpCM/QB3qlFbtkAKxE45zylbQg9EDwINsl3TAmQ5LW862RO7wX21PtdGyaRnPUvT4KWP YO0x2SZ4PH0waI/PpTu+V2Ksyd0Fj4LyKPMPKR/ITovFHgDBjQqLVM5WMAg3JrUTrhqn lukg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708129082; x=1708733882; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vMeFg43fMrkZyunHrDRXdLrw0ByenSUY5/pNznikAaY=; b=w8/m4nhDHSBjIn2IRHUvkHYW2hVfIITCoBjIQ8d0ub7cJA6CJ0Z1IgGBaBzf0vP1dy YHuihYcutdYLL6Cx7s4CDQApa/M22HQFnwyt63oXEQiSEuFBzJLbhBSPUQ/yauzJKt3n AjTZeXT0FDlOmqFnD0WTN9a+voMjvdNu+iGIh071VjC2lkHqvk18DpW1KzrQvVPSZGGa LRdXvG2SGvfUTA67y/ud7GnP36orOxHbj+0ZMZvfZoW7CmWmnqEBANId8dVP58p1+Hc4 FIFEmnhIHLFJMetS40RyemR0e75/xWdjFs+9lV/kKGAkj88n7WIPz8gzrcG1dMPSKRF8 JXfw== X-Gm-Message-State: AOJu0YxHcgfJhIKvMNnHLPDFYb2WzP4MICObbOQKyLDu61O6zyxrNezh ZtWTu6LRi9n/nwa4vFAhqNUt1TgDPsW2sSH87sMIEICVrm1V+S2NvrHQq6C3Hod6GoLJHeE46f4 mhbD2dCcbmLWbQ7APsfQC+Eu58x8= X-Google-Smtp-Source: AGHT+IGONsm55FhzS/WjYPfOELo9G5fIR3waRJp0O9RDx+PK6pI+twzc+3RMHi5P3LlvmySh47gT6gh/gZZtNr49mmo= X-Received: by 2002:a17:906:1149:b0:a3d:f94:ebe2 with SMTP id i9-20020a170906114900b00a3d0f94ebe2mr4290923eja.76.1708129081541; Fri, 16 Feb 2024 16:18:01 -0800 (PST) List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Aryeh Friedman Date: Fri, 16 Feb 2024 19:17:50 -0500 Message-ID: Subject: Re: How to send a bhyve vm totally in background,suppressing any message produced by the bhyve script that I use. To: Mario Marietto Cc: FreeBSD virtualization Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4Tc8XC38bLz4rP0 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)[]; TAGGED_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] On Fri, Feb 16, 2024 at 7:05=E2=80=AFPM Mario Marietto wrote: > > Hello. > > I want to boot a bhyve vm that does not produce any error message or warn= ings on the screen and that it stays in the background. This is how I launc= h my Linux vm : > > bhyve -S -c sockets=3D2,cores=3D2,threads=3D2 -m 8G -w -H -A \ > -s 0,hostbridge \ > -s 1,virtio-blk,/mnt/zroot2/zroot2/bhyve/img/Linux/Ubuntu2304.img,bootind= ex=3D1 \ > -s 11,hda,play=3D/dev/dsp,rec=3D/dev/dsp \ > -s 13,virtio-net,tap19 \ > -s 14,virtio-9p,sharename=3D/ \ > -s 30,xhci,tablet \ > -s 31,lpc \ > -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CODE.fd \ > vm0:19 > /dev/null & > > > I've thought that "> /dev/null" means that every message produced by the = script would disappear,but,instead,it produces the following messages that = I want to suppress : > > marietto@marietto:/bhyve # wrmsr to register 0x140(0) on vcpu 0 > wrmsr to register 0x140(0) on vcpu 2 > wrmsr to register 0x140(0) on vcpu 4 > wrmsr to register 0x140(0) on vcpu 6 > wrmsr to register 0x140(0) on vcpu 1 > wrmsr to register 0x140(0) on vcpu 3 > wrmsr to register 0x140(0) on vcpu 5 > wrmsr to register 0x140(0) on vcpu 7 > rdmsr to register 0x64e on vcpu 1 > rdmsr to register 0x34 on vcpu 1 > rdmsr to register 0xc0011029 on vcpu 7 > Unhandled ps2 mouse command 0xe1 > Unhandled ps2 mouse command 0x0a > Unhandled ps2 mouse command 0x01 > Unhandled ps2 mouse command 0x41 > Unhandled ps2 mouse command 0x88 > rdmsr to register 0x64d on vcpu 5 > rdmsr to register 0x64d on vcpu 0 > > at this point it hangs. > > > I should press a key to have the ability to write again on the terminal. = I don't want it. Someone can help me to refine the script ? thanks. Here is a fully tested/debugged hand made script to do what you requested (added bonus is the passthrough): #!/bin/sh # # Generated by PetiteCloud 0.2.6 # # nvidia1030.rom ifconfig tap1 destroy ifconfig tap1 create ifconfig tap1 up ifconfig bridge0 addm tap1 up echo net done sleep 5 bhyvectl --destroy --vm=3D6222f881ad268c17 nohup /usr/sbin/bhyve -S -c cores=3D8 -m 8192 -AI -H -P -w -s 0:0,hostbridge -s 1,virtio-net,tap1 -s 2,ahci-hd,/dev/ada0 -s 29,fbuf,tcp=3D0.0.0.0:6048,w=3D800,h=3D600 -s 30,xhci,tablet -s 31,lpc -s 5,passthru,37/0/0 -s 6,passthru,37/0/1 -l com1,/dev/nmdm1B -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd 6222f881ad268c17&>/dev/null echo final sleep sleep 10 > > -- > Mario. --=20 Aryeh M. Friedman, Lead Developer, http://www.PetiteCloud.org