The problem was found when I populated some 4k sector sized LUNs to kvm. Without applying any work-arounds, it is not possible to use 4k sector size disks in a qemu-kvm setup.  During kickstart the virtio disk driver see the volumes as 512 byte logical and 512 byte physical disks. 

Anaconda is able to see the disk and partition it.  However as soon as it tries to format the partitions it fails with 'short writes'.Problem was that when formating the partition, it always failed on 'short read' error.


Kernel  2.6.32-504.3.3.el6.x86_64

The device looks like

#fdisk -l /dev/mapper/vmtest1 #Note: sector size is 4096 (not 512)

Disk /dev/mapper/vmtest1: 21.0 GB, 20971520000 bytes
16 heads, 63 sectors/track, 5079 cylinders
Units = cylinders of 1008 * 4096 = 4128768 bytes
Sector size (logical/physical): 4096 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 134217728 bytes
Disk identifier: 0x000c02a4

Installing the guest fails as always, with a short read on formating any partition.

Then I found a bugzilla entry that tells me how to make qemu-kvm accept 4k sector sized disks:

So I added the blockio line to the domain xml and qemu-kvm can see the volumes as 4k logical/physical

# virsh dumpxml vmtest1
     <disk type='block' device='disk'>
       <driver name='qemu' type='raw' cache='none' io='native'/>
       <source dev='/dev/vg1/vmtest1'/>
       <blockio logical_block_size='4096' physical_block_size='4096'/>
       <target dev='vda' bus='virtio'/>



There is another way to let qeum to see 4k logical/physical disks.

Add qemu:arg parameters, provided that xmlns tag is added as well:


<domain type='kvm' xmlns:qemu=''>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.virtio-disk0.scsi=off'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.virtio-disk0.x-data-plane=on'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.virtio-disk0.logical_block_size=4096'/>
    <qemu:arg value='-set'/>
    <qemu:arg value='device.virtio-disk0.physical_block_size=4096'/>




Once you are done for above steps, then you are able to successfully format partitions and complete the kickstart installation. 

However it then fails at the grub interface with:
 Error 21: Selected disk does not exist


Note that both gpt labels and parted partitioning, and msdos labels and fdisk partitioning were tried.


This issue will not be a problem at SL7, since grub2 is able to handle 4k sector sizes.

Just my experience.