Skip to content

Commit 4e50293

Browse files
taoyuhongjren1
authored andcommitted
DM:tools: add acrnctl tool
The acrnctl can help user to create, delete, launch and stop UOSs, To see what it can do, just run: # acrnctl or # acrnctl help you may see: support: list start stop del add Use acrnctl [cmd] help for details There are examples: (1) add a VM Each time you can just add one VM. Suppose you have an UOS launch script, such as launch_UOS.sh you can run: # acrnctl add launch_UOS.sh -U 1 vm1-14:59:30 added Note that, launch script shoud be able to launch ONE UOS. If it fail, it is better to print some error logs, to tell user the reason, so that he knows how to solve it. The vmname is important, the acrnctl searchs VMs by their names. so duplicated VM names are not allowed. Beside, if the launch script changes VM name at launch time, acrnctl will not recgonize it. (2) delete VMs # acrnctl del vm1-14:59:30 (3) show VMs # acrnctl list vm1-14:59:30 untracked vm-yocto stop vm-android stop (4) start VM you can start a vm with 'stop' status, each time can start one VM. # acrnctl start vm-yocto (5) stop VM you can stop VMs, if their status is not 'stop' # acrnctl stop vm-yocto vm1-14:59:30 vm-android Acked-by: Eddie Dong <eddie.dong@intel.com> Reviewed-by: Geoffroy Van Cutsem <geoffroy.vancutsem@intel.com> Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com> Signed-off-by: Tao, Yuhong <yuhong.tao@intel.com>
1 parent 498e8c0 commit 4e50293

File tree

3 files changed

+788
-0
lines changed

3 files changed

+788
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
all: acrnctl.c
2+
gcc -o acrnctl acrnctl.c -I../../include -Wall -g
3+
4+
clean:
5+
rm -f acrnctl
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
acrnctl
2+
#######
3+
4+
DESCRIPTION
5+
###########
6+
acrnctl: The acrnctl can help user to create, delete, launch and stop UOSs.
7+
It runs under Service OS, and UOSs should be based on acrn-dm
8+
9+
USAGE
10+
#####
11+
To see what it can do, just run:
12+
# acrnctl
13+
or
14+
# acrnctl help
15+
you may see:
16+
support:
17+
list
18+
start
19+
stop
20+
del
21+
add
22+
Use acrnctl [cmd] help for details
23+
24+
There are examples:
25+
(1) add a VM
26+
Each time you can just add one VM. Suppose you have an UOS
27+
launch script, such as launch_UOS.sh
28+
you can run:
29+
# acrnctl add launch_UOS.sh -U 1
30+
vm1-14:59:30 added
31+
Note that, launch script shoud be able to launch ONE UOS. If
32+
it fail, it is better to print some error logs, to tell user
33+
the reason, so that he knows how to solve it.
34+
The vmname is important, the acrnctl searchs VMs by their
35+
names. so duplicated VM names are not allowed. Beside, if the
36+
launch script changes VM name at launch time, acrnctl will
37+
not recgonize it.
38+
(2) delete VMs
39+
# acrnctl del vm1-14:59:30
40+
(3) show VMs
41+
# acrnctl list
42+
vm1-14:59:30 untracked
43+
vm-yocto stop
44+
vm-android stop
45+
(4) start VM
46+
you can start a vm with 'stop' status, each time can start
47+
one VM.
48+
# acrnctl start vm-yocto
49+
(5) stop VM
50+
you can stop VMs, if their status is not 'stop'
51+
# acrnctl stop vm-yocto vm1-14:59:30 vm-android
52+
BUILD
53+
#####
54+
# make

0 commit comments

Comments
 (0)