From cc8af79397c6dfc067e15f9daf6361c7f94f8792 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 4 Aug 2015 18:11:32 +0200 Subject: [PATCH] dispvm: fallback to tar instead of bsdtar on tmpfs --- dispvm/qubes-prepare-saved-domain.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dispvm/qubes-prepare-saved-domain.sh b/dispvm/qubes-prepare-saved-domain.sh index bc4710f2..9c5c0f98 100755 --- a/dispvm/qubes-prepare-saved-domain.sh +++ b/dispvm/qubes-prepare-saved-domain.sh @@ -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."