You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
825 B
23 lines
825 B
--- /usr/share/perl5/PVE/API2/Qemu.pm.orig 2021-04-29 16:16:04.000000000 +0200
|
|
+++ /usr/share/perl5/PVE/API2/Qemu.pm 2022-01-03 12:16:43.275446612 +0100
|
|
@@ -1084,10 +1084,17 @@
|
|
|
|
my $background_delay = extract_param($param, 'background_delay');
|
|
|
|
+ my $conf = PVE::QemuConfig->load_config($vmid);
|
|
+
|
|
+ my $ostype = $conf->{ostype};
|
|
+
|
|
+
|
|
if (defined(my $cipassword = $param->{cipassword})) {
|
|
# Same logic as in cloud-init (but with the regex fixed...)
|
|
- $param->{cipassword} = PVE::Tools::encrypt_pw($cipassword)
|
|
- if $cipassword !~ /^\$(?:[156]|2[ay])(\$.+){2}/;
|
|
+ if (!(PVE::QemuServer::windows_version($ostype))) {
|
|
+ $param->{cipassword} = PVE::Tools::encrypt_pw($cipassword)
|
|
+ if $cipassword !~ /^\$(?:[156]|2[ay])(\$.+){2}/;
|
|
+ }
|
|
}
|
|
|
|
my @paramarr = (); # used for log message
|