test suite reviews and discussions
 help / color / mirror / Atom feed
From: Marvin Liu <yong.liu@intel.com>
To: dts@dpdk.org
Cc: Marvin Liu <yong.liu@intel.com>
Subject: [dts] [PATCH v1 16/16] doc: add descriptions for multiple virtual machine module
Date: Sun,  7 Jan 2018 21:49:29 -0500	[thread overview]
Message-ID: <1515379769-11553-17-git-send-email-yong.liu@intel.com> (raw)
In-Reply-To: <1515379769-11553-1-git-send-email-yong.liu@intel.com>

Signed-off-by: Marvin Liu <yong.liu@intel.com>

diff --git a/doc/dts_gsg/index.rst b/doc/dts_gsg/index.rst
index 05587af..fbd16dc 100644
--- a/doc/dts_gsg/index.rst
+++ b/doc/dts_gsg/index.rst
@@ -41,3 +41,4 @@ Getting Started Guide
     review
     virtualization
     scenario
+    multiple_vm
diff --git a/doc/dts_gsg/multiple_vm.rst b/doc/dts_gsg/multiple_vm.rst
new file mode 100644
index 0000000..85eca26
--- /dev/null
+++ b/doc/dts_gsg/multiple_vm.rst
@@ -0,0 +1,87 @@
+Multiple Virtual Machines Management
+====================================
+
+When managing multiple virtual machines, waiting around 2 minutes for each VM will be exhausted. So DTS imported parallel threads model into multiple VMs management scenario.
+
+.. note::
+    Critical resources and actions which can't be handled in parallel have been protected by function level lock.
+
+Command arguments
+-----------------
+
+Multiple VMs module support start VMs or send commands to VMs in parallel with specified arguments format.
+
+Arguments for "start" command:
+
+.. table::
+
+    +-----------------+----------------------------------+----------------+-------------+
+    | name            | Description                      | Default value  | Must have   |
+    |                 |                                  |                |             |
+    +-----------------+----------------------------------+----------------+-------------+
+    | name            | virtual machine name             | N/A            | Yes         |
+    +-----------------+----------------------------------+----------------+-------------+
+    | dut_id          | index of DUT                     | 0              | No          |
+    +-----------------+----------------------------------+----------------+-------------+
+    | autodetect_topo | whether detect network topology  | False          | No          |
+    |                 | automatically                    |                |             |
+    +-----------------+----------------------------------+----------------+-------------+
+    | virt_config     | virtual machine config location  | N/A            | Alternative |
+    +-----------------+----------------------------------+----------------+-------------+
+    | virt_params     | local parameters of virutal      | N/A            | Alternative |
+    |                 | machine                          |                |             |
+    +-----------------+----------------------------------+----------------+-------------+
+
+Arguments for "cmd" command:
+
+.. table::
+
+    +-----------------+----------------------------------+----------------+-------------+
+    | name            | Description                      | Default value  | Must have   |
+    |                 |                                  |                |             |
+    +-----------------+----------------------------------+----------------+-------------+
+    | name            | virtual machine name             | N/A            | Yes         |
+    +-----------------+----------------------------------+----------------+-------------+
+    | dut_id          | index of DUT                     | 0              | No          |
+    +-----------------+----------------------------------+----------------+-------------+
+    | commands        | list of commands which will be   | N/A            | Yes         |
+    |                 | sent into the vitual machine     |                |             |
+    +-----------------+----------------------------------+----------------+-------------+
+    | expects         | list of expect output of the     | N/A            | Yes         |
+    |                 | commands                         |                |             |
+    +-----------------+----------------------------------+----------------+-------------+
+    | timeouts        | list of timeout value of the     | N/A            | Yes         |
+    |                 | commands                         |                |             |
+    +-----------------+----------------------------------+----------------+-------------+
+
+.. note::
+    If there's nothing expected for the command, still need to define expected string as blank
+
+Multiple module will catagorize and save the result value after all tasks have been done. Later users can retrieve the result by function get_parallel_result.
+
+Sample Code
+-----------
+
+.. code-block:: console
+
+    vm_task = MultipleVM(max_vm=self.VM_NUM, duts=self.duts)
+
+    for dut_id in range(len(self.duts)):
+        for vm_idx in range(VM_NUM):
+            vm_name = "vm%d" % vm_idx
+            args = {'name': vm_name,
+                    'dut_id': dut_id,
+                    'autodetect_topo': False,
+                    'virt_params': {
+                        'qemu': [{'path': '/usr/local/bin/qemu-system-x86_64'}],
+                        'cpu': [{'model': 'host', 'number': '1', 'cpupin': ''}],
+                        'mem': [{'size': '1024', 'hugepage': 'yes'}],
+                        'disk': [{'file': '/storage/vm-image/%s.qcow2' % vm_name}],
+                        'login': [{'user': 'root', 'password': 'root'}],
+                        'device': None}
+                    }
+
+            vm_task.add_parallel_task(action="start", config=args)
+
+    vm_task.do_parallel_task()
+    print vm_task.get_parallel_result()
diff --git a/doc/dts_gsg/virtualization.rst b/doc/dts_gsg/virtualization.rst
index 1848563..2328603 100644
--- a/doc/dts_gsg/virtualization.rst
+++ b/doc/dts_gsg/virtualization.rst
@@ -84,6 +84,15 @@ For network access, should disable guest firewall service.
 
     systemctl disable firewalld.service
 
+Console connection
+""""""""""""""""""
+
+Enable virtual machine serial console in kernel command line, DTS will manage virtual machine through serial port.
+
+.. code-block:: console
+
+   console=ttyS0,115200
+
 Suite Programing
 ----------------
 
