Added detection of an existing vm