From: Brian Jackson Subject: Re: kvm hangs on mkfs Date: Wed, 8 Dec 2010 13:48:23 -0600 Message-ID: <201012081348.23220.iggy@theiggy.com> References: <201012082009.26073.hanno@hboeck.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-15 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm@vger.kernel.org To: Hanno =?iso-8859-15?q?B=F6ck?= Return-path: Received: from theiggy.com ([66.220.1.110]:53274 "EHLO mail.theiggy.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756007Ab0LHT5M convert rfc822-to-8bit (ORCPT ); Wed, 8 Dec 2010 14:57:12 -0500 In-Reply-To: <201012082009.26073.hanno@hboeck.de> Sender: kvm-owner@vger.kernel.org List-ID: On Wednesday, December 08, 2010 01:09:25 pm Hanno B=F6ck wrote: > Hi, >=20 > I tried a relatively simple task with qemu-kvm. I have two qcow hd im= ages > and try to create filesystems on them using a gentoo installation dis= k. qcow2 (I hope you are using that vs just qcow) is known to be a tad on = the=20 slow side on metadata heavy operations (i.e. mkfs, installing lots of f= iles,=20 etc.). One trick some of us use is to use the -drive syntax (vs -hda) a= nd set=20 the cache option to unsafe or writeback for the install process. The ot= her=20 alternative is to use preallocated raw images (i.e. made with dd vs qem= u-img).=20 I've been informed that in 0.12.5 the writeback trick won't do any good= due to=20 some extra fsync()s. So your best bet is to upgrade to 0.13 and use=20 cache=3Dunsafe. >=20 > Starting qemu with: > qemu -m 512 -cdrom install-x86-minimal-20101116.iso -hda hda.img -hdb > hdb.img >=20 >=20 > However, mkfs always hangs indefinitely. Doesn't really matter if ext= 2/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=20 slowly)? >=20 > Any idea where to start looking for the problem? (please cc me as I'm= not > subscribed to this list)