[Libvirt-cim] [PATCH] cimtest: fix guest images generation
Jincheng Miao
jmiao at redhat.com
Sat Aug 3 16:14:17 UTC 2013
Parted-3.1 remove mkpartfs capability. When generating guest images, it should
use external tools (like mke2fs) to create filesystem.
Signed-off-by: Jincheng Miao <jmiao at redhat.com>
---
suites/libvirt-cim/images/xmt-makefv.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/suites/libvirt-cim/images/xmt-makefv.sh b/suites/libvirt-cim/images/xmt-makefv.sh
index 1cf6a0f..85a340c 100755
--- a/suites/libvirt-cim/images/xmt-makefv.sh
+++ b/suites/libvirt-cim/images/xmt-makefv.sh
@@ -51,7 +51,7 @@ partition() {
local file=$1
$PARTED $file mklabel msdos
- $PARTED $file mkpartfs primary ext2 0 $(($SIZE - 1))
+ $PARTED $file mkpart primary ext2 0 $(($SIZE - 1))
}
mount_partition() {
@@ -62,7 +62,10 @@ mount_partition() {
losetup /dev/$loopdev $file || die "Failed to losetup $file"
kpartx -a /dev/$loopdev || die "Failed to kpartx $loopdev"
+ sleep 2
+ mke2fs -t ext2 /dev/mapper/${loopdev}p1 >/dev/null 2>&1 || die "Failed to mkfs ${loopdev}p1"
tune2fs -j /dev/mapper/${loopdev}p1 >/dev/null 2>&1|| die "Failed to add journal"
+ sleep 2
mount /dev/mapper/${loopdev}p1 $TMPMOUNT || die "Failed to mount ${loopdev}p1"
echo $loopdev
--
1.8.3.1
More information about the Libvirt-cim
mailing list