kvm hangs on mkfs
Hi,
I tried a relatively simple task with qemu-kvm. I have two qcow hd images and try to create filesystems on them using a gentoo installation disk.
Starting qemu with:
qemu -m 512 -cdrom install-x86-minimal-20101116.iso -hda hda.img -hdb hdb.img
However, mkfs always hangs indefinitely. Doesn't really matter if ext2/3/4, it always hangs at
"Writing superblocks and filesystem accounting information:"
Any idea where to start looking for the problem? (please cc me as I'm not subscribed to this list)
Signature · 4 lines
Hanno Böck Blog: http://www.hboeck.de/ GPG: 3DBD3B20 Jabber/Mail: [email protected] http://schokokeks.org - professional webhosting
Quoted 4 lines · Hanno Böck
Hi,
I tried a relatively simple task with qemu-kvm. I have two qcow hd images and try to create filesystems on them using a gentoo installation disk.
qcow2 (I hope you are using that vs just qcow) is known to be a tad on the slow side on metadata heavy operations (i.e. mkfs, installing lots of files, etc.). One trick some of us use is to use the -drive syntax (vs -hda) and set the cache option to unsafe or writeback for the install process. The other alternative is to use preallocated raw images (i.e. made with dd vs qemu-img). I've been informed that in 0.12.5 the writeback trick won't do any good due to some extra fsync()s. So your best bet is to upgrade to 0.13 and use cache=unsafe.
Quoted 9 lines
Starting qemu with:
qemu -m 512 -cdrom install-x86-minimal-20101116.iso -hda hda.img -hdb hdb.imgHowever, mkfs always hangs indefinitely. Doesn't really matter if ext2/3/4, it always hangs at
"Writing superblocks and filesystem accounting information:"
Have you tried strace'ing to see if it's actually doing something (just very slowly)?
Quoted 3 lines
Any idea where to start looking for the problem? (please cc me as I'm not subscribed to this list)
Am Wednesday 08 December 2010 schrieb Brian Jackson:
Quoted 8 lines
qcow2 (I hope you are using that vs just qcow) is known to be a tad on the slow side on metadata heavy operations (i.e. mkfs, installing lots of files, etc.). One trick some of us use is to use the -drive syntax (vs -hda) and set the cache option to unsafe or writeback for the install process. The other alternative is to use preallocated raw images (i.e. made with dd vs qemu-img). I've been informed that in 0.12.5 the writeback trick won't do any good due to some extra fsync()s. So your best bet is to upgrade to 0.13 and use cache=unsafe.
This helped, thanks a lot.
(Maybe this could be documented at a more obvious place? I tried googling quite a lot for the solution - a faq entry explicitely mentioning mkfs? It seems a quite common task to me)
Signature · 4 lines
Hanno Böck Blog: http://www.hboeck.de/ GPG: 3DBD3B20 Jabber/Mail: [email protected] http://schokokeks.org - professional webhosting