Be able to start and monitor BHyve virtual machines#250
Be able to start and monitor BHyve virtual machines#250
Conversation
|
I pushed some more commits, this works now to the extend that a FreeBSD VM with one network and one block device starts fine. More testing is needed, also I updated the initial comment with other things that need to be taken care of (plus the |
5ab43a5 to
52efec8
Compare
|
This is fine to review. I'd leave the CPU pinning out of this PR. It for sure requires some more testing, esp. with Linux guests. |
reynir
left a comment
There was a problem hiding this comment.
Thanks! I wonder if we should guard this behind a --experimental flag? So we can sort of warn people that it might break or change in the near future?
About CPUs and CPU pinning. There doesn't have to be a one-to-one correspondence between cpu sets and numcpu - the OS can schedule the virtual CPUs on the allowed CPUs I suspect. So we could allow multiple --cpu arguments and for unikernels the numcpu is inherently fixed to 1.
About the digest: maybe we need to rethink the data structure so it can vary depending on the type (solo5/bhyve/...) with type appropriate fields. But I'm fine with this especially with an --experimental flag or so.
…ptions: cpus and linux_boot_partition
bhyve tries to 'mevent_add(.., EVF_READ, ..)' which fails for /dev/null
…nd-line parameter
e137cab to
ca184eb
Compare
|
(rebased & force-pushed) |
78c2ebc to
8fc705a
Compare
For Solo5 it's a hex digest. For bhyve it's a bhyve-vmname.
|
The last two commits were meant to be one. It changes the printing so that the |
|
That's excellent @reynir. I'm working on a patchset for having cpuids in the unikernel/vm context. this is a breaking change though... but it is fine to include here. :) |
|
52f59c2 revises the unikernel_info/config/arguments to carry a set of cpuids -- since this modifies the wire format in a non-backwards compatible way, I made the versioning dance... This is as well supported for unikernels. since even there for a single-cpu unikernel it makes sense that this may be on cpu 4 and 8, so the hypervisor can schedule it depending on load of CPU 4 and 8... |
|
CI error on ppc64 (I plan to ignore this): So, somehow vmm_asn.ml isn't in good shape anymore for the assembler / ppc64 backend. |
I would like to not have such flags. The issue is that we need to care about backwards compatibility anyways in terms of what is stored on disk (or in certificates). So, an |
reynir
left a comment
There was a problem hiding this comment.
The ASN.1 changes are quite large, but looks okay. I didn't review that part as thoroughly.
| @ (optional ~label:"startup" int) | ||
| @ (required ~label:"fail-behaviour" fail_behaviour) | ||
| @ (required ~label:"cpuid" int) | ||
| @ (required ~label:"cpuids" (set_of int)) |
There was a problem hiding this comment.
In the ASN.1 is it possible to make this
required ~label:"cpuids" (choice2 int (set_of int))and have backwards compatibility?
There was a problem hiding this comment.
Yes, sure. What I'm aiming for is "old clients should be able to talk to new servers". So, an old client data would then be accepted by the new server.
But, when the old client requests a unikernel_info, it would as well receive this new ASN with the set_of, and then fail to parse it.
Thus (and to keep unikernel_config and unikernel_info in sync), I prefer to change it as done here. The old client now sends unikernel_info, and the server decodes it as old_unikernel_info5 and replies with Old_unikernel_info5 -- in a form that the old client understands the layout and is able to deal with it.
Certainly, the other compatibility -- a new client talking to an old server -- is not given. Somehow I assume that servers are updated to the latest version ;)
This is not very well tested yet. EDIT: but a basic FreeBSD VM is starting :) [and console output is visible]
--allow-zvol-for- as a temporary workaround (until feature request: separate the block handling (esp. create / dump / set) to a separate daemon #219 is a thing)-dfor grub-bhyve.Later a path on how to install a virtual machine given you have nothing -- usually done via a boot CD or memstick... this is not very well thought out yet (but if you have an image, just block_set it, and you're done :)