Re: resizing aarch64 image on arm64

2021-04-06 Thread John-Mark Gurney
tech-lists wrote this message on Mon, Apr 05, 2021 at 16:59 +:
> Can anyone tell me how to resize
> https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RC5/aarch64/Latest/FreeBSD-13.0-RC5-arm64-aarch64.raw
> 
> on an amd64 host?

note that this has been unxz'd already.

truncate -s 6g FreeBSD-13.0-RC5-arm64-aarch64.raw   # enlarge
mdconfig -f FreeBSD-13.0-RC5-arm64-aarch64.raw  # make device
gpart recover md1   # fix up gpt
gpart resize -i 3 md1   # expand ufs partition
growfs md1p3# grow ufs

Note that mdconfig may output a different md device than md1, use
that instead.

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."


signature.asc
Description: PGP signature


[Bug 254813] bhyve, on 12.2 host don't boot FreeBSD guest

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254813

Bug ID: 254813
   Summary: bhyve, on 12.2 host don't boot FreeBSD guest
   Product: Base System
   Version: 12.2-RELEASE
  Hardware: amd64
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: bhyve
  Assignee: virtualizat...@freebsd.org
  Reporter: d...@afalina.od.ua

# uname -a
FreeBSD test 12.2-RELEASE-p5 FreeBSD 12.2-RELEASE-p5 r369528 HOST  amd64

FreeBSD guest no boot on 12.2, but the same guests boot normal on 12.1.
After updating from 12.1 to 12.2 (or clean 12.2 install) FreeBSD guests (11.3,
11.4, 12.1, 12.2) fail to boot.
I use for comfort vm-bhyve.

Reproduce:
Install fresh 12.1, install vm-bhyve, install guest FreeBSD (11.4, 12.1, 12.2,
13.0 -- no difference).
Upgrade 12.1 to 12.2, install into bhyve new FreeBSD guest (or use of previous
installing guest).
===
# cat testguest.conf
loader="bhyveload"
cpu=1
memory=4G
disk0_type="ahci-hd"
disk0_name="system.img"

# vm start guest
Starting FreeBSD12.2
  * found guest in /mnt/VMs/testguest
  * booting...

