Struct hvlite_entry::Options

source ·
pub struct Options {
Show 87 fields pub processors: u32, pub memory: u64, pub shared_memory: bool, pub prefetch: bool, pub paused: bool, pub kernel: OptionalPathBuf, pub initrd: OptionalPathBuf, pub cmdline: Vec<String>, pub hv: bool, pub vtl2: bool, pub get: bool, pub no_alias_map: bool, pub vtl2_emulates_apic: bool, pub isolation: Option<IsolationCli>, pub vsock_path: Option<String>, pub vtl2_vsock_path: Option<String>, pub late_map_vtl0_policy: Vtl0LateMapPolicyCli, pub no_enlightenments: bool, pub user_mode_apic: bool, pub disk: Vec<DiskCli>, pub nvme: Vec<DiskCli>, pub scsi_sub_channels: u16, pub nic: bool, pub net: Vec<NicConfigCli>, pub kernel_vmnic: Vec<String>, pub gfx: bool, pub vtl2_gfx: bool, pub vnc: bool, pub vnc_port: u16, pub apic_id_offset: u32, pub vps_per_socket: Option<u32>, pub smt: SmtConfigCli, pub x2apic: X2ApicConfig, pub virtio_console: bool, pub virtio_console_pci: bool, pub com1: Option<SerialConfigCli>, pub com2: Option<SerialConfigCli>, pub com3: Option<SerialConfigCli>, pub com4: Option<SerialConfigCli>, pub virtio_serial: Option<SerialConfigCli>, pub vmbus_com1_serial: Option<SerialConfigCli>, pub vmbus_com2_serial: Option<SerialConfigCli>, pub uefi: bool, pub uefi_firmware: OptionalPathBuf, pub uefi_debug: bool, pub uefi_enable_memory_protections: bool, pub pcat_boot_order: Option<PcatBootOrderCli>, pub pcat: bool, pub pcat_firmware: Option<PathBuf>, pub igvm: Option<PathBuf>, pub igvm_vtl2_relocation_type: Vtl2BaseAddressType, pub virtio_9p: Vec<(String, String)>, pub virtio_9p_debug: bool, pub virtio_fs: Vec<(String, String)>, pub virtio_fs_shmem: Vec<(String, String)>, pub virtio_fs_bus: VirtioBus, pub virtio_pmem: Option<String>, pub virtio_net: Vec<NicConfigCli>, pub log_file: Option<PathBuf>, pub ttrpc: Option<PathBuf>, pub grpc: Option<PathBuf>, pub single_process: bool, pub disable_frontpage: bool, pub tpm: bool, pub internal_worker: Option<Option<String>>, pub vmbus_redirect: bool, pub vmbus_max_version: Option<u32>, pub vmgs_file: Option<PathBuf>, pub vga_firmware: Option<PathBuf>, pub secure_boot: bool, pub secure_boot_template: Option<SecureBootTemplateCli>, pub custom_uefi_json: Option<PathBuf>, pub relay_console_path: Option<PathBuf>, pub gdb: Option<u16>, pub mana: Vec<NicConfigCli>, pub hypervisor: Option<Hypervisor>, pub custom_dsdt: Option<PathBuf>, pub ide: Vec<IdeDiskCli>, pub floppy: Vec<FloppyDiskCli>, pub guest_watchdog: bool, pub underhill_dump_path: Option<PathBuf>, pub halt_on_reset: bool, pub write_saved_state_proto: Option<PathBuf>, pub imc: Option<PathBuf>, pub mcr: bool, pub battery: bool, pub uefi_console_mode: Option<UefiConsoleModeCli>,
}
Expand description

OpenVMM virtual machine monitor.

This is not yet a stable interface and may change radically between versions.

Fields§

§processors: u32

processor count

§memory: u64

guest RAM size

§shared_memory: bool

use shared memory segment

§prefetch: bool

prefetch guest RAM

§paused: bool

start in paused state

§kernel: OptionalPathBuf

kernel image (when using linux direct boot)

§initrd: OptionalPathBuf

initrd image (when using linux direct boot)

§cmdline: Vec<String>

extra kernel command line args

§hv: bool

enable HV#1 capabilities

§vtl2: bool

enable vtl2 - only supported in WHP and simulated without hypervisor support currently

Currently implies –get.

§get: bool

Add GET and related devices for using the OpenHCL paravisor to the highest enabled VTL.

