1
0
mirror of https://github.com/oVirt/ovirt-ansible-v2v-conversion-host.git synced 2026-02-05 15:48:29 +01:00

kubevirt-conversion: handle writing to block devices

When PVs are not filesystem mounts but block devices we need to fake the
files virt-v2v writes to. This also requires corresponding changes in
pod definition as we rely on proper naming of the /dev nodes.

Signed-off-by: Tomáš Golembiovský <tgolembi@redhat.com>
This commit is contained in:
Tomáš Golembiovský
2019-10-10 15:14:18 +02:00
parent 0e5d6dd94e
commit cfe8e00f9d

View File

@@ -24,4 +24,20 @@ echo
echo "... OK ..."
echo
if ls /dev/v2v-disk* 2>/dev/null ; then
echo "Symlinking block devices..."
mkdir -p /data/vm
for d in /dev/v2v-disk* ; do
n=$(expr "$d" : '/dev/v2v-disk\([0-9]*\)')
if [ $? -eq 0 ] ; then
mkdir -p "/data/vm/disk$n"
ln -s "$d" "/data/vm/disk$n/disk.img"
fi
done
fi
echo "Listing content of /data"
ls -lR /data
echo "Starting virt-v2v-wrapper..."
exec /usr/bin/virt-v2v-wrapper $@ < /data/input/conversion.json