diff --git a/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh b/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh index 6303e27fc02..1aca2790340 100755 --- a/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh +++ b/scripts/vm/hypervisor/xenserver/copy_vhd_from_secondarystorage.sh @@ -48,7 +48,7 @@ if [ $? -ne 0 ]; then exit 0 fi -mount -o tcp,ro $mountpoint $localmp +mount -o tcp,soft,ro,timeo=133,retrans=1 $mountpoint $localmp if [ $? -ne 0 ]; then echo "6#can't mount $mountpoint to $localmp" exit 0 diff --git a/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh b/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh index ffad4c6d6c5..a50078d0b9a 100755 --- a/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh +++ b/scripts/vm/hypervisor/xenserver/copy_vhd_to_secondarystorage.sh @@ -56,7 +56,7 @@ if [ $? -ne 0 ]; then exit 0 fi -mount -o tcp $mountpoint $localmp +mount -o tcp,soft,timeo=133,retrans=1 $mountpoint $localmp if [ $? -ne 0 ]; then echo "6#can't mount $mountpoint to $localmp" exit 0 diff --git a/scripts/vm/hypervisor/xenserver/create_privatetemplate_from_snapshot.sh b/scripts/vm/hypervisor/xenserver/create_privatetemplate_from_snapshot.sh index a23111df12f..fc21909feaf 100755 --- a/scripts/vm/hypervisor/xenserver/create_privatetemplate_from_snapshot.sh +++ b/scripts/vm/hypervisor/xenserver/create_privatetemplate_from_snapshot.sh @@ -6,7 +6,7 @@ usage() { printf "Usage: %s [vhd file in secondary storage] [template directory in secondary storage] \n" $(basename $0) } - +options='tcp,soft,timeo=133,retrans=1' cleanup() { if [ ! -z $snapshotdir ]; then @@ -47,7 +47,7 @@ if [ $? -ne 0 ]; then exit 0 fi -mount -o tcp $snapshoturl $snapshotdir +mount -o $options $snapshoturl $snapshotdir if [ $? -ne 0 ]; then rmdir $snapshotdir echo "5#can not mount $snapshoturl to $snapshotdir" @@ -63,7 +63,7 @@ if [ $? -ne 0 ]; then exit 0 fi -mount -o tcp $templateurl $templatedir +mount -o $options $templateurl $templatedir if [ $? -ne 0 ]; then rmdir $templatedir templatedir="" diff --git a/scripts/vm/hypervisor/xenserver/vmopsSnapshot b/scripts/vm/hypervisor/xenserver/vmopsSnapshot index 5641ad12874..67c7921c270 100755 --- a/scripts/vm/hypervisor/xenserver/vmopsSnapshot +++ b/scripts/vm/hypervisor/xenserver/vmopsSnapshot @@ -284,9 +284,9 @@ def makedirs(path): def mount(remoteDir, localDir): makedirs(localDir) - + options = "soft,tcp,timeo=133,retrans=1" try: - cmd = ['mount', '-o', 'tcp', remoteDir, localDir] + cmd = ['mount', '-o', options, remoteDir, localDir] txt = util.pread2(cmd) except: txt = ''