Description of problem: $ guestfish -N part mkswap /dev/sda1 : pvcreate /dev/sda1 libguestfs: error: pvcreate: WARNING: swap signature detected on /dev/sda1. Wipe it? [y/n] Aborting pvcreate on /dev/sda1. But note that other content is fine. For example if the partition contained an ext2 filesystem before, then pvcreate works: $ guestfish -N part mkfs ext2 /dev/sda1 : pvcreate /dev/sda1 [no error] Version-Release number of selected component (if applicable): libguestfs 1.20.0 How reproducible: 100% Steps to Reproduce: See above. Additional information: For some reason this especially affects the test suite under RHEL 7. It may be that a combination of tests has been disabled, such that when we come to test pvcreate there happens to be a swap space signature on the partition.
Fixed upstream in: https://github.com/libguestfs/libguestfs/commit/8237ac89c5b51490f3f3c6f44d35ecaa184dca05
With 1.20.1-2 package, this works.