It seems that you are looking for transactional behavior and, in particular, for atomicity ("all or nothing"). But usually a “transaction” implies certain guarantees (especially with regard to ACID properties) that will be difficult or impossible to achieve when a person’s timeline is involved for an order of minutes.
The “error-compensated workflow” is probably more than what you would be looking for here.
I would do it manually, possibly with tool support (e.g. for workflows). Turn off the process of creating your network and keep track of current progress, such as created virtual machines, running virtual machines, etc. If there are errors that require rollback, try another process that performs the cleanup. The behavior of the cleaning process itself may fail, so it can repeat its various steps several times before creating a report that says "this cleaning step failed."
If shared resources are involved, you will also need to implement some kind of isolation mechanism. Sometimes it’s quite simple - for example, DHCP helps to avoid duplication of IP addresses. If you are updating a DNS zone file, you need to synchronize access to it to avoid simultaneous recording. Etc.
source share