pub struct LxcCreateVmRequest {Show 45 fields
pub arch: Option<PveLxcArchEnum>,
pub bwlimit: Option<f64>,
pub cmode: Option<PveCmodeEnum>,
pub console: Option<PveBoolean>,
pub cores: Option<i32>,
pub cpulimit: Option<f64>,
pub cpuunits: Option<i32>,
pub debug: Option<PveBoolean>,
pub description: Option<String>,
pub entrypoint: Option<String>,
pub env: Option<String>,
pub features: Option<Box<PveFeaturesField>>,
pub force: Option<PveBoolean>,
pub ha_managed: Option<PveBoolean>,
pub hookscript: Option<String>,
pub hostname: Option<String>,
pub ignore_unpack_errors: Option<PveBoolean>,
pub lock: Option<PveLockEnum>,
pub memory: Option<i64>,
pub nameserver: Option<String>,
pub onboot: Option<PveBoolean>,
pub ostemplate: String,
pub ostype: Option<PveOstypeEnum>,
pub password: Option<String>,
pub pool: Option<String>,
pub protection: Option<PveBoolean>,
pub restore: Option<PveBoolean>,
pub rootfs: Option<Box<PveRootfsField>>,
pub searchdomain: Option<String>,
pub ssh_public_keys: Option<String>,
pub start: Option<PveBoolean>,
pub startup: Option<String>,
pub storage: Option<String>,
pub swap: Option<i64>,
pub tags: Option<String>,
pub template: Option<PveBoolean>,
pub timezone: Option<String>,
pub tty: Option<i32>,
pub unique: Option<PveBoolean>,
pub unprivileged: Option<PveBoolean>,
pub vmid: i32,
pub devs: Option<HashMap<u32, PveDevField>>,
pub mps: Option<HashMap<u32, PveMpField>>,
pub nets: Option<HashMap<u32, PveNetField>>,
pub unuseds: Option<HashMap<u32, PveUnusedField>>,
}Fields§
§arch: Option<PveLxcArchEnum>OS architecture type.
bwlimit: Option<f64>Override I/O bandwidth limit (in KiB/s).
cmode: Option<PveCmodeEnum>Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to ‘console’ it tries to attach to /dev/console instead. If you set cmode to ‘shell’, it simply invokes a shell inside the container (no login).
console: Option<PveBoolean>Attach a console device (/dev/console) to the container.
cores: Option<i32>The number of cores assigned to the container. A container can use all available cores by default.
cpulimit: Option<f64>Limit of CPU usage. NOTE: If the computer has 2 CPUs, it has a total of ‘2’ CPU time. Value ‘0’ indicates no CPU limit.
cpuunits: Option<i32>CPU weight for a container. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this container gets. Number is relative to the weights of all the other running guests.
debug: Option<PveBoolean>Try to be more verbose. For now this only enables debug log-level on start.
description: Option<String>Description for the Container. Shown in the web-interface CT’s summary. This is saved as comment inside the configuration file.
entrypoint: Option<String>Command to run as init, optionally with arguments; may start with an absolute path, relative path, or a binary in $PATH.
env: Option<String>The container runtime environment as NUL-separated list. Replaces any lxc.environment.runtime entries in the config.
features: Option<Box<PveFeaturesField>>Allow containers access to advanced features.
force: Option<PveBoolean>Allow to overwrite existing container.
ha_managed: Option<PveBoolean>Add the CT as a HA resource after it was created.
hookscript: Option<String>Script that will be executed during various steps in the containers lifetime.
hostname: Option<String>Set a host name for the container.
ignore_unpack_errors: Option<PveBoolean>Ignore errors when extracting the template.
lock: Option<PveLockEnum>Lock/unlock the container.
memory: Option<i64>Amount of RAM for the container in MB.
nameserver: Option<String>Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
onboot: Option<PveBoolean>Specifies whether a container will be started during system bootup.
ostemplate: StringThe OS template or backup file.
ostype: Option<PveOstypeEnum>OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/
password: Option<String>Sets root password inside container.
pool: Option<String>Add the VM to the specified pool.
protection: Option<PveBoolean>Sets the protection flag of the container. This will prevent the CT or CT’s disk remove/update operation.
restore: Option<PveBoolean>Mark this as restore task.
rootfs: Option<Box<PveRootfsField>>Use volume as container root.
searchdomain: Option<String>Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.
ssh_public_keys: Option<String>Setup public SSH keys (one key per line, OpenSSH format).
start: Option<PveBoolean>Start the CT after its creation finished successfully.
startup: Option<String>Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the ‘up’ or ‘down’ delay in seconds, which specifies a delay to wait before the next VM is started or stopped.
storage: Option<String>Default Storage.
swap: Option<i64>Amount of SWAP for the container in MB.
Tags of the Container. This is only meta information.
template: Option<PveBoolean>Enable/disable Template.
timezone: Option<String>Time zone to use in the container. If option isn’t set, then nothing will be done. Can be set to ‘host’ to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab
tty: Option<i32>Specify the number of tty available to the container
unique: Option<PveBoolean>Assign a unique random ethernet address.
unprivileged: Option<PveBoolean>Makes the container run as unprivileged user. For creation, the default is 1. For restore, the default is the value from the backup. (Should not be modified manually.)
vmid: i32The (unique) ID of the VM.
devs: Option<HashMap<u32, PveDevField>>Devs family. Wire form: dev0..dev8. Serialised by the manual impls below.
mps: Option<HashMap<u32, PveMpField>>Mps family. Wire form: mp0..mp255. Serialised by the manual impls below.
nets: Option<HashMap<u32, PveNetField>>Nets family. Wire form: net0..net31. Serialised by the manual impls below.
unuseds: Option<HashMap<u32, PveUnusedField>>Unuseds family. Wire form: unused0..unused255. Serialised by the manual impls below.
Implementations§
Source§impl LxcCreateVmRequest
impl LxcCreateVmRequest
pub fn new(ostemplate: String, vmid: i32) -> LxcCreateVmRequest
Trait Implementations§
Source§impl Clone for LxcCreateVmRequest
impl Clone for LxcCreateVmRequest
Source§fn clone(&self) -> LxcCreateVmRequest
fn clone(&self) -> LxcCreateVmRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LxcCreateVmRequest
impl Debug for LxcCreateVmRequest
Source§impl Default for LxcCreateVmRequest
impl Default for LxcCreateVmRequest
Source§fn default() -> LxcCreateVmRequest
fn default() -> LxcCreateVmRequest
Source§impl<'de> Deserialize<'de> for LxcCreateVmRequest
impl<'de> Deserialize<'de> for LxcCreateVmRequest
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl PartialEq for LxcCreateVmRequest
impl PartialEq for LxcCreateVmRequest
Source§fn eq(&self, other: &LxcCreateVmRequest) -> bool
fn eq(&self, other: &LxcCreateVmRequest) -> bool
self and other values to be equal, and is used by ==.