dispvm: fallback to tar instead of bsdtar on tmpfs

This commit is contained in:
Marek Marczykowski-Górecki 2015-08-04 18:11:32 +02:00
parent 46b94b6682
commit cc8af79397
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -70,5 +70,12 @@ else
fi
ln -snf $VMDIR /var/lib/qubes/dvmdata/vmdir
cd $VMDIR
bsdtar -cSf saved-cows.tar volatile.img
fstype=`df --output=fstype $VMDIR | tail -n 1`
if [ "$fstype" = "tmpfs" ]; then
# bsdtar doesn't work on tmpfs because FS_IOC_FIEMAP ioctl isn't supported
# there
tar -cSf saved-cows.tar volatile.img
else
bsdtar -cSf saved-cows.tar volatile.img
fi
echo "DVM savefile created successfully."