Fix few issues seen in run.

Signed-off-by: Santhosh Edukulla <Santhosh.Edukulla@citrix.com>
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>