@@ -310,34 +319,27 @@ Enable KVM
 
 DTS enable KVM full virtualization support as default. This option will significant improve the speed of virtual machine.
 
-Qemu Guest Agent
+Qemu Serial Port
 """"""""""""""""
 
-Qemu monitor supply one method to interact with qemu process. DTS can monitor guest status by command supplied by qemu guest agent. Qemu guest agent is based on virtio-serial devices. 
+Qemu serial port is the default method to interact with guest OS. DTS can monitor guest status/manage guest network by serial port.
 
 .. code-block:: console
 
-	-device virtio-serial -device virtserialport,chardev=vm_qga0,name=org.qemu.guest_agent.0 
-	-daemonize -monitor unix:/tmp/vm_monitor.sock,server,nowait
+    -serial telnet::7000,server,nowait
 
-Check whether guest os has been started up.
+DTS will check the output from serial port and determine whether guest os has been started up. The prompt string for guest login session can be configured by parameter "start".
 
 .. code-block:: console
 
-	qemu-ga-client address=/tmp/{vm_name}_qga0.sock ping 120
+    start =
+        wait_seconds=120,login_timeout=60,login_prompt=login:,password_prompt=Password:;
 
 .. note::	
 
-	We only wait two minutes for guest os start up. For guest os only has few hardware and we has disabled most services, so 2 minutes is enough.
-	This command will be return when guest os is ready, so DTS will not wait 2 minutes for each time. 
+	Default timeout for guest OS start up is 2 minutes. For guest os only has few hardware and we has disabled most services, so 2 minutes is enough. If guest OS can't start up in 2 minutes, DTS will try to restart it once.
 
-Check whether guest os default interface has been up.
-
-.. code-block:: console
-
-	qemu-ga-client address=/tmp/{vm_name}_qga0.sock ifconfig
-	
-DTS will wait for guest os default interface upped and get auto dhcp address. After that DTS can connect to guest by ssh connections. 
+DTS will check default interface upped and utilize dhcp to retrieve address. After that DTS can connect to guest by ssh connections.
 
 .. code-block:: console
 
@@ -349,15 +351,15 @@ DTS will wait for guest os default interface upped and get auto dhcp address. Af
 			inet6 fe80::200:ff:feb9:fed7  prefixlen 64
 			ether 00:00:00:b9:fe:d7
 
-Power down  guest os.
+Power down guest os by serial port.
 
 .. code-block:: console
 
-	qemu-ga-client address=/tmp/{vm_name}_qga0.sock powerdown
+    init 0
 	
 .. note::
 
-	For more information about qemu guest agent, please reference to http://wiki.qemu.org/Features/QAPI/GuestAgent.
+	For more information about qemu serial port, please reference to https://qemu.weilnetz.de/doc/qemu-doc.html.
 	
 Qemu Monitor
 """"""""""""
@@ -396,7 +398,7 @@ Connection to monitor socket on DUT.
     For More detail information about qemu monitor. https://en.wikibooks.org/wiki/QEMU/Monitor#info
 
 Qemu Machine
-""""""""""
+""""""""""""
 
 DTS set default qemu machine type as virt for Aarch64. This option is mandatory for qemu-system-aarch64.
 
-- 
1.9.3

  parent reply	other threads:[~2018-01-08  9:56 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-08  2:49 [dts] [PATCH v1 00/16] Support parallel multiple virtual machine management Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 01/16] framework: add external thread pool library Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 02/16] framework/multiple_vm: add multiple VM management module Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 03/16] framework/utils: support locks function in parallel model Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 04/16] framework: add DUT index support Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 05/16] framework/logger: optimize output format for child threads Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 06/16] framework/dts: support multiple VMs module Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 07/16] framework/debugger: " Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 08/16] framework/ssh_pexpect: " Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 09/16] framework/ssh_connection: support DUT index argument Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 10/16] framework/settings: add parallel related settings Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 11/16] framework/virt_resource: support multiple VMs module Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 12/16] framework/virt_base: add attach/quick start/quit function for VM management Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 13/16] framework/virt_dut: support multiple VMs module Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 14/16] framework/qemu_kvm: " Marvin Liu
2018-01-08  2:49 ` [dts] [PATCH v1 15/16] conf/virt_global: add vm management related configuration Marvin Liu
2018-01-08  2:49 ` Marvin Liu [this message]
2018-01-10  0:10 ` [dts] [PATCH v2 00/16] Support parallel multiple virtual machines management Marvin Liu
2018-01-10  0:10   ` [dts] [PATCH v2 01/16] framework: add external thread pool library Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 02/16] framework/multiple_vm: add multiple VM management module Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 03/16] framework/utils: support locks for parallel model Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 04/16] framework: add DUT index support Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 05/16] framework/logger: optimize output format for threads Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 06/16] framework/dts: support multiple VMs module Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 07/16] framework/debugger: " Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH 08/16] framework/ssh_pexpect: " Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 09/16] framework/ssh_connection: " Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 10/16] framework/settings: add parallel related settings Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 11/16] framework/virt_resource: support multiple VMs module Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 12/16] framework/virt_base: add attach/quick start/quit function for VM management Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 13/16] framework/virt_dut: support multiple VMs module Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 14/16] framework/qemu_kvm: " Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 15/16] conf/virt_global: add vm management related configuration Marvin Liu
2018-01-10  0:11   ` [dts] [PATCH v2 16/16] doc: add descriptions for multiple virtual machines module Marvin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1515379769-11553-17-git-send-email-yong.liu@intel.com \
    --to=yong.liu@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).