Fix for Ubuntu, shell is defined for nova user.

To let the ssh-keygen run on the node, nova user should have a shell defined.
Missing cache directory creation for nova is added for Ubuntu
Fix for connecting the metadata server from virtual machines