§no_alias_map: bool

disable the VTL0 alias map presented to VTL2 by default

§vtl2_emulates_apic: bool

The vtl2 paravisor has an APIC emulator, so do not emulate lower VTL APICs on the host.

§isolation: Option<IsolationCli>

enable isolation emulation

§vsock_path: Option<String>

the hybrid vsock listener path

§vtl2_vsock_path: Option<String>

the VTL2 hybrid vsock listener path

§late_map_vtl0_policy: Vtl0LateMapPolicyCli

the late map vtl0 ram access policy when vtl2 is enabled

§no_enlightenments: bool

disable in-hypervisor enlightenment implementation (where possible)

§user_mode_apic: bool

disable the in-hypervisor APIC and use the user-mode one (where possible)

§disk: Vec<DiskCli>

attach a disk (can be passed multiple times)

§nvme: Vec<DiskCli>

attach a disk via an NVMe controller

§scsi_sub_channels: u16

number of sub-channels for the SCSI controller

§nic: bool

expose a virtual NIC

§net: Vec<NicConfigCli>

expose a virtual NIC with the given backend (consomme | dio | tap | none)

Prefix with uh: to add this NIC via Mana emulation through Underhill, or vtl2: to assign this NIC to VTL2.

§kernel_vmnic: Vec<String>

expose a virtual NIC using the Windows kernel-mode vmswitch.

Specify the switch ID or “default” for the default switch.

§gfx: bool

expose a graphics device

§vtl2_gfx: bool

support a graphics device in vtl2

§vnc: bool

listen for vnc connections. implied by gfx.

§vnc_port: u16

VNC port number

§apic_id_offset: u32

set the APIC ID offset, for testing APIC IDs that don’t match VP index

§vps_per_socket: Option<u32>

the maximum number of VPs per socket

§smt: SmtConfigCli

enable or disable SMT (hyperthreading) (auto | force | off)

§x2apic: X2ApicConfig

configure x2apic (auto | supported | off | on)

§virtio_console: bool

use virtio console

§virtio_console_pci: bool

use virtio console enumerated via VPCI

§com1: Option<SerialConfigCli>

COM1 binding (console | stderr | listen=<path> | term[=<terminal emulator>] | none)

§com2: Option<SerialConfigCli>

COM2 binding (console | stderr | listen=<path> | term[=<terminal emulator>] | none)

§com3: Option<SerialConfigCli>

COM3 binding (console | stderr | listen=<path> | term[=<terminal emulator>] | none)

§com4: Option<SerialConfigCli>

COM4 binding (console | stderr | listen=<path> | term[=<terminal emulator>] | none)

§virtio_serial: Option<SerialConfigCli>

virtio serial binding (console | stderr | listen=<path> | term[=<terminal emulator>] | none)

§vmbus_com1_serial: Option<SerialConfigCli>

vmbus com1 serial binding (console | stderr | listen=<path> | term[=<terminal emulator>] | none)

§vmbus_com2_serial: Option<SerialConfigCli>

vmbus com2 serial binding (console | stderr | listen=<path> | term[=<terminal emulator>] | none)

§uefi: bool

boot UEFI firmware

§uefi_firmware: OptionalPathBuf

UEFI firmware file

§uefi_debug: bool

enable UEFI debugging on COM1

§uefi_enable_memory_protections: bool

enable memory protections in UEFI

§pcat_boot_order: Option<PcatBootOrderCli>

set PCAT boot order as comma-separated string of boot device types (e.g: floppy,hdd,optical,net).

If less than 4 entries are added, entries are added according to their default boot order (optical,hdd,net,floppy)

e.g: passing “floppy,optical” will result in a boot order equivalent to “floppy,optical,hdd,net”.

Passing duplicate types is an error.

§pcat: bool

Boot with PCAT BIOS firmware and piix4 devices

§pcat_firmware: Option<PathBuf>

PCAT firmware file

§igvm: Option<PathBuf>

boot IGVM file

§igvm_vtl2_relocation_type: Vtl2BaseAddressType

specify igvm vtl2 relocation type (absolute=<addr>, disable, auto=<filesize,or memory size>, vtl2=<filesize,or memory size>,)

§virtio_9p: Vec<(String, String)>

add a virtio_9p device (e.g. myfs:C:)

§virtio_9p_debug: bool

output debug info from the 9p server

§virtio_fs: Vec<(String, String)>

