Re: anyone able to bhyve openbsd 7.0 ?

2021-11-12 Thread Dustin Marquess
On Fri, Nov 12, 2021 at 7:00 PM tech-lists  wrote:
>
> Hi,
>
> I seem unable to bhyve install OpenBSD 7.0. I'm running recent
> stable/13: stable/13-n247974-1da2deab7c2
>
> The command I'm running is
>
> % sudo bhyve -AHP -s 0:0,hostbridge -s 31:0,lpc \
> -s 2:0,virtio-net,tap0 -s 3:0,virtio-blk,./obsd70.img \
> -s 4:0,ahci-cd,/usr/home/REDACTED/isos/OpenBSD/amd64/cd70.iso -c 4 -m 4096M \
> -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,wait \
> -s 30,xhci,tablet -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI_CSM.fd 
> \
> openbsd70

I use install70.img (not .iso) as followed in
https://wiki.freebsd.org/bhyve/OpenBSD and that works for me. I do
have to manually enter:

set com tty0

At the boot prompt manually. After install, however, I don't seem to have to.

-Dustin



Re: anyone able to bhyve openbsd 7.0 ?

2021-11-12 Thread Dustin Marquess
On Fri, Nov 12, 2021 at 8:19 PM tech-lists  wrote:
>
> Hi,
>
> On Fri, Nov 12, 2021 at 07:25:12PM -0600, Dustin Marquess wrote:
> >
> >set com tty0
> >
> >At the boot prompt manually. After install, however, I don't seem to have to.
>
> I don't seem to be able to get to the boot prompt.
>
> Following the instructions on https://wiki.freebsd.org/bhyve/OpenBSD like so:
>
> % sudo bhyve -c 2 -m 4G -w -u -H \
> -s 0,amd_hostbridge \
> -s 3,ahci-hd,/usr/home/REDACTED/isos/OpenBSD/amd64/install70.img \
> -s 4,virtio-blk,./obsd70.img \
> -s 5,virtio-net,tap0 \
> -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,vga=off,wait \
> -s 30,xhci,tablet \
> -s 31,lpc -l com1,stdio \
> -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
> openbsd70
>
> [console output]
> fbuf frame buffer base: 0x94380 [sz 16777216]
>
> [in another terminal, do vncviewer 127.0.0.1:5900]
>
> BdsDxe: failed to load Boot0001 "UEFI BHYVE SATA DISK
> BHYVE-A09F-F442-FB09" from
> PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0x,0x0): Not Found
> BdsDxe: failed to load Boot0002 "UEFI Misc Device" from
> PciRoot(0x0)/Pci(0x4,0x0): Not Found
>
> >>Start PXE over IPv4.
>PXE-E16: No valid offer received.
>BdsDxe: failed to load Boot0003 "UEFI PXEv4 (MAC:00A098D26B6B)" from
>PciRoot(0x0)/Pci(0x5,0x0)/MAC(00A098D26B6B,0x1)/IPv4
>(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0): Not Found
>
>>>Start HTTP Boot over IPv4.
>  Error: Could not retrieve NBP file size from HTTP server.

I'm not using VNC at all:

bhyve -A -D -H -P -w -S -u -c 2 -m 1G \
-s 0,amd_hostbridge \
-s 3,virtio-blk,/dev/zvol/tank/vm/vpn \
-s 10,virtio-net,tap0,mac=1e:17:37:23:2f:cb \
-s 20,virtio-rnd \
-s 31,lpc \
-l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
vpn

-Dustin



Re: anyone able to bhyve openbsd 7.0 ?

2021-11-12 Thread Dustin Marquess
Oops, I forgot I had the .img commented out above (I only uncomment it
to boot the updater):

bhyve -A -D -H -P -w -S -u -c 2 -m 1G \
-s 0,amd_hostbridge \
-s 3,virtio-blk,/usr/local/vm/vpn/install70.img \
-s 4,virtio-blk,/dev/zvol/tank/vm/vpn \
-s 10,virtio-net,tap0,mac=1e:17:37:23:2f:cb \
-s 20,virtio-rnd \
-s 31,lpc \
-l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
vpn

-Dustin

