Added fix for CLOUDSTACK-6389

Added changes for CLOUDSTACK-6389.
More details in the bug.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
Fix few issues seen in run.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>