Improvements for compatibility with OpenNebula and bug fix