qcow2 header problem, VM won't start

davethehedgehog

New Member
Apr 1, 2012
3
0
1
Ever since I did an upgrade, one of my VM's won't start. Its a VM running SVN.

When I start at command line I get the following error...

root@proxmox1:/data/images/102# qm start 102
kvm: -drive file=/data/images/102/vm-102-disk-1.qcow2,if=none,id=drive-ide0,aio=native: Header extension too large
kvm: -drive file=/data/images/102/vm-102-disk-1.qcow2,if=none,id=drive-ide0,aio=native: could not open disk image /data/images/102/vm-102-disk-1.qcow2: Invalid argument
start failed: command '/usr/bin/kvm -id 102 -chardev 'socket,id=monitor,path=/var/run/qemu-server/102.mon,server,nowait' -mon 'chardev=monitor,mode=readline' -vnc unix:/var/run/qemu-server/102.vnc,x509,password -pidfile /var/run/qemu-server/102.pid -daemonize -usbdevice tablet -name SVN -smp 'sockets=1,cores=2' -cpu qemu64 -nodefaults -boot 'menu=on' -vga cirrus -k en-us -drive 'if=none,id=drive-ide2,media=cdrom,aio=native' -device 'ide-cd,bus=ide.1,unit=0,drive=drive-ide2,id=ide2,bootindex=200' -drive 'file=/data/images/102/vm-102-disk-1.qcow2,if=none,id=drive-ide0,aio=native' -device 'ide-hd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=100' -m 1024 -netdev 'type=tap,id=net0,ifname=tap102i0,script=/var/lib/qemu-server/pve-bridge' -device 'rtl8139,mac=42:56:CB:11:01:C5,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' -cpuunits 1000' failed: exit code 1


Not sure why this happened. It was working fine, I did an upgrade and a reboot and this VM wouldn't come up. After some googling it looks like the header at the start of the qcow2 image might be corrupt, but I can't find any commands to repair the error.

Any suggestions would be appreciated!
 
try to restore from the last backup.
 
try to restore from the last backup.

Yeah I could do this, but the only backup I have is an application level backup. Ideally I'd rather not, it'll be a bit of a pain! It seems like it should be something that should be so easily fixable with an fsck style command.
 
Yeah I could do this, but the only backup I have is an application level backup. Ideally I'd rather not, it'll be a bit of a pain! It seems like it should be something that should be so easily fixable with an fsck style command.

if you upgrade you should follow the guide, telling you to make a backup.
 
if you upgrade you should follow the guide, telling you to make a backup.

Wow, that's doesn't come across as the most helpful attitude!

Like I said, I could restore from a backup, all my data is backed up in some form or another, in this instance I decided to use the application level backup built into the tool I'm using, less storage used and simple. It's not like its a production VM, so I don't need rapid recovery. I just wondered if it was possible just to repair the qcow2 image as it stood without having to do that. The error I get seems to imply that there has been a simple corruption of the header section of the qcow2 file. I thought it might be possible to run some recovery to rebuild that part of the file.

I guess I'll ask the question elsewhere.
 
Wow, that's doesn't come across as the most helpful attitude!

the main idea of my post was to tell that all upgrades should read the upgrade howto and also act like described to be protected like issue like this. if you do not find this helpful I can also argue that writing documention is useless as our users ignore it.

your error looks serious to me so I recommend to restore from backup, as I wrote.