Parent Directory | Revision Log
turn qemu/kvm image into nbd device
1 | dpavlin | 52 | #!/bin/sh -x |
2 | |||
3 | test -e $1 || ( echo echo "Usage: $0 image.qcow2" ; exit 1 ) | ||
4 | |||
5 | image=$1 | ||
6 | path=$2 | ||
7 | running=`ps ax | grep nbd | grep -v grep | wc -l` | ||
8 | port=`expr 10000 + $running` | ||
9 | |||
10 | kvm-nbd --port $port $image & | ||
11 | echo $! > $image.pid | ||
12 | |||
13 | nbd-client localhost $port /dev/nbd$running || exit | ||
14 | |||
15 | fdisk -l /dev/nbd$running |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |