VM removal from vsphere when there is no host

We are getting from time to time deadlocks on host creation (it seems to be
a known issue in rails). Until this is fixed, we would like to have a way
to cleanup the vcenter: when the deadlock occurs the vm is created, but not
the host. Is there a way to remove this vm using foreman api and not vmware