From nobody Fri Feb 14 21:55:23 2025 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 4Yvm7q3Gvpz5njpW for ; Fri, 14 Feb 2025 21:55:35 +0000 (UTC) (envelope-from peter.garshtja@ambient-md.com) Received: from mail-qv1-xf2c.google.com (mail-qv1-xf2c.google.com [IPv6:2607:f8b0:4864:20::f2c]) (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 "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Yvm7q1Nc2z3lsk for ; Fri, 14 Feb 2025 21:55:35 +0000 (UTC) (envelope-from peter.garshtja@ambient-md.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf2c.google.com with SMTP id 6a1803df08f44-6e45dd13b24so20417046d6.0 for ; Fri, 14 Feb 2025 13:55:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ambient-md-com.20230601.gappssmtp.com; s=20230601; t=1739570134; x=1740174934; darn=freebsd.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=BhjMY1W2JZhtp/sdVaRpI2+TZMq2xP2wnT70mCpdn/s=; b=gHbKOtLwSAow0wfK1P2QEjUDsM57rEnH3mBCXnav2i2PLZorq1QRnEl9u9OLUFhq+7 ttPnPEARWM1M6e3nWf6vEEaNYmbQ+DH1LgkUpdGUTKtWad3s3k8S8Tuc3F05Gu8+UJ2d KlCkurdFFEOsRvAOl/jxzQ6VUh+2Eji0V9lMADL+tdUmOfEg3Jun8kwY0fZY65fYutut aWAF1mvcejYi/oLBxDXqxedxvbJAbfV793cHLRV5svptndBufDgX4Rlt9gdOXiLzP8Eq 1K+FLFaKvrEQVWkxV7QlA4SVI3UX+PQCXmeBlMCXPB7f9FTMR1qGw299jghP1AikPfm9 bdWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739570134; x=1740174934; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=BhjMY1W2JZhtp/sdVaRpI2+TZMq2xP2wnT70mCpdn/s=; b=ZdYpqa8noZTz6G1M9J+JNSpHJqACTdRTJACE716eIeQmj9j3MFUOCZuBRC6EFSbNc+ MvfNdm52Z6S9LYGqHSjc8NWPh9FZRSxRBNhTwXGWxGrDBiDn4aNvAA6v9rj5xH4JHd/R X9orhn2Iekn5VQKO8YKQ62rsV6z/cUX/ULA7Xqb+6ltnZrl3sbJAK5jfODNHDrdy2TmD /rIgz6UXEX7c6U2tUzM/TbaambkJ1jofGhNrQxxPxAflYsoRsr9DwRx1Htr2FYBw60Qm Z1iMe9SD/37UDRLa4XneC39la+GE+JYTXO6qpXyE/QZ5G6grOutB5yje+CekqGaaRcmL Mjkg== X-Gm-Message-State: AOJu0YwayKfyVyxq/j9h5jwPYTdY/rs30CEyOllqPM4ZLTeovejqrS92 NK+3MRzZyb2ipgp+/ecUEP88UztnQ9qIBnO9KxiPfWZ7TBHaFgAiFj81qaQGVvA9ZoLf3aGXxSY m X-Gm-Gg: ASbGncvm3pb4b6x3Tly7uxGpMjdZgPm5GsklLZtM1wFfBhX3Q1Z0pgq8pU9JmdenPnh RPqZy4iHUaNlRG4qIscd1VJoOLPwi0xvfRqdH4lqu5FB0EwXpLFG1En3M4LmNfHija8U1p4DHri 4NY8vbZ464yo9TgRKP+moQEC8u/Uqbco0P4G2Bi0uAiamDI6u+4caFdm0fZDeWwfTgIKxlE83NA Pnx0sFoluYnO0wRjp4dRqRngZXcZ5Utwuzm5X2r/NmajzJ53R9eXR0wMxsuirMjeMH5HsCwr+Sm 9FB2Z1Ih4ZcYUtpDciMurxQOSYQ= X-Google-Smtp-Source: AGHT+IHGlEDzg3TsDmQe31KZRqU4xXy9hqQApeaumER7MirESX8PzlSwEAfctye/QbTwB16tLMS5lQ== X-Received: by 2002:a05:6214:29cb:b0:6e1:700e:488a with SMTP id 6a1803df08f44-6e66ccc476bmr14484626d6.22.1739570134155; Fri, 14 Feb 2025 13:55:34 -0800 (PST) Received: from [10.0.0.83] ([209.226.127.177]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e65d7a40b2sm25466766d6.58.2025.02.14.13.55.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Feb 2025 13:55:33 -0800 (PST) Content-Type: multipart/alternative; boundary="------------x6vcrPSs0YHO7KlxFzDKehy3" Message-ID: <5e1c08ca-4175-4a85-bc07-3ca73406454a@ambient-md.com> Date: Fri, 14 Feb 2025 16:55:23 -0500 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: bhyve vm and virtio-console To: Michael Gmelin Cc: freebsd-virtualization@freebsd.org References: <2a0e1b92-4d63-4061-bc37-c5e72b8ef0ed@ambient-md.com> <20250214205752.6a12dbb4.grembo@freebsd.org> Content-Language: en-US From: Petru Garstea In-Reply-To: <20250214205752.6a12dbb4.grembo@freebsd.org> X-Rspamd-Queue-Id: 4Yvm7q1Nc2z3lsk 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:15169, ipnet:2607:f8b0::/32, country:US] This is a multi-part message in MIME format. --------------x6vcrPSs0YHO7KlxFzDKehy3 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I tried with the following command, and got the same result. */usr/sbin/bhyve -H -P -A -c 1 -m 1500M \ -s 0,hostbridge \ -s 6,virtio-console,0=/tmp/vtcon.0 \ -s 31,lpc \ -l bootrom,/tmp/BHYVE_UEFI.fd \ -s 1,virtio-blk,/tmp/fbsd.img \ -s 2,virtio-net,tap0 \ tmp* I also able to connect but the bidirectional connection is not happening *socat - UNIX-CONNECT:/tmp/vtcon.0 ls * PS: if I use null modem emulation instead virtio-console, then connecting with cu is not an issue. any ideas ? Thanks On 2/14/25 14:57, Michael Gmelin wrote: > > On Fri, 14 Feb 2025 14:21:07 -0500 > Petru Garstea wrote: > >> Hi, >> I am trying to configure bhyve vm with support of virtio-console, the >> following option is added to bhyve command line >> >> *-s 3,virtio-console,port1=/test/console.sock >> >> *However when trying to connect to socket with socat trere are no >> input/ouptut is observed. >> >> Has virtio-console ever worked ? >> > Yes it works, I just tried it using sysutils/vm-bhyve (just add > virt_console0="Yes" to the configuration file). > > Based on the logs, these device settings are used by it: > > bhyve devices: > -s 0,hostbridge \ > -s 31,lpc \ > -s 4:0,virtio-blk,/dev/zvol/zroot/vms/freebsd14-test/disk0 \ > -s 5:0,virtio-net,tap0,mac=58:9c:fc:aa:aa:aa \ > -s 6:0,virtio-console,0=/vms/freebsd14-test/vtcon.0 > > I could connect to /vms/freebsd14-test/vtcon.0 using socat: > > socat - UNIX-CONNECT:/vms/freebsd14-test/vtcon.0 > > Inside the vm it's /dev/vtcon/0. > > -m > --------------x6vcrPSs0YHO7KlxFzDKehy3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit

I tried with the following command, and got the same result.

/usr/sbin/bhyve -H -P -A -c 1 -m 1500M \
-s 0,hostbridge \
-s 6,virtio-console,0=/tmp/vtcon.0 \
-s 31,lpc \
-l bootrom,/tmp/BHYVE_UEFI.fd \
-s 1,virtio-blk,/tmp/fbsd.img \
-s 2,virtio-net,tap0 \
tmp


I also able to connect but the bidirectional connection is not happening

socat - UNIX-CONNECT:/tmp/vtcon.0
ls

PS: if I use null modem emulation instead virtio-console, then connecting with cu is not an issue.

any ideas ?

Thanks

On 2/14/25 14:57, Michael Gmelin wrote:


On Fri, 14 Feb 2025 14:21:07 -0500
Petru Garstea <peter.garshtja@ambient-md.com> wrote:

Hi,
I am trying to configure bhyve vm with support of virtio-console, the 
following option is added to bhyve command line

*-s 3,virtio-console,port1=/test/console.sock

*However when trying to connect to socket with socat trere are no 
input/ouptut is observed.

Has virtio-console ever worked ?

Yes it works, I just tried it using sysutils/vm-bhyve (just add
virt_console0="Yes" to the configuration file).

Based on the logs, these device settings are used by it:

    bhyve devices:
      -s 0,hostbridge \
      -s 31,lpc \
      -s 4:0,virtio-blk,/dev/zvol/zroot/vms/freebsd14-test/disk0 \
      -s 5:0,virtio-net,tap0,mac=58:9c:fc:aa:aa:aa \
      -s 6:0,virtio-console,0=/vms/freebsd14-test/vtcon.0

I could connect to /vms/freebsd14-test/vtcon.0 using socat:

    socat - UNIX-CONNECT:/vms/freebsd14-test/vtcon.0

Inside the vm it's /dev/vtcon/0.

-m

--------------x6vcrPSs0YHO7KlxFzDKehy3--