pub struct VirtualGuest {
pub install_ms: u64,
}Expand description
The guest as a state machine, for the runs that are not about the guest.
It does not boot anything, and it says so in its name. Its whole value is that the 100 000-run storm is about the API and the money, and paying ten seconds of real qemu per iteration would make the storm a three-week job. The outcomes it produces are the ones the real engine produces, in the same proportions, drawn from the run’s seed.
Fields§
§install_ms: u64Trait Implementations§
Source§impl Default for VirtualGuest
impl Default for VirtualGuest
Source§impl GuestEngine for VirtualGuest
impl GuestEngine for VirtualGuest
fn name(&self) -> &'static str
fn boot(&self, spec: &GuestSpec) -> GuestOutcome
Source§fn power_on(&self, _machine: &Machine) -> Result<(), String>
fn power_on(&self, _machine: &Machine) -> Result<(), String>
Power the machine on: create any disk that does not exist yet, sized
from its storage record, grow any that is smaller, and boot. An
Err is
a refusal by name, and the estate reports the server stopped — a
server whose machine never started must not read started.Source§fn power_off(&self, _server: &str, _hard: bool)
fn power_off(&self, _server: &str, _hard: bool)
hard: kill it now. Soft: press the ACPI power button and return.Source§fn running(&self, _server: &str) -> Option<bool>
fn running(&self, _server: &str) -> Option<bool>
Some(true) a machine is running for this server, Some(false) one was
started and is gone (it powered itself off, or died), None this engine
has never run one — the estate’s own state machine then stands.Source§fn console(&self, _server: &str) -> Option<(String, u16)>
fn console(&self, _server: &str) -> Option<(String, u16)>
Where the server’s console REALLY listens — a loopback host and port
for a real guest’s VNC.
None (the default) leaves the estate’s
RFC 2606 <zone>.vnc.mock.invalid.Source§fn load(&self, _server: &str, _storage: &str)
fn load(&self, _server: &str, _storage: &str)
Put the medium of
storage into the server’s tray (cdrom/load). A
running machine gets it live; a stopped one reads it at the next
power-on either way, because Machine::medium is built from the
device row.Source§fn resize_disk(&self, _storage: &str, _size_gib: u64) -> Result<(), String>
fn resize_disk(&self, _storage: &str, _size_gib: u64) -> Result<(), String>
A storage’s size record grew. The engine grows the disk only while no
running machine has it open, and otherwise at the next power-on.
Source§fn store_medium(&self, _storage: &str, _bytes: &[u8]) -> Result<(), String>
fn store_medium(&self, _storage: &str, _bytes: &[u8]) -> Result<(), String>
The bytes an upload session received, kept as that storage’s medium.
Source§fn forget_server(&self, _server: &str)
fn forget_server(&self, _server: &str)
The server is being deleted: kill its machine and drop its records.
Source§fn forget_storage(&self, _storage: &str)
fn forget_storage(&self, _storage: &str)
The storage is gone from the account: delete its disk and medium.
Source§fn forget_all(&self)
fn forget_all(&self)
The whole estate is being replaced (
/mock/seed): every machine and
every disk goes with it, because nothing can refer to them any more.Auto Trait Implementations§
impl Freeze for VirtualGuest
impl RefUnwindSafe for VirtualGuest
impl Send for VirtualGuest
impl Sync for VirtualGuest
impl Unpin for VirtualGuest
impl UnsafeUnpin for VirtualGuest
impl UnwindSafe for VirtualGuest
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
Mutably borrows from an owned value. Read more