Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Feb 2024 19:17:50 -0500
From:      Aryeh Friedman <aryeh.friedman@gmail.com>
To:        Mario Marietto <marietto2008@gmail.com>
Cc:        FreeBSD virtualization <freebsd-virtualization@freebsd.org>
Subject:   Re: How to send a bhyve vm totally in background,suppressing any message produced by the bhyve script that I use.
Message-ID:  <CAGBxaXm4Vw_tjY0K%2BBBPTHo8n=JhrtsNMb3C3tv0sfRHMg2W=w@mail.gmail.com>
In-Reply-To: <CA%2B1FSiiYEp4g-8tyUWiQ4yz-C-V1UmpndRTomNOhouqzX6kZjw@mail.gmail.com>
References:  <CA%2B1FSiiYEp4g-8tyUWiQ4yz-C-V1UmpndRTomNOhouqzX6kZjw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Feb 16, 2024 at 7:05=E2=80=AFPM Mario Marietto <marietto2008@gmail.=
com> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGBxaXm4Vw_tjY0K%2BBBPTHo8n=JhrtsNMb3C3tv0sfRHMg2W=w>