mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-24 02:03:52 +03:00
F #4393: add tm/{qcow2/shared/ssh}/resize
This commit is contained in:
parent
3ebdc8d8f4
commit
53413e0c29
@ -874,7 +874,8 @@ TM_SHARED_FILES="src/tm_mad/shared/clone \
|
||||
src/tm_mad/shared/snap_delete \
|
||||
src/tm_mad/shared/snap_revert \
|
||||
src/tm_mad/shared/monitor \
|
||||
src/tm_mad/shared/cpds"
|
||||
src/tm_mad/shared/cpds \
|
||||
src/tm_mad/shared/resize"
|
||||
|
||||
TM_FS_LVM_FILES="src/tm_mad/fs_lvm/clone \
|
||||
src/tm_mad/fs_lvm/context \
|
||||
@ -910,7 +911,8 @@ TM_QCOW2_FILES="src/tm_mad/qcow2/clone \
|
||||
src/tm_mad/qcow2/snap_create_live \
|
||||
src/tm_mad/qcow2/snap_delete \
|
||||
src/tm_mad/qcow2/snap_revert \
|
||||
src/tm_mad/qcow2/cpds"
|
||||
src/tm_mad/qcow2/cpds \
|
||||
src/tm_mad/qcow2/resize"
|
||||
|
||||
TM_SSH_FILES="src/tm_mad/ssh/clone \
|
||||
src/tm_mad/ssh/delete \
|
||||
@ -929,7 +931,8 @@ TM_SSH_FILES="src/tm_mad/ssh/clone \
|
||||
src/tm_mad/ssh/snap_revert \
|
||||
src/tm_mad/ssh/monitor \
|
||||
src/tm_mad/ssh/monitor_ds \
|
||||
src/tm_mad/ssh/cpds"
|
||||
src/tm_mad/ssh/cpds \
|
||||
src/tm_mad/ssh/resize"
|
||||
|
||||
TM_DUMMY_FILES="src/tm_mad/dummy/clone \
|
||||
src/tm_mad/dummy/delete \
|
||||
|
39
src/tm_mad/common/resize
Executable file
39
src/tm_mad/common/resize
Executable file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# -------------------------------------------------------------------------- #
|
||||
# Copyright 2002-2016, OpenNebula Project, OpenNebula Systems #
|
||||
# #
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may #
|
||||
# not use this file except in compliance with the License. You may obtain #
|
||||
# a copy of the License at #
|
||||
# #
|
||||
# http://www.apache.org/licenses/LICENSE-2.0 #
|
||||
# #
|
||||
# Unless required by applicable law or agreed to in writing, software #
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, #
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
|
||||
# See the License for the specific language governing permissions and #
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
# resize image size vmid
|
||||
|
||||
SRC=$1
|
||||
SIZE=$2
|
||||
VMID=$3
|
||||
|
||||
if [ -z "${ONE_LOCATION}" ]; then
|
||||
TMCOMMON=/var/lib/one/remotes/tm/tm_common.sh
|
||||
DATASTORES=/var/lib/one/datastores
|
||||
else
|
||||
TMCOMMON=$ONE_LOCATION/var/remotes/tm/tm_common.sh
|
||||
DATASTORES=$ONE_LOCATION/var/datastores
|
||||
fi
|
||||
|
||||
. $TMCOMMON
|
||||
|
||||
SRC_PATH=$(arg_path $SRC)
|
||||
SRC_HOST=$(arg_host $SRC)
|
||||
|
||||
ssh_exec_and_log "${SRC_HOST}" "qemu-img resize ${SRC_PATH} ${SIZE}M" \
|
||||
"Error resizing image ${SRC_PATH}"
|
1
src/tm_mad/qcow2/resize
Symbolic link
1
src/tm_mad/qcow2/resize
Symbolic link
@ -0,0 +1 @@
|
||||
../common/resize
|
1
src/tm_mad/shared/resize
Symbolic link
1
src/tm_mad/shared/resize
Symbolic link
@ -0,0 +1 @@
|
||||
../common/resize
|
1
src/tm_mad/ssh/resize
Symbolic link
1
src/tm_mad/ssh/resize
Symbolic link
@ -0,0 +1 @@
|
||||
../common/resize
|
Loading…
x
Reference in New Issue
Block a user