$cpucache
$cpufeatures
@@ -2096,6 +2099,17 @@
return $var;
}
+ function domain_get_cpu_migrate($domain) {
+ $tmp = $this->get_xpath($domain, '//domain/cpu/@migratable', false);
+ if (!$tmp)
+ return 'no';
+
+ $var = $tmp[0];
+ unset($tmp);
+
+ return $var;
+ }
+
function domain_get_vcpu($domain) {
$tmp = $this->get_xpath($domain, '//domain/vcpu', false);
$var = $tmp[0];
diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
index 939d352ed..f09ef6f65 100644
--- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
+++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php
@@ -53,6 +53,7 @@
'maxmem' => 1024 * 1024,
'password' => '',
'cpumode' => 'host-passthrough',
+ 'cpumigrate' => 'on',
'vcpus' => 1,
'vcpu' => [0],
'hyperv' => 1,
@@ -312,13 +313,26 @@
+
+ $migratehidden = "disabled hidden" ;
+ if ($arrConfig['domain']['cpumode'] == 'host-passthrough') $migratehidden = "" ;
+ ?>
+
- | _(CPU Mode)_: |
+ _(CPU)_ _(Mode)_: |
- |
@@ -380,10 +394,8 @@
}
?>
-
-
- _(Max)_ _(Memory)_: |
-
+
+ _(Max)_ _(Memory)_:
echo mk_option($arrConfig['domain']['maxmem'], 128 * 1024, '128 MB');
@@ -396,7 +408,6 @@
?>
|
- |
@@ -1833,6 +1844,23 @@ $(function() {
}
});
+ $("#vmform").on("change", ".cpu", function changeCPUEvent() {
+ var myvalue = $(this).val();
+ var mylabel = $(this).children('option:selected').text();
+ var cpumigrate = document.getElementById("domain_cpumigrate_text") ;
+ var cpumigrate_text = document.getElementById("domain_cpumigrate") ;
+ if (myvalue == "custom") {
+ document.getElementById("domain_cpumigrate_text").style.visibility="hidden";
+ document.getElementById("domain_cpumigrate").style.visibility="hidden";
+ } else {
+ document.getElementById("domain_cpumigrate_text").style.display="inline";
+ document.getElementById("domain_cpumigrate_text").style.visibility="visible";
+ document.getElementById("domain_cpumigrate").style.display="inline";
+ document.getElementById("domain_cpumigrate").style.visibility="visible";
+ }
+
+ }) ;
+
$("#vmform").on("change", ".gpu", function changeGPUEvent() {
var myvalue = $(this).val();
var mylabel = $(this).children('option:selected').text();