Undo "Revert "CLOUDSTACK-7647"

This reverts commit 38bd1b934ef770e8a2993c8f42b3fff03484f266.