# vm console testguest
...
Root mount waiting for: CAM
ahcich0: SATA connect time=0us status=0133
ahcich0: AHCI reset: device found
ahcich0: AHCI reset: device ready after 0ms
pass0 at ahcich0 bus 0 scbus0 target 0 lun 0
pass0:  ACS-2 ATA SATA 3.x device
pass0: Serial Number BHYVE-D4AB-EEFF-B53A
pass0: 600.000MB/s transfers (SATA 3.x, WDMA2, PIO 8192bytes)
pass0: Command Queueing enabled
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0:  ACS-2 ATA SATA 3.x device
ada0: Serial Number BHYVE-D4AB-EEFF-B53A
ada0: 600.000MB/s transfers (SATA 3.x, WDMA2, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 30720MB (6914560 512 byte sectors)
GEOM: new disk ada0

Loader variables:

Manual root filesystem specification:
  : [options]
  Mount  using filesystem 
  and with the specified (optional) option list.

eg. ufs:/dev/da0s1a
zfs:zroot/ROOT/default
cd9660:/dev/cd0 ro
  (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?   List valid disk boot devices
  .   Yield 1 second (for background tasks)
  Abort manual input

mountroot>
<-- I pressed ENTER
panic: mountroot: unable to (re-)mount root.
cpuid=0
time=2
KDB: stack backtrace:
#0 0x80c0a8f5 at kdb_backtrace+0x65
#1 0x80bbeb1b at vpanic+0x17b
#2 0x80bbe993 at panic+0x43
#3 0x80c88a95 at vfs_mountrootc+0x19a5
#4 0x80b57db7 at start_init+0x27
#5 0x80b8044e at fork_exit+0x7e
#6 0x81067f6e at fork_trampoline+0xe
Uptime: 2s
===

If I write any of next string after "mountroot>"
 ufs:/dev/ada0a
 ufs:/dev/ada0
 ufs:ada0a
 ufs:ada0
instead of simple press ENTER -- boot normal:
===
Trying to mount root from ufs:ada0 []...
Setting hostuuid: 43693d91-95c3-11eb-a6ca-00211010.
Setting hostid: 0xc8a69a1e.
Starting file system checks:
/dev/ada0: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ada0: clean, 6512400 free (1152 frags, 813906 blocks, 0.0% fragmentation)
Mounting local filesystems:.
...
===

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: bhyve iommu passthru ath0

2021-04-06 Thread infoomatic
On 05.04.21 16:00, Ka Ho Ng wrote:
> On 4/5/21 9:54 pm, Ka Ho Ng wrote:
>>
>> Could you cherry-pick the follow commits and see if they works?
>> ede14736fd6d74db0374f4a233491ad5dc0e9b1d
>> 74ada297e8978b8efda3dffdd1bb24aee7c5faa4
>> cf76495e0a30043503ef126f0a485e314730a221
>> 03efa462b2ab3ae8166598363e9e83d4e5cf0398
>>
>> Ka Ho
>
> A reminder: they should be applied to FreeBSD 13.0-RC5 on the host side.
>
Thanks! I tried the patches, the wpa_supplicant.conf from the host does
not work inside the VM, and also ifconfig list/scan did not output
anything inside the VM. (using the card on the host works as expected)

___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 254813] bhyve, on 12.2 host don't boot FreeBSD guest

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254813

--- Comment #1 from DYM  ---
Possibly, maybe it's the same:
https://www.mail-archive.com/freebsd-virtualization@freebsd.org/msg08900.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: resizing aarch64 image on arm64

2021-04-06 Thread Rodney W. Grimes
> tech-lists wrote this message on Mon, Apr 05, 2021 at 16:59 +:
> > Can anyone tell me how to resize
> > https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RC5/aarch64/Latest/FreeBSD-13.0-RC5-arm64-aarch64.raw
> > 
> > on an amd64 host?
> 
> note that this has been unxz'd already.
> 
> truncate -s 6g FreeBSD-13.0-RC5-arm64-aarch64.raw # enlarge
> mdconfig -f FreeBSD-13.0-RC5-arm64-aarch64.raw# make device
> gpart recover md1 # fix up gpt
> gpart resize -i 3 md1 # expand ufs partition
> growfs md1p3  # grow ufs
> 
> Note that mdconfig may output a different md device than md1, use
> that instead.

NICE!  Maybe this could be a second example in growfs(8) as
an example for "How to prepare an image for use with emulation"?


>   John-Mark GurneyVoice: +1 415 225 5579
-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: resizing aarch64 image on arm64

2021-04-06 Thread tech-lists

On Mon, Apr 05, 2021 at 11:19:43PM -0700, John-Mark Gurney wrote:

tech-lists wrote this message on Mon, Apr 05, 2021 at 16:59 +:

Can anyone tell me how to resize
https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RC5/aarch64/Latest/FreeBSD-13.0-RC5-arm64-aarch64.raw

on an amd64 host?


note that this has been unxz'd already.

truncate -s 6g FreeBSD-13.0-RC5-arm64-aarch64.raw   # enlarge
mdconfig -f FreeBSD-13.0-RC5-arm64-aarch64.raw  # make device
gpart recover md1   # fix up gpt
gpart resize -i 3 md1   # expand ufs partition
growfs md1p3# grow ufs

Note that mdconfig may output a different md device than md1, use
that instead.


thanks for this. I earlier found something similar with qemu-img resize
but with a qcow2 image. i'll write it up.

--
J.


signature.asc
Description: PGP signature


Re: resizing aarch64 image on arm64

2021-04-06 Thread Glen Barber
On Mon, Apr 05, 2021 at 11:19:43PM -0700, John-Mark Gurney wrote:
> tech-lists wrote this message on Mon, Apr 05, 2021 at 16:59 +:
> > Can anyone tell me how to resize
> > https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RC5/aarch64/Latest/FreeBSD-13.0-RC5-arm64-aarch64.raw
> > 
> > on an amd64 host?
> 
> note that this has been unxz'd already.
> 
> truncate -s 6g FreeBSD-13.0-RC5-arm64-aarch64.raw # enlarge
> mdconfig -f FreeBSD-13.0-RC5-arm64-aarch64.raw# make device
> gpart recover md1 # fix up gpt
> gpart resize -i 3 md1 # expand ufs partition
> growfs md1p3  # grow ufs
> 
> Note that mdconfig may output a different md device than md1, use
> that instead.
> 

The growfs(8) automatically runs at firstboot, so only the truncate(1)
part is needed.

Glen



signature.asc
Description: PGP signature


[Bug 254695] Hyper-V: Kernel Panic: Assertion in_epoch(net_epoch_preempt) failed at netinet/tcp_lro.c:915

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254695

--- Comment #1 from Li-Wen Hsu  ---
btw it looks more like an error in tcp code, this might be related:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254725

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 254695] Hyper-V: Kernel Panic: Assertion in_epoch(net_epoch_preempt) failed at netinet/tcp_lro.c:915

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254695

