mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
Add files via upload
This commit is contained in:
parent
1e3a410aa2
commit
7bc629440b
18
VIRTBOX/vb-virtmedia-cleanup.sh
Normal file
18
VIRTBOX/vb-virtmedia-cleanup.sh
Normal file
@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# cleanup inaccessible disks in VMM
|
||||
vboxmanage list hdds > /tmp/vbox-hds-all.txt
|
||||
|
||||
vboxmanage list hdds |grep -B 2 'State: inaccessible' \
|
||||
|egrep -v 'Parent|State|--' >/tmp/infile-vboxdel.txt
|
||||
#zfs-SAS-T5-12*.vdi > /tmp/infile.txt
|
||||
|
||||
#set -x
|
||||
while read line; do
|
||||
delme=$(echo "$line" |awk '{print $2}')
|
||||
echo "$delme" >> /tmp/vbox-hd-inacc-del.log
|
||||
|
||||
vboxmanage closemedium disk "$delme" --delete
|
||||
done < /tmp/infile-vboxdel.txt
|
||||
|
||||
date;
|
Loading…
x
Reference in New Issue
Block a user