2018-05-30 06:54:57 +08:00
|
|
|
.. _acrnctl:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
acrnctl
|
|
|
|
#######
|
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>
2018-04-03 21:43:00 +08:00
|
|
|
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Description
|
|
|
|
***********
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
The ``acrnctl`` tool helps users create, delete, launch, and stop a User
|
|
|
|
OS (UOS). The tool runs under the Service OS, and UOSs should be based
|
|
|
|
on ``acrn-dm``.
|
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>
2018-04-03 21:43:00 +08:00
|
|
|
|
2018-05-25 04:21:16 +08:00
|
|
|
|
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Usage
|
|
|
|
*****
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
You can see the available ``acrnctl`` commands by running:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
.. code-block:: none
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
# acrnctl help
|
|
|
|
support:
|
|
|
|
list
|
|
|
|
start
|
|
|
|
stop
|
|
|
|
del
|
|
|
|
add
|
2018-05-31 10:03:09 +08:00
|
|
|
pause
|
2018-05-31 10:30:25 +08:00
|
|
|
continue
|
2018-05-31 10:35:50 +08:00
|
|
|
suspend
|
2018-05-31 10:41:06 +08:00
|
|
|
resume
|
2018-05-30 06:54:57 +08:00
|
|
|
Use acrnctl [cmd] help for details
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Here are some usage examples:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Add a VM
|
|
|
|
========
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
The ``add`` command lets you add a VM by specifying a
|
|
|
|
script that will launch a UOS, for example ``launch_UOS.sh``:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
.. code-block:: none
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
# acrnctl add launch_UOS.sh -U 1
|
|
|
|
vm1-14:59:30 added
|
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>
2018-04-03 21:43:00 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Note that the launch script must only launch one UOS instance.
|
|
|
|
The VM name is important. ``acrnctl`` searches VMs by their
|
|
|
|
names so duplicate VM names are not allowed. If the
|
|
|
|
launch script changes the VM name at launch time, ``acrnctl``
|
|
|
|
will not recognize it.
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Delete VMs
|
|
|
|
==========
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Use the ``delete`` command with a VM name to delete that VM:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
.. code-block:: none
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
# acrnctl del vm1-14:59:30
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
List VMs
|
|
|
|
========
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Use the ``list`` command to display VMs and their state:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
.. code-block:: none
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
# acrnctl list
|
|
|
|
vm1-14:59:30 untracked
|
|
|
|
vm-yocto stopped
|
|
|
|
vm-android stopped
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Start VM
|
|
|
|
========
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
If a VM is in a ``stopped`` state, you can start it with the ``start``
|
|
|
|
command:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
.. code-block:: none
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
# acrnctl start vm-yocto
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Stop VM
|
|
|
|
=======
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Use the ``stop`` command to stop one or more running VM:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
.. code-block:: none
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
# acrnctl stop vm-yocto vm1-14:59:30 vm-android
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Build and Install
|
|
|
|
*****************
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
Source code for ``acrnctl`` is in the ``tools/acrn-manager`` folder.
|
|
|
|
Change to that folder and run:
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
.. code-block:: none
|
2018-05-25 04:21:16 +08:00
|
|
|
|
2018-05-30 06:54:57 +08:00
|
|
|
# make
|
|
|
|
# make install
|