On Fri, Nov 12, 2021 at 8:26 PM Dustin Marquess  wrote:
>
> On Fri, Nov 12, 2021 at 8:19 PM tech-lists  wrote:
> >
> > Hi,
> >
> > On Fri, Nov 12, 2021 at 07:25:12PM -0600, Dustin Marquess wrote:
> > >
> > >set com tty0
> > >
> > >At the boot prompt manually. After install, however, I don't seem to have 
> > >to.
> >
> > I don't seem to be able to get to the boot prompt.
> >
> > Following the instructions on https://wiki.freebsd.org/bhyve/OpenBSD like 
> > so:
> >
> > % sudo bhyve -c 2 -m 4G -w -u -H \
> > -s 0,amd_hostbridge \
> > -s 3,ahci-hd,/usr/home/REDACTED/isos/OpenBSD/amd64/install70.img \
> > -s 4,virtio-blk,./obsd70.img \
> > -s 5,virtio-net,tap0 \
> > -s 29,fbuf,tcp=0.0.0.0:5900,w=800,h=600,vga=off,wait \
> > -s 30,xhci,tablet \
> > -s 31,lpc -l com1,stdio \
> > -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
> > openbsd70
> >
> > [console output]
> > fbuf frame buffer base: 0x94380 [sz 16777216]
> >
> > [in another terminal, do vncviewer 127.0.0.1:5900]
> >
> > BdsDxe: failed to load Boot0001 "UEFI BHYVE SATA DISK
> > BHYVE-A09F-F442-FB09" from
> > PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0x,0x0): Not Found
> > BdsDxe: failed to load Boot0002 "UEFI Misc Device" from
> > PciRoot(0x0)/Pci(0x4,0x0): Not Found
> >
> > >>Start PXE over IPv4.
> >PXE-E16: No valid offer received.
> >BdsDxe: failed to load Boot0003 "UEFI PXEv4 (MAC:00A098D26B6B)" from
> >PciRoot(0x0)/Pci(0x5,0x0)/MAC(00A098D26B6B,0x1)/IPv4
> >(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0): Not Found
> >
> >>>Start HTTP Boot over IPv4.
> >  Error: Could not retrieve NBP file size from HTTP server.
>
> I'm not using VNC at all:
>
> bhyve -A -D -H -P -w -S -u -c 2 -m 1G \
> -s 0,amd_hostbridge \
> -s 3,virtio-blk,/dev/zvol/tank/vm/vpn \
> -s 10,virtio-net,tap0,mac=1e:17:37:23:2f:cb \
> -s 20,virtio-rnd \
> -s 31,lpc \
> -l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
> vpn
>
> -Dustin



Re: anyone able to bhyve openbsd 7.0 ?

2021-11-12 Thread Dustin Marquess
On Fri, Nov 12, 2021 at 8:49 PM tech-lists  wrote:
>
> On Fri, Nov 12, 2021 at 08:27:31PM -0600, Dustin Marquess wrote:
> >Oops, I forgot I had the .img commented out above (I only uncomment it
> >to boot the updater):
> >
> >bhyve -A -D -H -P -w -S -u -c 2 -m 1G \
> >-s 0,amd_hostbridge \
> >-s 3,virtio-blk,/usr/local/vm/vpn/install70.img \
> >-s 4,virtio-blk,/dev/zvol/tank/vm/vpn \
> >-s 10,virtio-net,tap0,mac=1e:17:37:23:2f:cb \
> >-s 20,virtio-rnd \
> >-s 31,lpc \
> >-l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
> >vpn
>
> It's like bhyve isn't seeing the boot partition. Maybe I need to
> re-download? I get this:
>
> BdsDxe: failed to load Boot0001 "UEFI BHYVE SATA DISK
> BHYVE-A09F-F442-FB09" from
> PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0x,0x0): Not Found
> BdsDxe: failed to load Boot0002 "UEFI Misc Device" from
> PciRoot(0x0)/Pci(0x4,0x0): Not Found
>
> and then it tries to pxe boot etc
>
> I'll try again after sleep. I'm clearly making an error somewhere.


Weird. I've been using .img's from
https://cdn.openbsd.org/pub/OpenBSD/snapshots/amd64/ but I've been
using snapshots for almost 2 years now, so way before 7.0 released.
I'm not sure why the actual release itself would be any different...

