standalone: support guest hv interface options - #1194
Conversation
| } | ||
|
|
||
| const TYPE_NAME: &str = "guest-hyperv-interface"; | ||
| const TYPE_NAME: &str = "hyperv-guest-interface"; |
There was a problem hiding this comment.
this is incidental but the bhyve impl spells its type name as bhyve-guest-interface and the swapped order was bugging me.
| /// The hypervisor interface to present to guest OSes. | ||
| /// | ||
| /// The variants here correspond to implementations of `Enlightenment`, which | ||
| /// may influence many aspects of a VM. Most immediately, different interfaces | ||
| /// have different CPUID leaves, but can also support para-virtualized features | ||
| /// such as additional hypercalls and MSRs. | ||
| #[derive(Clone, Default, Serialize, Deserialize, Debug, PartialEq)] | ||
| #[serde(tag = "type", rename_all = "lowercase")] | ||
| pub enum HypervisorInterface { | ||
| #[default] | ||
| Bhyve, | ||
|
|
||
| HyperV { | ||
| reference_tsc: bool, | ||
| }, | ||
| } |
There was a problem hiding this comment.
you are not seeing double! propolis-standalone/src/config.rs has a copy of this structure and comment.
I've only just realized that propolis-standalone does not use propolis-config-toml, and really they kind of just accept the same toml documents (for the most part) by intentional effort rather than shared code. I'm thinking about taking a shot at unifying those, but I want to do that a bit more intentionally (I dunno what all is in the propolis-config-toml dep tree and if it would make me sad rebuilding propolis-standalone). so, a copy for now.
There was a problem hiding this comment.
I've only just realized that propolis-standalone does not use propolis-config-toml, and really they kind of just accept the same toml documents (for the most part) by intentional effort rather than shared code
😬
approximately twenty billion years ago (February last year) #849 saw us grow support for presenting Hyper-V as the guest hypervisor interface. this came with plumbing it into propolis-cli with the new
--hypervflag. we since overlooked adding that plumbing into propolis-standalone, where i found myself wanting it this week!i'd fully forgotten that as-merged in 725eb8e,
well ... this does that. i'm also just deleting the
--hypervflag here since i'm assuming no one other than me was using that anyway.both
propolis-standaloneandpropolis-clinow understand stanzas likeor
the latter being somewhat less interesting today since it's just a way to write out the defaults in more words.