Skip to content

Commit

Permalink
Do not link disks when attaching during upgrade (#1889) (#1892)
Browse files Browse the repository at this point in the history
By default, govc vm.disk.attach "links" disks, which sets their disk
mode to independent. Disable this flag to ensure attached disks are
dependent disks, so that snapshots can be taken.

(cherry picked from commit f87e94f)
  • Loading branch information
zjs authored Jul 20, 2018
1 parent 5b41c6e commit 4ee4939
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions installer/build/scripts/upgrade/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -388,10 +388,10 @@ function moveDisks {

# TODO rename to new version
echo "Attaching migrated disks to new VIC appliance"
govc vm.disk.attach -vm="$NEW_VM_NAME" -ds "$NEW_DATASTORE" -disk "$NEW_DATA_DISK" || (log "Failed to attach data disk" && exit 1)
govc vm.disk.attach -vm="$NEW_VM_NAME" -ds "$NEW_DATASTORE" -disk "$NEW_DATA_DISK" -link=false || (log "Failed to attach data disk" && exit 1)
if [ "$ver" != "$VER_1_2_1" ]; then
govc vm.disk.attach -vm="$NEW_VM_NAME" -ds "$NEW_DATASTORE" -disk "$NEW_DB_DISK" || (log "Failed to attach database disk" && exit 1)
govc vm.disk.attach -vm="$NEW_VM_NAME" -ds "$NEW_DATASTORE" -disk "$NEW_LOG_DISK" || (log "Failed to attach log disk" && exit 1)
govc vm.disk.attach -vm="$NEW_VM_NAME" -ds "$NEW_DATASTORE" -disk "$NEW_DB_DISK" -link=false || (log "Failed to attach database disk" && exit 1)
govc vm.disk.attach -vm="$NEW_VM_NAME" -ds "$NEW_DATASTORE" -disk "$NEW_LOG_DISK" -link=false || (log "Failed to attach log disk" && exit 1)
fi
log "Finished attaching migrated disks to new VIC appliance"

Expand Down

0 comments on commit 4ee4939

Please sign in to comment.