-Dustin



Re: how to run bhyve and virtualbox at the same time

2022-06-26 Thread Dustin Marquess
On Sun, Jun 26, 2022 at 8:45 AM Mario Marietto 
wrote:

> If that can't be done,I'm forced to install the USB-IP server on FreeBSD
> itself and the client on MacOS,but this makes the task more complicated to
> accomplish. Even though there is no known USB over IP tool which can run
> natively on FreeBSD. For example I tried this one :
>

macOS supports CIFS (SMB) and NFS mounts natively, so that would probably
be the easiest. There's also a 9P client for macOS (
https://github.com/benavento/mac9p ) and a 9P server for *IX (
https://github.com/chaos/diod ) that you can use, instead of dealing with
USB-over-IP.

-Dustin


Re: CURRENT: bhyve: xfreerdp doesn't support OpenSSL 3 yet. Alternatives?

2023-06-29 Thread Dustin Marquess
On Jun 29, 2023 at 11:36 AM -0500, FreeBSD User , wrote:
> Am Thu, 29 Jun 2023 16:41:51 +0200
> Guido Falsi  schrieb:
>
> > On 29/06/23 16:35, FreeBSD User wrote:
> > > Hello,
> > >
> > > running a recent CURRENT, 14.0-CURRENT #10 main-n263871-fd774e065c5d: Thu 
> > > Jun 29 05:26:55
> > > CEST 2023 amd64, xfreerdp (net/freerdp) doesn't working anymore on 
> > > Windows 10 guest in
> > > bhyve. It seems OpenSSL 3 is the culprit (see the error message from 
> > > xfreerdp below). I
> > > opened already a PR (see: 
> > > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272281). In a
> > > very quick response I was informed that recent FreeRDP doesn't support 
> > > OpenSSL 3 yes
> > > (https://github.com/FreeRDP/FreeRDP/pull/8920).
> > >
> > > Checking for HowTo's setting up bhyve guests, I dodn't realise any 
> > > setting for
> > > alternatives to RDP. As I do not fully understand how bhyve passes 
> > > through its guest's
> > > framebuffer device/ or native GUI, I'm a bit helpless in searching for 
> > > another solution to
> > > contact the Windows10 guest from the X11 desktop of the hosts.
> > >
> > > Trying remmina turns out to be a fail, because in our installation 
> > > libsoup2 and libsoup3
> > > are installed both and remmina complains about having both symbols, also 
> > > I realised
> > > remmina seems to utilize net/freerdb as the RDP backend.
> > >
> > > Since I have no clue how to install "blindly" a VNCserver within the 
> > > Windows10 guest, I
> > > presume VNC is not an option in any way.
> > >
> > > Is there any way to access the bhyve guest's native graphical interface? 
> > > As in the PR shown
> > > above already documented (setup taken from the FreeBSD Wiki/bhyve), a 
> > > framebuffer is
> > > already configured.
> > >
> > > It would be nice if someone could give a hint.
> > >
> >
> > I had the same issue, with Windows 10 pro hosts, but the fault is in
> > windows, which, by default, tries to negotiate an ancient protocol (NTLM
> > using RC4 if I understand correctly).
> >
> > With modern windows RDP servers there are better protocols available,
> > you can get them in remmina by forcing "TLS protocolo security" in the
> > advanced tab, security protocol negotiation (second row).
> >
> > Doing this (after some experimentation with various options) solved the
> > issue for me.
> >
>
> Thank you very much for the quick response.
>
> net/remmina is not an option on most of my workstations, since some required 
> ports install
> libsoup3, and remmina complains about having found libsoup2 symbols as well 
> as libsoup3
> symbols when starting up - and quits.
>
> Since remmina utilises net/freerdp, I was wondering if I could enforce TLS 
> security by any
> kind of a switch, and trying the following
>
> xfreerdp /v:192.168.0.128:5900 /u:ohartmann /sec:tls
>
> resulting in
>
> [...]
> [17:58:18:972] [1702:bb812700] [WARN][com.winpr.utils.ssl] - OpenSSL LEGACY 
> provider failed to
> load, no md4 support available!
> [17:58:18:973] [1702:bb812700] [ERROR][com.freerdp.core.transport] - BIO_read 
> returned an
> error: error:12800067:DSO support routines::could not load the shared library
> [17:58:18:973] [1702:bb812700] [ERROR][com.freerdp.core.transport] - BIO_read 
> returned an
> error: error:12800067:DSO support routines::could not load the shared library
> [17:58:18:973] [1702:bb812700] [ERROR][com.freerdp.core.transport] - BIO_read 
> returned an
> error: error:07880025:common libcrypto routines::reason(524325) [17:58:18:973]
> [1702:bb812700] [ERROR][com.freerdp.core] - 
> transport_read_layer:freerdp_set_last_error_ex
> ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
> [17:58:18:981] [1702:bb812700] [ERROR][com.freerdp.core.transport] - BIO_read 
> returned a
> system error 35: Resource temporarily unavailable
> [17:58:18:981] [1702:bb812700] [ERROR][com.freerdp.core] -
> transport_read_layer:freerdp_set_last_error_ex 
> ERRCONNECT_CONNECT_TRANSPORT_FAILED
> [0x0002000D] [17:58:18:981] [1702:bb812700] [ERROR][com.freerdp.core] - 
> freerdp_post_connect
> failed
>
>
> My setup is
>
> bhyve -c 4 -m 4G -w -H \
> -s 0,hostbridge \
> -s 3,ahci-hd,/pool/home/ohartmann/bhyve/win10/disk_win10.img \
> -s 5,virtio-net,tap0 \
> -s 29,fbuf,tcp=0.0.0.0:5900,w=1920,h=1200,vga=io \
> -s 30,xhci,tablet \
> -s 31,lpc \
> -l com1,stdio \
> -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
> win10
>
> and this is a working image setup a couple of weeks ago when VBox has been 
> defective on
> CURRENT - should say: it worked once.
>
> I can not interpret the error above.
>
> bhyve is novel to me and I have to admit that I make some capital mistakes 
> here - but can't
> find satisfying doucumentation ...
>
> Kind reagrds,
>
> Oliver

RDP would be on the guest's IP using port 3389.  Port 5900 on the host's IP is 
bhyve's VNC port, which speaks VNC, not RDP.

If you want to use VNC, try TigerVNC.

-Dustin


bhyve issues in 15-CURRENT

2023-09-20 Thread Dustin Marquess
I just upgraded from a kernel+userland of 15-CURRENT from a release 20 days ago 
(git commit 565c887) to one today (git commit e39e6be). Afterwards, I've 
noticed two things that are probably really the same thing:

- My Windows Server 2023 VM says that there's not enough resources for COM2 & 
COM4
- My OpenBSD 7.3 VM dies with:

acpicmos0 at acpi0
"Bhyve_V_Gen_Counter_V1" at acpi0 not configured
cpu0: using VERW MDS workaround
pvbus0 at mainbus0: bhyve
pci0 at mainbus0 bus 0
0:3:0: io address conflict 0xc000/0x80
0:5:0: io address conflict 0xc080/0x40
pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x7432 rev 0x00
virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Storage" rev 0x00virtio0: 
can't map i/o space
: Cannot attach (5)
virtio1 at pci0 dev 5 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio1: address 1e:17:37:23:2f:cb
virtio1: msix per-VQ

In this case, 0:3:0 is the virtio-blk device and 0:5:0 is the virtio-net device.

If I boot it using a snapshot install74.img then it dies at:

acpicmos0 at acpi0
"Bhyve_V_Gen_Counter_V1" at acpi0 not configured
cpu0: using VERW MDS workaround
pvbus0 at mainbus0: bhyve
pci0 at mainbus0 bus 0
0:2:0: io address conflict 0xc080/0x80
0:3:0: io address conflict 0xc000/0x80
0:5:0: io address conflict 0xc100/0x40
pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x7432 rev 0x00
virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Storage" rev 0x00virtio0: 
can't map i/o space
: Cannot attach (5)
virtio1 at pci0 dev 3 function 0 "Qumranet Virtio Storage" rev 0x00
vioblk0 at virtio1
scsibus0 at vioblk0: 1 targets
sd0 at scsibus0 targ 0 lun 0: 
sd0: 8192MB, 512 bytes/sector, 16777216 sectors
virtio1: msix per-VQ
virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Network" rev 0x00
vio0 at virtio2: address ff:ff:ff:ff:ff:ff
panic: vq_size not power of two: 65535

0:3:0 are virtio-blk and 0:5:0 is virtio-net, as above. 0:2:0 is the extra 
virtio-blk for the .img file.

Any ideas on what change caused this?

Thanks!

-Dustin


Re: bhyve issues in 15-CURRENT

2023-09-20 Thread Dustin Marquess
On Sep 21, 2023 at 1:29 AM -0500, Corvin Köhne , wrote:
> On Wed, 2023-09-20 at 19:02 -0500, Dustin Marquess wrote:
> >
> >
> >
> > I just upgraded from a kernel+userland of 15-CURRENT from a release
> > 20 days ago (git commit 565c887) to one today (git commit e39e6be).
> > Afterwards, I've noticed two things that are probably really the same
> > thing:
> >
> > - My Windows Server 2023 VM says that there's not enough resources
> > for COM2 & COM4
> > - My OpenBSD 7.3 VM dies with:
> >
> > acpicmos0 at acpi0
> > "Bhyve_V_Gen_Counter_V1" at acpi0 not configured
> > cpu0: using VERW MDS workaround
> > pvbus0 at mainbus0: bhyve
> > pci0 at mainbus0 bus 0
> > 0:3:0: io address conflict 0xc000/0x80
> > 0:5:0: io address conflict 0xc080/0x40
> > pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x7432
> > rev 0x00
> > virtio0 at pci0 dev 3 function 0 "Qumranet Virtio Storage" rev
> > 0x00virtio0: can't map i/o space
> > : Cannot attach (5)
> > virtio1 at pci0 dev 5 function 0 "Qumranet Virtio Network" rev 0x00
> > vio0 at virtio1: address 1e:17:37:23:2f:cb
> > virtio1: msix per-VQ
> >
> > In this case, 0:3:0 is the virtio-blk device and 0:5:0 is the virtio-
> > net device.
> >
> > If I boot it using a snapshot install74.img then it dies at:
> >
> > acpicmos0 at acpi0
> > "Bhyve_V_Gen_Counter_V1" at acpi0 not configured
> > cpu0: using VERW MDS workaround
> > pvbus0 at mainbus0: bhyve
> > pci0 at mainbus0 bus 0
> > 0:2:0: io address conflict 0xc080/0x80
> > 0:3:0: io address conflict 0xc000/0x80
> > 0:5:0: io address conflict 0xc100/0x40
> > pchb0 at pci0 dev 0 function 0 vendor "AMD", unknown product 0x7432
> > rev 0x00
> > virtio0 at pci0 dev 2 function 0 "Qumranet Virtio Storage" rev
> > 0x00virtio0: can't map i/o space
> > : Cannot attach (5)
> > virtio1 at pci0 dev 3 function 0 "Qumranet Virtio Storage" rev 0x00
> > vioblk0 at virtio1
> > scsibus0 at vioblk0: 1 targets
> > sd0 at scsibus0 targ 0 lun 0: 
> > sd0: 8192MB, 512 bytes/sector, 16777216 sectors
> > virtio1: msix per-VQ
> > virtio2 at pci0 dev 5 function 0 "Qumranet Virtio Network" rev 0x00
> > vio0 at virtio2: address ff:ff:ff:ff:ff:ff
> > panic: vq_size not power of two: 65535
> >
> > 0:3:0 are virtio-blk and 0:5:0 is virtio-net, as above. 0:2:0 is the
> > extra virtio-blk for the .img file.
> >
> > Any ideas on what change caused this?
> Please make sure to call bhyve with the -A option.

Yep, my script runs it as:

bhyve -A -D -H -P -w -S -u -c $CPUS -m $RAM \
-s 0,amd_hostbridge \
-s 3,virtio-blk,/dev/zvol/tank/vm/$VM \
-s 5,virtio-net,tap0,mac=1e:17:37:23:2f:cb \
-s 31,lpc \
-l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd $VM

So -A is there already.

-Dustin