add a virtio_fs device (e.g. myfs:C:)

§virtio_fs_shmem: Vec<(String, String)>

add a virtio_fs device for sharing memory (e.g. myfs:\SectionDirectoryPath)

§virtio_fs_bus: VirtioBus

add a virtio_fs device under either the PCI or MMIO bus, or whatever the hypervisor supports (pci | mmio | auto)

§virtio_pmem: Option<String>

virtio PMEM device

§virtio_net: Vec<NicConfigCli>

expose a virtio network with the given backend (dio | vmnic | tap | none)

Prefix with uh: to add this NIC via Mana emulation through Underhill, or vtl2: to assign this NIC to VTL2.

§log_file: Option<PathBuf>

send log output from the worker process to a file instead of stderr. the file will be overwritten.

§ttrpc: Option<PathBuf>

run as a ttrpc server on the specified Unix socket

§grpc: Option<PathBuf>

run as a grpc server on the specified Unix socket

§single_process: bool

do not launch child processes

§disable_frontpage: bool

instead of showing the frontpage the VM will shutdown instead

§tpm: bool

add a vtpm device

§internal_worker: Option<Option<String>>

the mesh worker host name.

Used internally for debugging and diagnostics.

§vmbus_redirect: bool

redirect the VTL 0 vmbus control plane to a proxy in VTL 2.

§vmbus_max_version: Option<u32>

limit the maximum protocol version allowed by vmbus; used for testing purposes

§vmgs_file: Option<PathBuf>

path to vmgs file. if no file is provided, fallback to in-memory vmgs implementation

§vga_firmware: Option<PathBuf>

VGA firmware file

§secure_boot: bool

enable secure boot

§secure_boot_template: Option<SecureBootTemplateCli>

use secure boot template

§custom_uefi_json: Option<PathBuf>

custom uefi nvram json file

§relay_console_path: Option<PathBuf>

the path to a named pipe (Windows) or Unix socket (Linux) to relay to the connected tty.

This is a hidden argument used internally.

§gdb: Option<u16>

enable in-hypervisor gdb debugger

§mana: Vec<NicConfigCli>

enable emulated MANA devices with the given network backend (see –net)

§hypervisor: Option<Hypervisor>

use a specific hypervisor interface

§custom_dsdt: Option<PathBuf>

(dev utility) boot linux using a custom (raw) DSDT table.

This is a very niche utility, and it’s unlikely you’ll need to use it.

e.g: this flag helped bring up certain Hyper-V Generation 1 legacy devices without needing to port the associated ACPI code into HvLite’s DSDT builder.

§ide: Vec<IdeDiskCli>

attach an ide drive (can be passed multiple times)

Each ide controller has two channels. Each channel can have up to two attachments.

If the s flag is not passed then the drive will we be attached to the primary ide channel if space is available. If two attachments have already been added to the primary channel then the drive will be attached to the secondary channel.

§floppy: Vec<FloppyDiskCli>

attach a floppy drive (should be able to be passed multiple times). VM must be generation 1 (no UEFI)

§guest_watchdog: bool

enable guest watchdog device

§underhill_dump_path: Option<PathBuf>

enable Underhill’s guest crash dump device, targeting the specified path

§halt_on_reset: bool

halt the VM when the guest requests a reset, instead of resetting it

§write_saved_state_proto: Option<PathBuf>

write saved state .proto files to the specified path

§imc: Option<PathBuf>

specify the IMC hive file for booting Windows

§mcr: bool

Expose MCR device

§battery: bool

expose a battery device

§uefi_console_mode: Option<UefiConsoleModeCli>

set the uefi console mode

Trait Implementations§

source§

impl Args for Options

source§

fn group_id() -> Option<Id>

Report the [ArgGroup::id][crate::ArgGroup::id] for this set of arguments
source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to [Command] so it can instantiate Self. Read more
source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to [Command] so it can update self. Read more
source§

impl CommandFactory for Options

source§

fn command<'b>() -> Command

Build a [Command] that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a [Command] that can update self. Read more
source§

impl FromArgMatches for Options

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from [ArgMatches], parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl Parser for Options

§

fn parse() -> Self

Parse from std::env::args_os(), [exit][Error::exit] on error.
§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, [exit][Error::exit] on error.
§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, [exit][Error::exit] on error.
§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T, U> Upcast<U> for T
where U: Downcast<T>,