Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove PARTITION_ALIGNMENT and fix 4k block size instance disks
Since sfdisk doesn't supprot forced chs geometry any more, in situations where underlaying storage has 4k block, this script will create correct partition table for host, but not for guest which expects 512b blocks. This will make machine unbootable, since once kvm starts partition will be at wrong offset and it won't boot. Solution is to re-create partition table at end using losetup which has 512b blocks. Since PARTITION_ALIGNMENT is created using 4k block as base, it will create filesystem at wrong place if you are using default value of 2048. This hard-codes host partition table to 1M (which will work on hosts with both 512b and 4k blocks) and then use 2048 when using 512b blocks.
- Loading branch information