Kaynağa Gözat

try disable memory downgrade on running VMs

andre 4 yıl önce
ebeveyn
işleme
fdead5c241

+ 1 - 1
app/UI/VmUpdate/Sections/Qemu/GeneralSection.php

@@ -125,7 +125,7 @@ class GeneralSection extends BaseSection
             $this->addField($field);
             $this->addField($field);
         }
         }
         //memory
         //memory
-        if($vm->isStopped()) {
+        if(!$vm->isRunning()) {
             $field = new Range('memory', $this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free());
             $field = new Range('memory', $this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free());
             $field->addValidator(new NumberValidator($this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free(),true));
             $field->addValidator(new NumberValidator($this->resourceManager->memory()->getMin(), $this->resourceManager->memory()->free(),true));
             $field->setDescription('description');
             $field->setDescription('description');