Revision 3754e88d src/tm_mad/vmware/mkimage
src/tm_mad/vmware/mkimage | ||
---|---|---|
44 | 44 |
#------------------------------------------------------------------------------- |
45 | 45 |
DST_PATH=`arg_path $DST` |
46 | 46 |
DST_HOST=`arg_host $DST` |
47 |
DST_DIR=`dirname $DST_PATH` |
|
47 | 48 |
|
48 |
ssh_make_path $DST_HOST $DST_PATH
|
|
49 |
ssh_make_path $DST_HOST $DST_DIR
|
|
49 | 50 |
|
50 | 51 |
#------------------------------------------------------------------------------- |
51 | 52 |
# Make the new image (file-based) |
52 | 53 |
#------------------------------------------------------------------------------- |
53 | 54 |
MKFS_CMD=`mkfs_command $DST_PATH $FSTYPE $SIZE` |
54 | 55 |
|
56 |
CREATE_IMAGE="mkdir -p $DST_PATH" |
|
57 |
|
|
55 | 58 |
MKSCRIPT=$(cat <<EOF |
56 | 59 |
export PATH=/usr/sbin:/sbin:\$PATH |
60 |
$CREATE_IMAGE |
|
57 | 61 |
$MKFS_CMD |
58 | 62 |
EOF |
59 | 63 |
) |
60 | 64 |
|
61 | 65 |
log "Making filesystem of ${SIZE}M and type $FSTYPE at $DST" |
62 | 66 |
|
63 |
ssh_exec_and_log $DST_HOST "$MKSCRIPT" "Could not create image $DST_PATH/disk.vmdk"
|
|
67 |
ssh_exec_and_log $DST_HOST "$MKSCRIPT" "Could not create image $DST_PATH" |
|
64 | 68 |
|
65 | 69 |
exit 0 |
Also available in: Unified diff