Replace createvm with a test function