xen4.patch
| xen4/attach_disk Wed Apr 15 15:11:11 2015 +0300 | ||
|---|---|---|
| 74 | 74 | |
| 75 | 75 |
exec_and_log "$XM_ATTACH_DISK $DOMAIN $FULL_DISK ${TARGET_PREFIX}$TARGET $MODE" \
|
| 76 | 76 |
"Could not attach $FULL_DISK ($TARGET) to $DOMAIN" |
| 77 | ||
| 78 |
cd "${SOURCE%/*}"
|
|
| 79 |
domain=$(ls deployment.*|sort -t. -k2 -n|tail -1) |
|
| 80 |
sed -i "/^disk = /a\\ |
|
| 81 |
'${FULL_DISK},${TARGET_PREFIX}${TARGET},${MODE}'," $domain
|
|
| 82 | ||
| 83 |
exec_and_log "$SUDO $XM_PATH config-update $DOMAIN $domain" \ |
|
| 84 |
"Could not update config $domain for $DOMAIN" |
|
| xen4/detach_disk Wed Apr 15 15:11:11 2015 +0300 | ||
|---|---|---|
| 26 | 26 | |
| 27 | 27 |
exec_and_log "$XM_DETACH_DISK $DOMAIN ${TARGET_PREFIX}$TARGET" \
|
| 28 | 28 |
"Could not detach $TARGET from $DOMAIN" |
| 29 | ||
| 30 |
cd "${SOURCE%/*}"
|
|
| 31 |
domain=$(ls deployment.*|sort -t. -k2 -n|tail -1) |
|
| 32 |
sed -i "/,${TARGET_PREFIX}${TARGET},/d" $domain
|
|
| 33 | ||
| 34 |
exec_and_log "$SUDO $XM_PATH config-update $DOMAIN $domain" \ |
|
| 35 |
"Could not update config $domain for $DOMAIN" |
|