vm images are not removed from XenServer storage when euca-terminate-instance is executed
Bug #676128 reported by
Armando Migliaccio
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Armando Migliaccio |
Bug Description
This is a known issue; when an instance is terminated, we need to make sure that the VM's image is deleted from whichever storage the vm is attached to.
Changed in nova: | |
assignee: | nobody → Armando Migliaccio (armando-migliaccio) |
Changed in nova: | |
status: | New → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Here's the code in Java (sorry don't have it in python)
// The tricky part in destroying a VM, is to find the disks before terminating esToDelete = new ArrayList<VDI>(); connection) ) { connection) .equals( vm) { connection) ; ly(connection) ) { skImagesToDelet e.add(vdi) ;
// the machine, and delete the disks after terminating the machine.
// find vm's virtuaL disks
List<VDI> virtualDiskImag
for (VBD vbd : VBD.getAll(
if (vbd.getVM(
VDI vdi = vbd.getVDI(
if (!vdi.getReadOn
virtualDi
}
}
}
// destroy vm and disks connection) ; esToDelete) { connection) ;
vm.destroy(
for (VDI vdi : virtualDiskImag
vdi.destroy(
}