This allows bhyve and bhyveload to boot directly from an
unmodified bsdinstall.
Reported by: pat@patmaddox.com
Sponsored by: SkunkWerks, GmbH
Details
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 69960 Build 66843: arc lint + arc unit
Event Timeline
I still haven't figured out when the hook is triggered, but this is already pretty neat.
The idea is to give loader enough smarts to be able to directly boot a VM from a clean
install without further modifications.
If I'm reading this right, it means no more virtio_p9fs_load="YES" needed in loader.conf? If so that would be very cool.
I'm torn on this...
I'd rather have a regexp -> modules to load table that we cruise through so we can also do zfs
But at the same time, I don't want errors for people that have zfs or the p9fs modules in the kernel (I thought my playing with this required an additional module).
So this fills a need, but it's the end of the road for things like this...
- move check earlier, I don't think I can use a hook this early
- actually works now
testing
- untar base.txz and kernel.txz somewhere
- copy in config.lua from this patch
cp -av /usr/src/stand/lua/config.lua /tmp/root/boot/lua/ # bhyvectl --destroy --vm=vm0 # bhyveload -m 1G \ -h /tmp/root/ \ -e vfs.root.mountfrom=p9fs:devroot \ vm0 # bhyve -m 1G -A \ -l com1,stdio \ -s 0,hostbridge \ -s 3,virtio-9p,devroot=/tmp/root \ -s 31,lpc \ vm0
I like the idea behind this, just have one question...
| stand/lua/config.lua | ||
|---|---|---|
| 529 | Still haven't answered my question: what about the warning this will cause when virtio_p9fs is compiled into the kernel for normal installs. A warning that can't be suppressed. | |