1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-16 22:50:10 +03:00

F #3194: Add datastore for live migration (#4223)

This commit is contained in:
Sergio Betanzos 2020-02-24 17:42:40 +01:00 committed by GitHub
parent a53478b42b
commit eec731f00b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,26 @@ define(function(require) {
this.datastoresTable.resetResourceTableSelect();
this.hostsTable.resetResourceTableSelect();
if (this.live) {
if (
this.live &&
vmTemplate &&
vmTemplate.USER_TEMPLATE &&
vmTemplate.USER_TEMPLATE.HYPERVISOR &&
Config && Config.onedConf && Config.onedConf.VM_MAD && Array.isArray(Config.onedConf.VM_MAD)
) {
var hypervisor = $.grep(Config.onedConf.VM_MAD, function(n,i) {
return n.NAME && n.NAME === vmTemplate.USER_TEMPLATE.HYPERVISOR;
})
if (
!hypervisor[0] ||
!hypervisor[0].DS_LIVE_MIGRATION ||
hypervisor[0].DS_LIVE_MIGRATION !== "yes"
) {
$(".migrate_vm_ds_selection", context).hide();
}
}
else {
$(".migrate_vm_ds_selection", context).hide();
}