From d6cb95208bbd3d22fedc1868e804dac3cba9bf06 Mon Sep 17 00:00:00 2001 From: Vijayendra Bhamidipati Date: Wed, 17 Jul 2013 10:23:51 -0700 Subject: [PATCH] CLOUDSTACK-3554: NPE while attaching VMWARE Tools ISO to the instance Description: Account for null imagestore for vmware-tools iso. --- .../com/cloud/storage/resource/VmwareStorageProcessor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java index 411380305d1..3436c5b2e45 100644 --- a/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java +++ b/plugins/hypervisors/vmware/src/com/cloud/storage/resource/VmwareStorageProcessor.java @@ -869,7 +869,9 @@ public class VmwareStorageProcessor implements StorageProcessor { } TemplateObjectTO iso = (TemplateObjectTO)disk.getData(); NfsTO nfsImageStore = (NfsTO)iso.getDataStore(); - String storeUrl = nfsImageStore.getUrl(); + String storeUrl = null; + if (nfsImageStore != null) + storeUrl = nfsImageStore.getUrl(); if (storeUrl == null) { if (!iso.getName().equalsIgnoreCase("vmware-tools.iso")) { String msg = "ISO store root url is not found in AttachIsoCommand";