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.

22 lines
819 B

--- /usr/share/perl5/PVE/API2/Qemu.pm.orig 2021-11-22 17:07:13.000000000 +0100
+++ /usr/share/perl5/PVE/API2/Qemu.pm 2022-01-11 16:24:06.339326806 +0100
@@ -1105,10 +1105,16 @@
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