check key existence and auto register the default key if not yet registered before starting a vm