Bug 253004 - Win 10 guest fails to restart unless I --destroy
Summary: Win 10 guest fails to restart unless I --destroy
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bhyve (show other bugs)
Version: 13.0-STABLE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-25 19:18 UTC by bergerkos
Modified: 2023-01-03 19:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bergerkos 2021-01-25 19:18:17 UTC
In 13.0-ALPHA2 I still have this problem:
Running Win 10 guest with 2 passthrough devices (USB controller + NIC) I can't start guest after shutdown. Get this error:

Assertion failed: (error == 0), function modify_bar_registration, file /usr/src/usr.sbin/bhyve/pci_emul.c, line 501.
                           .twm/programs/./bhyve-hda.sh: line 13: 90467 Abort trap              bhyve -S -c sockets=1,cores=2,threads=2 -m 6G -H -w -s 0,hostbridge -s 3,passthru,7/0/1 -s 4,virtio-blk,/bhyve/win-alt.img,sectorsize=512/4096 -s 6,hda,rec=/dev/dsp,play=/dev/dsp -s 8,passthru,12/0/0 -s 29,fbuf,tcp=0.0.0.0:5900,w=1600,h=900,wait -s 30,xhci,tablet -s 31,lpc -l com1,stdio -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd windows-10

Interestingly, this error particular error was reported and addressed by a patch, so it doesn't happen again. But it comes out when I restar guest after shutdown.

It was mentioned here, including also the patch:
http://freebsd.1045724.x6.nabble.com/Windows-10-guests-fail-to-boot-when-attempting-to-passthrough-network-card-td6330452.html

Solution: the only one that works is to run:
#bhyvectl --vm=$my_vm_name --destroy
Comment 1 bergerkos 2021-01-25 19:27:17 UTC
Yes, the bug mentioned above (and patched successfully more than a year ago, I believe) happened on first boot and prevented bhyve from booting at all with certain PCI cards.

This thing, however, only happens when trying to restart the bhyve guest (Win 10 in my case).
Comment 2 bergerkos 2021-01-26 15:09:42 UTC
Can't tell whether or not this is a duplicate of bug #242666.
Comment 3 bergerkos 2023-01-03 19:33:22 UTC
UPDATE:
I had to remove my passthru devices (Intel 4 port NIC and USB3 controller), then this problem disappeared.

NOTE: I'm using on-board VIA USB3 controller as passthru USB and all works fine.
Comment 4 bergerkos 2023-01-03 19:33:51 UTC
Remove means remove them from the bhyve config.