Compare commits
No commits in common. "7b1d549fcb7b39312c5c2421df3e74746244a964" and "e10d3e66bcad0682bc5a4e36d45a3ad6d5d3a5f4" have entirely different histories.
7b1d549fcb
...
e10d3e66bc
@ -3,14 +3,14 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Get HD filename
|
# Get HD filename
|
||||||
FILENAME=`vboxmanage showvminfo kaz-vm | grep SATA | grep UUID | cut -d':' -f2 | cut -d'(' -f1 | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//'`
|
FILENAME=`vboxmanage showvminfo kaz-dev-amd64 | grep SATA | grep UUID | cut -d':' -f2 | cut -d'(' -f1 | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//'`
|
||||||
|
|
||||||
# Split the dir and filename
|
# Split the dir and filename
|
||||||
DIR=`dirname "$FILENAME"`
|
DIR=`dirname "$FILENAME"`
|
||||||
FILE=`basename "$FILENAME"`
|
FILE=`basename "$FILENAME"`
|
||||||
|
|
||||||
# Get HD UUID
|
# Get HD UUID
|
||||||
UUID=`vboxmanage showvminfo kaz-vm | grep SATA | grep UUID | cut -d':' -f 3| cut -d')' -f1 | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//'`
|
UUID=`vboxmanage showvminfo kaz-dev-amd64 | grep SATA | grep UUID | cut -d':' -f 3| cut -d')' -f1 | sed -e 's/^[ \t]*//' | sed -e 's/[ \t]*$//'`
|
||||||
|
|
||||||
# echo -e $DIR
|
# echo -e $DIR
|
||||||
# echo -e $FILE
|
# echo -e $FILE
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Get HD UUID
|
|
||||||
HDUUID=`vboxmanage showvminfo kaz-vm --machinereadable | grep ImageUUID | cut -d= -f2 | sed -e "s/\"//g"`
|
|
||||||
|
|
||||||
# Get storage controller
|
|
||||||
STCTRL=`vboxmanage showvminfo kaz-vm --machinereadable | grep storagecontrollername0 | cut -d= -f2 | sed -e "s/\"//g"`
|
|
||||||
|
|
||||||
#echo -e $HDUUID
|
|
||||||
#echo -e $STCTRL
|
|
||||||
|
|
||||||
vboxmanage storageattach kaz-vm --medium="$HDUUID" --storagectl="${STCTRL}" --port=0 --discard=on --nonrotational=on
|
|
||||||
|
|
||||||
echo "Trim enabled !"
|
|
Loading…
Reference in New Issue
Block a user