--- Comment #2 from Gordon Bergling  ---
(In reply to Li-Wen Hsu from comment #1)

Its mainly the call chain from vmbus_chan_task() -> hn_chan_callback() which
leads me towards an bug in the Hyper-V implementation, since hn0 is the default
network interface on Hyper-V.

I got an old kernel from around march 19th booted and will examine the crash
dump as soon as I found some free time.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: resizing aarch64 image on arm64

2021-04-06 Thread John-Mark Gurney
Rodney W. Grimes wrote this message on Tue, Apr 06, 2021 at 06:01 -0700:
> > tech-lists wrote this message on Mon, Apr 05, 2021 at 16:59 +:
> > > Can anyone tell me how to resize
> > > https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RC5/aarch64/Latest/FreeBSD-13.0-RC5-arm64-aarch64.raw
> > > 
> > > on an amd64 host?
> > 
> > note that this has been unxz'd already.
> > 
> > truncate -s 6g FreeBSD-13.0-RC5-arm64-aarch64.raw   # enlarge
> > mdconfig -f FreeBSD-13.0-RC5-arm64-aarch64.raw  # make device
> > gpart recover md1   # fix up gpt
> > gpart resize -i 3 md1   # expand ufs 
> > partition
> > growfs md1p3# grow ufs
> > 
> > Note that mdconfig may output a different md device than md1, use
> > that instead.
> 
> NICE!  Maybe this could be a second example in growfs(8) as
> an example for "How to prepare an image for use with emulation"?

In most/all cases for images, just a truncate is needed as Glen
mentioned.  The growfs(7) rc script is run at first boot to size
up the root fs as needed.  It can always be run manually later via:
service growfs onestart

if/when the size of the disk changes...

Hmm, just noticed that growfs(7) isn't linked from growfs(8), guess
I need to fix that.

-- 
  John-Mark Gurney  Voice: +1 415 225 5579

 "All that I will do, has been done, All that I have, has not."
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


Re: resizing aarch64 image on arm64

2021-04-06 Thread Rodney W. Grimes
> Rodney W. Grimes wrote this message on Tue, Apr 06, 2021 at 06:01 -0700:
> > > tech-lists wrote this message on Mon, Apr 05, 2021 at 16:59 +:
> > > > Can anyone tell me how to resize
> > > > https://download.freebsd.org/ftp/releases/VM-IMAGES/13.0-RC5/aarch64/Latest/FreeBSD-13.0-RC5-arm64-aarch64.raw
> > > > 
> > > > on an amd64 host?
> > > 
> > > note that this has been unxz'd already.
> > > 
> > > truncate -s 6g FreeBSD-13.0-RC5-arm64-aarch64.raw # enlarge
> > > mdconfig -f FreeBSD-13.0-RC5-arm64-aarch64.raw# make device
> > > gpart recover md1 # fix up gpt
> > > gpart resize -i 3 md1 # expand ufs 
> > > partition
> > > growfs md1p3  # grow ufs
> > > 
> > > Note that mdconfig may output a different md device than md1, use
> > > that instead.
> > 
> > NICE!  Maybe this could be a second example in growfs(8) as
> > an example for "How to prepare an image for use with emulation"?
> 
> In most/all cases for images, just a truncate is needed as Glen
> mentioned.  The growfs(7) rc script is run at first boot to size
> up the root fs as needed.  It can always be run manually later via:
> service growfs onestart

Though that is true, I suspect that running the growfs on
the host is much faster than doing so inside of say.. QEMU,
and is probably 10x faster than doing it before it ends up
on a SD card, though it would increase the dd time to write
the now much larger image.

Also one may be pre-growing the file system to add a bunch of
files to it before booting, I personally shall be using this
technique to build sd cards for arm boards now that I know
how to do it.

> 
> if/when the size of the disk changes...
> 
> Hmm, just noticed that growfs(7) isn't linked from growfs(8), guess
> I need to fix that.
> 
> -- 
>   John-Mark GurneyVoice: +1 415 225 5579
> 
>  "All that I will do, has been done, All that I have, has not."
> 

-- 
Rod Grimes rgri...@freebsd.org
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 254813] bhyve, on 12.2 host don't boot FreeBSD guest

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254813

