blob: 01bfcd8e6212ad5a240f0d35048f6948ea84e167 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
VM=`xm domid tpath1.para`
/usr/sbin/xm block-list $VM |
(
clean=0
read header
read skipline # Skip one line - this is the block for the virtual drive.
# read another line here, if we should skip it.
# Now read in the rest.
# Vdev BE handle state evtch ringref BEpath
while read vdev junk
do
clean=1
echo Performing /usr/sbin/xm block-detach $VM $vdev
/usr/sbin/xm block-detach $VM $vdev
done
if [ "$clean" -eq 0 ] ; then
echo "Nothing to clean!"
fi
)
|