kvm destroys images when host disk is full
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kvm (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: kvm
If the hosts filesystem runs out of space and qemu/KVM is running, it destroys the image in an unrecoverable way. I noticed this because my Linux and Windows system notices a broken filesystem and can't repair it or loses files randomly.
My hosts filesystem was running out of space at that time.
I have created snapshots with kvm with the intention that I have a fixed point where I could jump to despite anything what possibly could happen. KVM just left that image with the snapshots in an unusable state and I lost my data.
I expected qemu/kvm to not crash my data. It maybe could stop attempting to write and stop the virtual maschine if the host disk is running low on space.
To reproduce, simply create an image
* qemu create -f qcow2 image.img 30G
Install an OS there
Take a snapshot
run out of diskspace on the host
try to do something in the guest
try to recover your snapshot
try to find your data: it's gone.
ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 8.10
Package: kvm 1:72+dfsg-1ubuntu6
SourcePackage: kvm
Uname: Linux 2.6.28-7-generic x86_64
This has been fixed in kvm-84 (available in Jaunty). By default, write errors (including ENOSPC) are passed to the guest. You can modify this behavior to pause the VM on ENOSPC by specifying werror=enospc in the -drive parameter. werror=enospc will be the default for kvm-85.