pub struct HostFacts {
pub subids: SubIds,
pub pools: Vec<String>,
pub path_map: Option<(String, String)>,
pub initial_copy: bool,
pub incus_version: Option<String>,
pub invoking_ids: (u32, u32),
pub shared_root: Option<String>,
pub org: Option<OrgId>,
pub registry: Option<String>,
pub project: String,
}Expand description
Facts about the host that resolution depends on.
Fields§
§subids: SubIds§pools: Vec<String>Storage pools that exist, in server order.
path_map: Option<(String, String)>Rewrite bind sources starting with .0 to start with .1 instead: the
path incusd resolves can differ from the one this process sees (see
HostFacts::detect_path_map).
initial_copy: boolThe server can seed a new volume from the image (disk_initial_copy).
incus_version: Option<String>The incus server version (environment.server_version).
invoking_ids: (u32, u32)The (uid, gid) of the user running isb: what a VM’s bind mounts map to.
The only directory incusd can see bind sources under, when it runs
elsewhere: on macOS, the home directory shared with the isb machine.
org: Option<OrgId>The org the sandbox goes in (from the client’s incus project):
where registry: images resolve. None outside isb’s projects.
registry: Option<String>The local registry’s host:port, when one is set up.
project: StringThe incus project the sandbox goes in (its egress network is named from it).
Implementations§
Source§impl HostFacts
impl HostFacts
Sourcepub fn detect_path_map() -> Option<(String, String)>
pub fn detect_path_map() -> Option<(String, String)>
Where bind sources must be translated before incusd sees them.
ISB_HOST_PATH_MAP=from=to sets it explicitly. Otherwise, inside an
agent-workspace box, $HOME is a bind mount of a directory on the box’s own
host and incusd resolves disk sources in its own mount view, where only the
host-side path exists; the box publishes that path in
/etc/workspace/guest-home. Without the rewrite, adding the device fails
with “Missing source path” for a directory ls lists happily.