we only come to the if (!$vmd) check if the previous
if (my $vmd = $vmlist->{ids}->{$name) is taken, which means $vmd is
always true then.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
$d->{max_relocate} = 1 if !defined($d->{max_relocate});
if (PVE::HA::Resources->lookup($d->{type})) {
if (my $vmd = $vmlist->{ids}->{$name}) {
- if (!$vmd) {
- warn "no such VM '$name'\n";
- } else {
- $d->{node} = $vmd->{node};
- $conf->{$sid} = $d;
- }
+ $d->{node} = $vmd->{node};
+ $conf->{$sid} = $d;
} else {
if (defined($d->{node})) {
$conf->{$sid} = $d;