description=>"Specifies whether a VM will be started during system bootup.",
default=>0,
},
cpus=>{
optional=>1,
type=>'integer',
description=>"The number of CPUs for this container.",
minimum=>1,
default=>1,
},
cpuunits=>{
optional=>1,
type=>'integer',
description=>"CPU weight for a VM. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this VM gets. Number is relative to weights of all the other running VMs.\n\nNOTE: You can disable fair-scheduler configuration by setting this to 0.",
minimum=>0,
maximum=>500000,
default=>1000,
},
memory=>{
optional=>1,
type=>'integer',
description=>"Amount of RAM for the VM in MB.",
minimum=>16,
default=>512,
},
swap=>{
optional=>1,
type=>'integer',
description=>"Amount of SWAP for the VM in MB.",
minimum=>16,
default=>512,
},
disk=>{
optional=>1,
type=>'number',
description=>"Amount of disk space for the VM in GB.",
minimum=>0.5,
default=>2,
},
quotatime=>{
optional=>1,
type=>'integer',
description=>"Set quota grace period (seconds).",
minimum=>0,
default=>0,
},
quotaugidlimit=>{
optional=>1,
type=>'integer',
description=>"Set maximum number of user/group IDs in a container for which disk quota inside the container will be accounted. If this value is set to 0, user and group quotas inside the container will not.",
minimum=>0,
default=>0,
},
hostname=>{
optional=>1,
description=>"Set a host name for the container.",
type=>'string',
maxLength=>255,
},
description=>{
optional=>1,
type=>'string',
description=>"Container description. Only used on the configuration web interface.",
},
searchdomain=>{
optional=>1,
type=>'string',
description=>"Sets DNS search domains for a container.",
},
nameserver=>{
optional=>1,
type=>'string',
description=>"Sets DNS server IP address for a container.",
},
ip_address=>{
optional=>1,
type=>'string',
description=>"Specifies the address the container will be assigned.",
},
netif=>{
optional=>1,
type=>'string',format=>'pve-openvz-netif',
description=>"Specifies network interfaces for the container.",
},
};
# add JSON properties for create and set function
sub json_config_properties{
my$prop=shift;
foreachmy$opt(keys%$confdesc){
$prop->{$opt}=$confdesc->{$opt};
}
return$prop;
}
# read global vz.conf
my$read_global_vz_config=sub {
my$res={
rootdir=>'/var/lib/vz/root/$VEID',# note '$VEID' is a place holder
privatedir=>'/var/lib/vz/private/$VEID',# note '$VEID' is a place holder