};
my $confdesc_cloudinit = {
+ citype => {
+ optional => 1,
+ type => 'string',
+ description => 'Specifies the cloud-init configuration format. The default depends on the configured operating system type (`ostype`. We use the `nocloud` format for Linux, and `configdrive2` for windows.',
+ enum => ['configdrive2', 'nocloud'],
+ },
+ ciuser => {
+ optional => 1,
+ type => 'string',
+ description => "cloud-init: User name to change ssh keys and password for instead of the image's configured default user.",
+ },
+ cipassword => {
+ optional => 1,
+ type => 'string',
+ description => 'cloud-init: Password to assign the user. Using this is generally not recommended. Use ssh keys instead. Also note that older cloud-init versions do not support hashed passwords.',
+ },
searchdomain => {
optional => 1,
type => 'string',
optional => 1,
type => 'string',
format => 'urlencoded',
- description => "cloud-init : Setup public SSH keys (one key per line, " .
- "OpenSSH format).",
- },
- hostname => {
- optional => 1,
- description => "cloud-init: Hostname to use instead of the vm-name + search-domain.",
- type => 'string', format => 'dns-name',
- maxLength => 255,
+ description => "cloud-init: Setup public SSH keys (one key per line, OpenSSH format).",
},
};
return $prop;
}
+# return copy of $confdesc_cloudinit to generate documentation
+sub cloudinit_config_properties {
+
+ return dclone($confdesc_cloudinit);
+}
+
sub check_type {
my ($key, $value) = @_;
PVE::Storage::activate_volumes($storecfg, $vollist);
- if (!check_running($vmid, 1) && -d "/sys/fs/cgroup/systemd/qemu.slice/$vmid.scope") {
- my $cmd = [];
- push @$cmd, '/bin/systemctl', 'stop', "$vmid.scope";
- eval { run_command($cmd); };
+ if (!check_running($vmid, 1)) {
+ eval {
+ run_command(['/bin/systemctl', 'stop', "$vmid.scope"],
+ outfunc => sub {}, errfunc => sub {});
+ };
}
my $cpuunits = defined($conf->{cpuunits}) ? $conf->{cpuunits}