config-tools: add property check before IVSHMEM
If IVSHMEM is not presented, reading its property could lead to
failure in js. Add property check before it.
@@ -286,6 +286,7 @@ export default {
},
vmNameChange(newname, oldname) {
let hvdata = this.scenario.hv
+ if (hvdata.FEATURES.hasOwnProperty('IVSHMEM')) {
for (let key in hvdata.FEATURES.IVSHMEM.IVSHMEM_REGION) {
let region = hvdata.FEATURES.IVSHMEM.IVSHMEM_REGION[key]
for (let key1 in region.IVSHMEM_VMS.IVSHMEM_VM) {
@@ -295,6 +296,7 @@ export default {
}
}
}
+ }
},
assignVMID() {
let vm_priority = {
