8 # This exercises a number of interesting codepaths including resizing
9 # LV content, handling GPT, and using qcow2 as a target.
11 ../fish/guestfish -N bootrootlv:/dev/VG/LV:ext2:ext4:400M:32M:gpt </dev/null
13 qemu-img create -f qcow2 test2.img 500M
14 ./virt-resize -d --expand /dev/sda2 --lv-expand /dev/VG/LV test1.img test2.img
16 # Test shrinking in a semi-realistic scenario. Although the disk
17 # image created above contains no data, we will nevertheless use
18 # similar operations to ones that might be used by a real admin.
20 ../fish/guestfish -a test1.img <<EOF
22 resize2fs-size /dev/VG/LV 190M
23 lvresize /dev/VG/LV 190
24 pvresize-size /dev/sda2 200M
28 rm -f test2.img; truncate -s 300M test2.img
29 ./virt-resize -d --shrink /dev/sda2 test1.img test2.img
31 rm -f test1.img test2.img