fixup: use parse_property_string instead of parse_cpu_conf_basic

The latter was removed and replaced with a validator.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2020-07-09 14:41:14 +02:00 committed by Thomas Lamprecht
parent b54ba7a170
commit b53ba8d0f1

View File

@ -233,7 +233,7 @@ sub prepare {
# Since the parameter itself contains no reference to a custom model, # Since the parameter itself contains no reference to a custom model,
# this makes migration independent of changes to "cpu-models.conf". # this makes migration independent of changes to "cpu-models.conf".
if ($conf->{cpu}) { if ($conf->{cpu}) {
my $cpuconf = PVE::QemuServer::CPUConfig::parse_cpu_conf_basic($conf->{cpu}); my $cpuconf = PVE::JSONSchema::parse_property_string('pve-cpu-conf', $conf->{cpu});
if ($cpuconf && PVE::QemuServer::CPUConfig::is_custom_model($cpuconf->{cputype})) { if ($cpuconf && PVE::QemuServer::CPUConfig::is_custom_model($cpuconf->{cputype})) {
$self->{forcecpu} = PVE::QemuServer::CPUConfig::get_cpu_from_running_vm($pid); $self->{forcecpu} = PVE::QemuServer::CPUConfig::get_cpu_from_running_vm($pid);
} }