Move stuff to cloudvm-common class