x/build: run DragonflyBSD VMs on GCE? #23060
Comments
More background on the dfly users list: |
In that thread, @rickard-von-essen says:
|
/cc @dmitshur |
Update: I just ran Dragonfly (5.2.2) at home on QEMU/KVM with virtio-scsi and virtio net and it works fine. So it should work fine on GCE, of course (which we already heard). At this point I'm thinking we should just do this builder "by hand" for now, with a readme file with notes. I'll prepare the image by hand, then shut it down and copy its disk to a GCE image. (uploading it as a sparse tarball) We can automate it with expect or whatnot later. Perfect is the enemy of good, etc. |
I shut down my KVM/QEMU instance, copied its disk to a new GCE image, and created a GCE VM. It kernel panics on boot (over serial) with:
So, uh, not as easy as I'd hoped. |
Perhaps if we already have to do the whole double virtualization thing for Solaris (#15581 (comment)) anyway, we could just reuse that mechanism to run Dragonfly in qemu/kvm under GCE. |
I've tried working on this earlier this year (back in 2018-02), and had it scripted to make the image automatically, but I had the same issue that it'd work on my machines with vanilla QEMU just fine, including with the disk being accessible on DFly through DragonFly's I've also tried running DragonFly BSD side by side with FreeBSD with Nested virtualisation sounds interesting. Does it require Linux on GCE, or would FreeBSD also work? |
@cnst do you have instructions on how you tried DragonFly on GCE? |
Change https://golang.org/cl/162959 mentions this issue: |
…ting This adds a linux-amd64 COS builder that should be just like our existing linux-amd64 COS builder except that it's using a forked image that has the VMX license bit enabled for nested virtualization. (GCE appears to be using the license mechanism as some sort of opt-in mechanism for features that aren't yet GA; might go away?) Once this is in, it won't do any new builds as regular+trybot builders are disabled. But it means I can then use gomote + debugnewvm to work on preparing the other four image types. Updates golang/go#15581 (solaris) Updates golang/go#23060 (dragonfly) Updates golang/go#30262 (riscv) Updates golang/go#30267 (fuchsia) Updates golang/go#23824 (android) Change-Id: Ic55f17eea17908dba7f58618d8cd162a2ed9b015 Reviewed-on: https://go-review.googlesource.com/c/162959 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
I've tried myself and it seems DragonFly is unable to find the disk. |
Change https://golang.org/cl/163057 mentions this issue: |
The COS image I'd forked from earlier didn't have CONFIG_KVM or CONFIG_KVM_INTEL enabled in its kernel, so even though I'd enabled the VMX license bit for the VM, the kernel was unable to use it. Now I've instead rebuilt the ChromiumOS "lakitu" board with a modified kernel config: https://cloud.google.com/container-optimized-os/docs/how-to/building-from-open-source More docs later. Still tinkering. Nothing uses this yet. Updates golang/go#15581 (solaris) Updates golang/go#23060 (dragonfly) Updates golang/go#30262 (riscv) Updates golang/go#30267 (fuchsia) Updates golang/go#23824 (android) Change-Id: Id2839066e67d9ddda939d96c5f4287af3267a769 Reviewed-on: https://go-review.googlesource.com/c/163057 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Change https://golang.org/cl/163301 mentions this issue: |
…d OS + vmx This adds scripts to create a new builder host image that acts like Container-Optimized OS (has docker, runs konlet on startup) but with a Debian 9 kernel + userspace that permits KVM for nested virtualization. Updates golang/go#15581 (solaris) Updates golang/go#23060 (dragonfly) Updates golang/go#30262 (riscv) Updates golang/go#30267 (fuchsia) Updates golang/go#23824 (android) Change-Id: Ib1d3a250556703856083c222be2a70c4e8d91884 Reviewed-on: https://go-review.googlesource.com/c/163301 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Change https://golang.org/cl/202478 mentions this issue: |
…ilder From golang/go#34958 (comment) : > Go's DragonFly support policy is that we support the latest stable > release primarily, but also try to keep DragonFly master passing, in > prep for it to become the latest stable release. > > But that does mean we need one more builder at the moment. Updates golang/go#34958 Updates golang/go#23060 Change-Id: I84be7c64eac593dee2252c397f9529deea13605a Reviewed-on: https://go-review.googlesource.com/c/build/+/202478 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
@tuxillo, looks like no progress on that bug, eh? |
Thanks for the reminder, I kind of forgot about this one. It's being a tough one anyways. I'll check with the team again next week to see if we could do something. |
@bradfitz I have some time to work on it again, but my credits expired, and trying to signup for a new account required some sort of an extra verification. Is there a way to get the credits again to work on this? Also, is there any way to reproduce this bug outside of Google environment? As per my 2018 comments, our driver works just fine in regular KVM using NetBSD's instructions for activating the codepath. |
GCP has a Free Tier these days:
There's no way to reproduce it locally. GCP uses KVM but doesn't use QEMU and its implementation of virtio-scsi etc isn't open source. |
@bradfitz How long does it take recompile the kernel on this free instance? A few hours? It was already taking too long even on non-micro GCP instances compared to 15-year old hardware. I think it'd be great if there was a way to reproduce this problem locally, because our virtio-scsi drivers work just fine with anything but the proprietary GCP implementation. Would it be helpful to provide automation for any other cloud provider? |
@cnst, I didn't imagine you'd be using the f1-micro installation for compilations. I thought you'd use your normal development environment to build and then use the f1-micro to test boot them on GCE until it worked. |
@cnst what I did in my tests was to download the latest IMG, mount null it, build kernel with modifications and install it in the mountpoint. Then I used gcloud/gsutil to upload the img and create the disk and the instance. You can retrieve the console output with gcloud iirc. |
FWIW, Go runs the following operating systems on GCP that all work with Google's virtio-scsi implementation:
Either Dragonfly has a bug, or all those operating systems have worked around bugs in Google's implementation. Or both. |
Just to give a quick update, we've done some steps in the right direction to fix this. At least the VM now sees the disk but further changes and testing are needed. I'll update this with more information as soonn as we have it.
|
Great! |
…ilder From golang/go#34958 (comment) : > Go's DragonFly support policy is that we support the latest stable > release primarily, but also try to keep DragonFly master passing, in > prep for it to become the latest stable release. > > But that does mean we need one more builder at the moment. Updates golang/go#34958 Updates golang/go#23060 Change-Id: I84be7c64eac593dee2252c397f9529deea13605a Reviewed-on: https://go-review.googlesource.com/c/build/+/202478 Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Bryan C. Mills <bcmills@google.com>
It is fixed now, see DragonFlyBSD/DragonFlyBSD@f0ee343 We can boot DragonFly BSD in GCE. Now we'd like to create two official images, one for "master" branch (tip) and one for release branch (right now 5.8). Do you guys know how we should proceed? |
Looks like Dragonfly now supports virtio:
https://leaf.dragonflybsd.org/cgi/web-man?command=virtio§ion=4
So it should run on GCE?
If somebody could prepare make.bash scripts to script the install to prepare bootable images, we could run it on GCE.
See the netbsd, openbsd, and freebsd directories as examples: https://github.com/golang/build/tree/master/env
(The script must run on Linux and use qemu to do the image creation.)
/cc @tdfbsd
The text was updated successfully, but these errors were encountered: