Changeset 2020 for trunk/packages


Ignore:
Timestamp:
Jan 27, 2009, 1:36:51 AM (16 years ago)
Author:
broder
Message:

If the autoinstall or initial boot of a VM fails, destroy the VM
immediately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-web/code/controls.py

    r1721 r2020  
    111111        raise
    112112    makeDisks(machine)
    113     if autoinstall:
    114         lvinstall(machine, autoinstall)
    115     else:
    116         # tell it to boot with cdrom
    117         bootMachine(machine, cdrom)
     113    try:
     114        if autoinstall:
     115            lvinstall(machine, autoinstall)
     116        else:
     117            # tell it to boot with cdrom
     118            bootMachine(machine, cdrom)
     119    except CodeError, e:
     120        deleteVM(machine)
     121        raise
    118122    return machine
    119123
Note: See TracChangeset for help on using the changeset viewer.