Browse Source

disable cpu downgrade on running VM

andre 4 years ago
parent
commit
921aa2d0d1
1 changed files with 9 additions and 0 deletions
  1. 9 0
      app/UI/VmUpdate/Sections/Qemu/GeneralSection.php

+ 9 - 0
app/UI/VmUpdate/Sections/Qemu/GeneralSection.php

@@ -98,6 +98,15 @@ class GeneralSection extends BaseSection
                 $field->addValidator(new NumberValidator($this->resourceManager->vcpus()->getMin(), $this->resourceManager->vcpus()->free(),true));
                 $field->setDescription('description');
             } else {
+
+                logModuleCall(
+                    'proxmoxCloud',
+                    __FUNCTION__,
+                    $vm->config(['vcpus']),
+                    'Debug',
+                    $this->resourceManager->vcpus()->getMin()
+                );
+
                 $field = new Range('vcpus',$vm->config(['vcpus']), $this->resourceManager->vcpus()->free());
                 $field->addValidator(new NumberValidator($vm->config(['vcpus']), $this->resourceManager->vcpus()->free(),true));
                 $field->setDescription('Zur Reduzierung der CPUs muß die VM heruntergefahren sein!');