Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
evz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Тимофей Смирнов
evz
Commits
092c06f0
Commit
092c06f0
authored
Feb 26, 2020
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evz-vboxmanage: rename containers to virtual machines
parent
c1108b9b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
evz-vboxmanage
bin/evz-vboxmanage
+16
-16
No files found.
bin/evz-vboxmanage
View file @
092c06f0
...
@@ -53,7 +53,7 @@ evz_vboxmanage()
...
@@ -53,7 +53,7 @@ evz_vboxmanage()
CMD
=
$1
CMD
=
$1
shift
shift
case
$CMD
in
case
$CMD
in
off
)
# HELPCMD: stop
container
(s) and disable start on boot
off
)
# HELPCMD: stop
virtual machine
(s) and disable start on boot
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
for
i
in
$LIST
;
do
for
i
in
$LIST
;
do
#info "Stopping $i ..."
#info "Stopping $i ..."
...
@@ -61,7 +61,7 @@ case $CMD in
...
@@ -61,7 +61,7 @@ case $CMD in
todo docmd docker update
--restart
no
$i
todo docmd docker update
--restart
no
$i
done
done
;;
;;
on
)
# HELPCMD: enable start on boot and start
container
(s)
on
)
# HELPCMD: enable start on boot and start
virtual machine
(s)
for
i
in
"
$@
"
;
do
for
i
in
"
$@
"
;
do
#info "Starting $i ..."
#info "Starting $i ..."
# TODO: check if enabled
# TODO: check if enabled
...
@@ -69,14 +69,14 @@ case $CMD in
...
@@ -69,14 +69,14 @@ case $CMD in
todo docmd docker start
$i
todo docmd docker start
$i
done
done
;;
;;
status
)
# HELPCMD: print
container
(s) status
status
)
# HELPCMD: print
virtual machine
(s) status
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
#info "Do $CMD for $LIST ..."
#info "Do $CMD for $LIST ..."
for
i
in
$LIST
;
do
for
i
in
$LIST
;
do
todo docmd docker stats
--no-stream
--no-trunc
$i
todo docmd docker stats
--no-stream
--no-trunc
$i
done
done
;;
;;
compact
)
# HELPCMD: do named operation on
container
(s)
compact
)
# HELPCMD: do named operation on
virtual machine
(s)
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
for
i
in
$LIST
;
do
for
i
in
$LIST
;
do
info
"Do
$CMD
on
$i
..."
info
"Do
$CMD
on
$i
..."
...
@@ -99,13 +99,13 @@ case $CMD in
...
@@ -99,13 +99,13 @@ case $CMD in
todo vzctl
$CMD
$i
$OPTIONS
--save
todo vzctl
$CMD
$i
$OPTIONS
--save
done
done
;;
;;
ubc|resources|show
)
# HELPCMD: print resource using
ubc|resources|show
)
# HELPCMD: print resource using
by virtual machine(s)
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
for
i
in
$LIST
;
do
for
i
in
$LIST
;
do
docmd vboxmanage showvminfo
$i
docmd vboxmanage showvminfo
$i
done
done
;;
;;
stop
)
# HELPCMD: stop
container
(s)
stop
)
# HELPCMD: stop
virtual machine
(s)
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
for
i
in
$LIST
;
do
for
i
in
$LIST
;
do
info
"Stopping
$i
..."
info
"Stopping
$i
..."
...
@@ -116,21 +116,21 @@ case $CMD in
...
@@ -116,21 +116,21 @@ case $CMD in
docmd vboxmanage controlvm
$i
acpipowerbutton
docmd vboxmanage controlvm
$i
acpipowerbutton
done
done
;;
;;
start
)
# HELPCMD: start
container
(s)
start
)
# HELPCMD: start
virtual machine
(s)
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
for
i
in
$LIST
;
do
for
i
in
$LIST
;
do
info
"Starting
$i
..."
info
"Starting
$i
..."
docmd vboxmanage startvm
--type
headless
$i
docmd vboxmanage startvm
--type
headless
$i
done
done
;;
;;
restart
)
# HELPCMD: restart
container
(s)
restart
)
# HELPCMD: restart
virtual machine
(s)
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
for
i
in
$LIST
;
do
for
i
in
$LIST
;
do
info
"Restarting
$i
..."
info
"Restarting
$i
..."
todo docmd ker restart
$i
todo docmd ker restart
$i
done
done
;;
;;
list|ps
)
# HELPCMD: list available
container(s) (use -q|-1 for list only ID, list -a for list ever stopped container
s)
list|ps
)
# HELPCMD: list available
virtual machine(s) (use -q|-1 for list only ID, list -a for list ever stopped virtual machine
s)
# if -q, just id list
# if -q, just id list
if
[
-z
"
$verbose
"
]
||
[
"
$1
"
=
"-1"
]
||
[
"
$1
"
=
"-q"
]
;
then
if
[
-z
"
$verbose
"
]
||
[
"
$1
"
=
"-1"
]
||
[
"
$1
"
=
"-q"
]
;
then
[
-z
"
$verbose
"
]
||
shift
[
-z
"
$verbose
"
]
||
shift
...
@@ -143,7 +143,7 @@ case $CMD in
...
@@ -143,7 +143,7 @@ case $CMD in
docmd vboxmanage list runningvms
docmd vboxmanage list runningvms
fi
fi
;;
;;
exec
)
# HELPCMD: execute command by list (all for all
container
s)
exec
)
# HELPCMD: execute command by list (all for all
virtual machine
s)
INCMD
=
"
$1
"
INCMD
=
"
$1
"
shift
shift
LIST
=
"
$(
get_list
"
$@
"
)
"
LIST
=
"
$(
get_list
"
$@
"
)
"
...
@@ -152,17 +152,17 @@ case $CMD in
...
@@ -152,17 +152,17 @@ case $CMD in
todo
a
=
docker
exec
-ti
$SETLANG
"
$i
"
"
$INCMD
"
todo
a
=
docker
exec
-ti
$SETLANG
"
$i
"
"
$INCMD
"
done
done
;;
;;
enter
)
# HELPCMD: enter in a
container
with ID
enter
)
# HELPCMD: enter in a
virtual machine
with ID
todo showcmd docker
exec
-ti
$SETLANG
"
$1
"
bash
todo showcmd docker
exec
-ti
$SETLANG
"
$1
"
bash
todo
a
=
docker
exec
-ti
$SETLANG
"
$1
"
bash
todo
a
=
docker
exec
-ti
$SETLANG
"
$1
"
bash
;;
;;
log|logs
)
# HELPCMD: print
container
log
log|logs
)
# HELPCMD: print
virtual machine
log
todo docmd docker logs
"
$1
"
todo docmd docker logs
"
$1
"
;;
;;
info
)
# HELPCMD: print
container
s(s) info (vzlist like)
info
)
# HELPCMD: print
virtual machine
s(s) info (vzlist like)
docmd vboxmanage list systemproperties
docmd vboxmanage list systemproperties
;;
;;
load
)
# HELPCMD: print load average for
container
(s) by list
load
)
# HELPCMD: print load average for
virtual machine
(s) by list
todo LOAD
todo LOAD
#for id in $(get_list "$@") ; do
#for id in $(get_list "$@") ; do
# HN=$(a= docker inspect --format '{{.Name}}' $id)
# HN=$(a= docker inspect --format '{{.Name}}' $id)
...
@@ -170,8 +170,8 @@ case $CMD in
...
@@ -170,8 +170,8 @@ case $CMD in
# printf "%4s (%30s): %6s\n" $id $HN $CPU
# printf "%4s (%30s): %6s\n" $id $HN $CPU
#done
#done
;;
;;
destroy
)
# HELPCMD: destroy
container
(s) by list
destroy
)
# HELPCMD: destroy
virtual machine
(s) by list
echo
"You request to destroy follow
container
s:"
echo
"You request to destroy follow
virtual machine
s:"
# don't support all/ALL
# don't support all/ALL
#LIST="$(get_list "$@")"
#LIST="$(get_list "$@")"
LIST
=
"
$@
"
LIST
=
"
$@
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment