cpulimit => {
optional => 1,
type => 'number',
- description => "Limit of CPU usage. Note if the computer has 2 CPUs, it has total of '2' CPU time. Value '0' indicates no CPU limit.",
+ description => "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.",
minimum => 0,
maximum => 128,
default => 0,
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.",
+ 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 the 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 => 1024,
searchdomain => {
optional => 1,
type => 'string', format => 'dns-name-list',
- description => "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.",
+ description => "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
},
nameserver => {
optional => 1,
type => 'string', format => 'address-list',
- description => "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain or nameserver.",
+ description => "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver.",
},
rootfs => get_standard_option('pve-ct-rootfs'),
parent => {
protection => {
optional => 1,
type => 'boolean',
- description => "Sets the protection flag of the container. This will prevent the remove operation. This will prevent the CT or CT's disk remove/update operation.",
+ description => "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation.",
default => 0,
},
unprivileged => {
my $cfspath = cfs_config_path($vmid, $node);
my $conf = PVE::Cluster::cfs_read_file($cfspath);
- die "container $vmid does not exists\n" if !defined($conf);
+ die "container $vmid does not exist\n" if !defined($conf);
return $conf;
}
}
# flock: we use one file handle per process, so lock file
-# can be called multiple times and succeeds for the same process.
+# can be called multiple times and will succeed for the same process.
my $lock_handles = {};
my $lockdir = "/run/lock/lxc";
my @args = split(/\0/, $cmdline);
- # serach for lxc-console -n <vmid>
+ # search for lxc-console -n <vmid>
return if scalar(@args) != 3;
return if $args[1] ne '-n';
return if $args[2] !~ m/^\d+$/;
my $ttycount = get_tty_count($conf);
$raw .= "lxc.tty = $ttycount\n";
- # some init scripts expects a linux terminal (turnkey).
+ # some init scripts expect a linux terminal (turnkey).
$raw .= "lxc.environment = TERM=linux\n";
my $utsname = $conf->{hostname} || "CT$vmid";
}
}
- die "To many unused volume - please delete them first.\n" if !$key;
+ die "Too many unused volumes - please delete them first.\n" if !$key;
$config->{$key} = $volid;
# Internal snapshots
# NOTE: Snapshot create/delete involves several non-atomic
-# action, and can take a long time.
-# So we try to avoid locking the file and use 'lock' variable
+# actions, and can take a long time.
+# So we try to avoid locking the file and use the 'lock' variable
# inside the config file instead.
my $snapshot_copy_config = sub {
if ($mode eq 'snapshot') {
if (!PVE::LXC::has_feature('snapshot', $conf, $storage_cfg)) {
- die "mode failure - some volumes does not support snapshots\n";
+ die "mode failure - some volumes do not support snapshots\n";
}
if ($conf->{snapshots} && $conf->{snapshots}->{vzdump}) {
mkpath $rootdir;
&$check_mountpoint_empty($rootdir);
- # set snapshot_count (freezes CT it snapshot_count > 1)
+ # set snapshot_count (freezes CT if snapshot_count > 1)
$task->{snapshot_count} = scalar(@$volid_list);
} elsif ($mode eq 'stop') {
&$lockconfig($self, $vmid);
}
if ($mode ne 'suspend') {
- # If we preform mount operations, let's unshare the mount namespace
+ # If we perform mount operations, let's unshare the mount namespace
# to not influence the running host.
PVE::Tools::unshare(PVE::Tools::CLONE_NEWNS);
PVE::Tools::run_command(['mount', '--make-rprivate', '/']);
sub snapshot {
my ($self, $task, $vmid) = @_;
- $self->loginfo("create storage snapshot snapshot");
+ $self->loginfo("create storage snapshot 'vzdump'");
# todo: freeze/unfreeze if we have more than one volid
PVE::LXC::snapshot_create($vmid, 'vzdump', "vzdump backup snapshot");
# reload config
my $conf = $self->{vmlist}->{$vmid} = PVE::LXC::load_config($vmid);
- die "unable to read vzdump shanpshot config - internal error"
+ die "unable to read vzdump snapshot config - internal error"
if !($conf->{snapshots} && $conf->{snapshots}->{vzdump});
my $disks = $task->{disks};
# note: --remove-files does not work because we do not
# backup all files (filters). tar complains:
# Cannot rmdir: Directory not empty
- # we we disable this optimization for now
+ # we disable this optimization for now
#if ($snapdir eq $task->{tmpdir} && $snapdir =~ m|^$opts->{dumpdir}/|) {
# push @$tar, "--remove-files"; # try to save space
#}
- # The directory parameter can give a alternative directory as source.
+ # The directory parameter can give an alternative directory as source.
# the second parameter gives the structure in the tar.
push @$tar, "--directory=$tmpdir", './etc/vzdump/pct.conf';
push @$tar, "./etc/vzdump/pct.fw" if $task->{fw};