Description of problem: See summary. The issue doesn't exists when using a virtio interface for disk. Version-Release number of selected component (if applicable): libguestfs-1.8.2-1.fc14.x86_64 ><fs> add-drive-with-if build/appliances/i686/centos/5/jeos-centos/ec2-plugin/tmp/jeos-centos.ec2 ide add_drive_with_if "build/appliances/i686/centos/5/jeos-centos/ec2-plugin/tmp/jeos-centos.ec2" "ide" = 0 ><fs> launch launch[00000ms] febootstrap-supermin-helper --verbose -f checksum '/usr/lib64/guestfs/supermin.d' x86_64 [SNIP] ><fs> mkfs 'ext3' /dev/sda mkfs "ext3" "/dev/sda"send_to_daemon: 0x18b2480 g->state = 3, n = 64 proc 138 (readdir) took 0.00 seconds recv_from_daemon: 0x18b2480 g->state = 3, size_rtn = 0x7fff53d1b13c, buf_rtn = 0x7fff53d1b130 mkfs -t ext3 /dev/sda mke2fs 1.41.12 (17-May-2010) guestfsd: error: ext3: /dev/sda: mke2fs 1.41.12 (17-May-2010) = -1 (error) libguestfs: error: mkfs: ext3: /dev/sda: mke2fs 1.41.12 (17-May-2010) ><fs>
In fact mkfs.ext3 asks a question when asked to create a filesystem on /dev/sda (not on /dev/vda though!) /dev/sda is entire device, not just one partition! Proceed anyway? (y,n) The way forward is to special-case this by running mke2fs (not mkfs) with the -F option.
Fixed upstream: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=227bea6c7ef89b707fe2c01c4d0d0fb9081e8c04
This one is also needed for RHEL 5: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=a0e3b2183733c7440ad017c4ffe361935672339b