DYM  changed:

   What|Removed |Added

  Component|bhyve   |kern

--- Comment #2 from DYM  ---
Reason for change component from "bhyve" to "kern":
bootloader has forgotten how to boot from BSD-labels (without MBR or GPT) on
guest.

It is reproduced if guest system install on the BSD-label (with all previous
conditions).

Similar problem has already been:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240364
However, a simple file replacement (on host or on guest) does not solve the
problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 254813] bhyve, on 12.2 host don't boot FreeBSD guest

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254813

DYM  changed:

   What|Removed |Added

   Hardware|amd64   |Any

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 254813] FreeBSD 12.2 bhyve host don't boot guest FreeBSD 12.2 on BSD partition

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254813

DYM  changed:

   What|Removed |Added

Summary|bhyve, on 12.2 host don't   |FreeBSD 12.2 bhyve host
   |boot FreeBSD guest  |don't boot guest FreeBSD
   ||12.2 on BSD partition

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 254813] FreeBSD 12.2 bhyve host don't boot guest FreeBSD any version on BSD partition

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254813

DYM  changed:

   What|Removed |Added

Summary|FreeBSD 12.2 bhyve host |FreeBSD 12.2 bhyve host
   |don't boot guest FreeBSD|don't boot guest FreeBSD
   |12.2 on BSD partition   |any version on BSD
   ||partition

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"


[Bug 254695] Hyper-V: Kernel Panic: Assertion in_epoch(net_epoch_preempt) failed at netinet/tcp_lro.c:915

2021-04-06 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254695

--- Comment #3 from Gordon Bergling  ---
The KERNCONF is the following

---
include GENERIC
options RATELIMIT
options TCPHPTS
options KERN_TLS
options ROUTE_MPATH
options RANDOM_FENESTRASX
---

Dump information are
---
Dump header from device: /dev/da0p3
  Architecture: amd64
  Architecture Version: 2
  Dump Length: 282898432
  Blocksize: 512
  Compression: none
  Dumptime: 2021-04-01 13:05:24 +0200
  Hostname: fbsd-dev.0xfce3.net
  Magic: FreeBSD Kernel Dump
  Version String: FreeBSD 14.0-CURRENT #25 main-n245771-529a2a0f2765: Thu Apr 
1 11:36:01 CEST 2021
   
r...@lion.0xfce3.net:/boiler/nfs/obj/boiler/nfs/src/amd64.amd64/sys/GENERIC-TCP
  Panic String: Assertion in_epoch(net_epoch_preempt) failed at
/boiler/nfs/src/sys/netinet/tcp_lro.c:915
  Dump Parity: 4289937466
  Bounds: 3
  Dump Status: good
---

src.conf is
---
WITH_EXTRA_TCP_STACKS=1
WITH_BEARSSL=1
WITH_PIE=1
WITH_RETPOLINE=1
WITH_INIT_ALL_ZERO=1
---


I upload the dump in a minute.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
freebsd-virtualization@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization
To unsubscribe, send any mail to 
"freebsd-virtualization-unsubscr...@freebsd.org"