#[non_exhaustive]pub enum Unavailable {
Show 23 variants
VagrantMissing,
VirtualboxStuck,
HypervOff,
HypervNeedsAdmin,
HypervisorStopped,
MkisofsMissing,
VirtiofsdMissing {
hypervisor: String,
},
NotInstalled {
program: Option<String>,
},
NewLogin {
group: String,
},
NoKvm,
KvmDenied {
group: String,
},
KvmUnusable {
error: String,
},
HypervisorTooOld {
name: String,
version: String,
min: String,
},
PluginTooOld {
plugin: String,
version: String,
min: String,
},
PluginMissing {
plugin: String,
},
PluginsUnknown {
plugin: String,
reason: String,
},
VmwareUtilityStopped,
VmwarePluginWithoutUtility,
VmwareUtilityMissing,
VirtualboxDriver {
kernel: String,
},
KernelRestart {
kernel: String,
},
KvmHoldsVirtualization,
KvmSharesAfterRestart,
}Expand description
Why a provider can’t run VMs here: the first layer missing (Vagrant, the hypervisor, the
account’s rights, the machine’s virtualization, its plugin, the VMware utility), as
detect found it. Its serde form is {"code": "pluginMissing", "args": {"plugin": "vagrant-libvirt"}}: a UI translates the code and fills in the args.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
VagrantMissing
Vagrant isn’t installed.
VirtualboxStuck
VirtualBox’s background service is stuck: a call to it timed out.
HypervOff
Hyper-V isn’t turned on, or this edition of Windows doesn’t have it.
HypervNeedsAdmin
This account may not manage Hyper-V, which Vagrant needs (an administrator or a member of Hyper-V Administrators may).
HypervisorStopped
Hyper-V is turned on, but Windows’ hypervisor isn’t running: virtualization is off in the
firmware, or hypervisorlaunchtype is off (often set so VirtualBox runs faster).
MkisofsMissing
QEMU is installed, but not mkisofs (Linux), which Vagrant builds the cloud-init seed that
gives a QEMU VM its network with: QEMU’s install brings it (genisoimage).
VirtiofsdMissing
libvirt or QEMU is installed, but finds no virtiofsd (Linux), which it shares a folder of
this computer with a VM through: virtiofsd is its own package (virtiofsd).
NotInstalled
The hypervisor isn’t installed.
Fields
NewLogin
The user joined group since logging in (libvirt’s, or the group /dev/kvm is opened
through, for QEMU): it applies from the next login.
NoKvm
This machine has no /dev/kvm: virtualization is off in the firmware, or there is none.
KvmDenied
/dev/kvm exists, but this account may not open it: it isn’t in group, the one
/dev/kvm belongs to (kvm on Debian, Ubuntu, Kali and openSUSE, whose /dev/kvm is
0660; Fedora’s and Arch’s is 0666, open to everyone).
KvmUnusable
/dev/kvm exists and this account may open it, but opening it failed otherwise (the
device busy, no KVM behind it).
HypervisorTooOld
The hypervisor is older than its Vagrant plugin drives.
Fields
PluginTooOld
The Vagrant plugin is older than the one that works: installing it again updates it.
Fields
PluginMissing
The provider’s Vagrant plugin isn’t installed.
PluginsUnknown
Whether the provider’s Vagrant plugin is installed can’t be told: vagrant plugin list
failed (not read as “not installed”: the user would be told to install a plugin that may
be there).
VmwareUtilityStopped
The Vagrant VMware Utility is installed, but its service doesn’t answer.
VmwarePluginWithoutUtility
Vagrant’s VMware plugin (vagrant-vmware-desktop) is installed without the Vagrant VMware
Utility, whose key file it loads at every Vagrant command: Vagrant fails for every provider
(vagrant status on QEMU said “error while attempting to load the utility service key
file”). The fix: install the utility, or remove the plugin.
VmwareUtilityMissing
The Vagrant VMware Utility, HashiCorp’s service the VMware plugin drives VMware through, isn’t installed.
VirtualboxDriver
VirtualBox is installed, but its kernel driver (vboxdrv) isn’t loaded on the running
kernel (Linux), so no VM starts: never built (the kernel’s headers missing), or refused
(Secure Boot).
KernelRestart
VirtualBox’s kernel driver waits for a restart (Linux): the running kernel has no headers, and a newer kernel installed with its headers has, which the driver is built for when the computer starts it.
KvmHoldsVirtualization
KVM holds the CPU’s virtualization extensions (Linux): its module (kvm_intel, kvm_amd)
turns them on as it loads (kvm.enable_virt_at_load, the default since Linux 6.12), so no
VirtualBox VM starts (“VT-x is being used by another hypervisor”), installed or not. A
setup lets them share it (crate::setup::Action::ShareVirtualization).
KVM still holds the CPU’s virtualization extensions, but is set to share them from the
next time its module loads (options kvm enable_virt_at_load=0): it was in use (a VM of
its own running) or couldn’t be loaded again, so the setting applies once the computer
restarts.
Implementations§
Trait Implementations§
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§type WithoutGenerics = Unavailable
type WithoutGenerics = Unavailable
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = Unavailable
type OptionInnerType = Unavailable
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read moreSource§fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
fn export_to_string(cfg: &Config) -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.