diff --git a/src/sunstone/public/app/opennebula/vm.js b/src/sunstone/public/app/opennebula/vm.js index ec0eb93462..c6af49096a 100644 --- a/src/sunstone/public/app/opennebula/vm.js +++ b/src/sunstone/public/app/opennebula/vm.js @@ -1286,7 +1286,8 @@ define(function(require) { var actionEnabled = Config.isTabActionEnabled("vms-tab", "VM.save_virt_viewer"); var vncSupported = graphicSupported(element, "vnc"); var spiceSupported = graphicSupported(element, "spice"); - var isKVM = history.HID ? isKVMVM(history.HID) : false; + var hostId = history && history.HID + var isKVM = hostId ? isKVMVM(hostId) : false; return (actionEnabled && history && (vncSupported || spiceSupported) && isKVM) ? {