summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-02-10 11:36:53 +0000
committerGerrit Code Review <review@openstack.org>2017-02-10 11:36:53 +0000
commited3fcf9464d22c86e02aaa2deca8cfeb3fa306bf (patch)
tree43a7f14185a42b3326624ba850da42a3626aedb6
parent1e01b69dcd18f7299e4be845d51a4a9251c540cd (diff)
parentd6976c5f380566cb074a3c27de16fdaa61162ddb (diff)
Merge "Document some usage with examples"
-rw-r--r--doc/source/usage.rst103
1 files changed, 99 insertions, 4 deletions
diff --git a/doc/source/usage.rst b/doc/source/usage.rst
index edd9579..fdf6484 100644
--- a/doc/source/usage.rst
+++ b/doc/source/usage.rst
@@ -1,7 +1,102 @@
1======== 1=====
2Usage 2Usage
3======== 3=====
4 4
5To use virtualbmc in a project:: 5``vbmc`` is a CLI that lets users create, delete, list, start and stop
6virtual BMCs for controlling virtual machines using IPMI commands.
6 7
7 import virtualbmc 8
9Command options
10---------------
11
12In order to see all command options supporter by ``vbmc`` do::
13
14 $ vbmc --help
15
16It's also possible to list the options from a specific command. For
17example, in order to know what can be provided as part of the ``add``
18command do::
19
20 $ vbmc add --help
21
22
23Useful examples
24---------------
25
26* Adding a new virtual BMC to control a domain called ``node-0``::
27
28 $ vbmc add node-0
29
30
31* Adding a new virtual BMC to control a domain called ``node-1`` that
32 will listen on the port ``6230``::
33
34 $ vbmc add node-0 --port 6230
35
36
37.. note::
38 Binding a network port number below 1025 is restricted and only users
39 with privilege will be able to start a virtual BMC on those ports.
40
41
42* Starting the virtual BMC to control the domain ``node-0``::
43
44 $ vbmc start node-0
45
46
47* Stopping the virtual BMC that controls the domain ``node-0``::
48
49 $ vbmc stop node-0
50
51
52* Getting the list of virtual BMCs::
53
54 $ vbmc list
55 +-------------+---------+---------+------+
56 | Domain name | Status | Address | Port |
57 +-------------+---------+---------+------+
58 | node-0 | running | :: | 6230 |
59 | node-1 | running | :: | 6231 |
60 +-------------+---------+---------+------+
61
62
63* Showing the information of a specific virtual BMC::
64
65 $ vbmc show node-0
66 +-----------------------+----------------+
67 | Property | Value |
68 +-----------------------+----------------+
69 | address | :: |
70 | domain_name | node-0 |
71 | libvirt_sasl_password | *** |
72 | libvirt_sasl_username | None |
73 | libvirt_uri | qemu:///system |
74 | password | *** |
75 | port | 6230 |
76 | status | running |
77 | username | admin |
78 +-----------------------+----------------+
79
80
81Testing
82-------
83
84Once the virtual BMC for a specific domain has been created and started
85you can then issue IPMI commands against the address and port of that
86virtual BMC to control the libvirt domain. For example:
87
88* To power on the virtual machine::
89
90 $ ipmitool -I lanplus -U admin -P password -H 127.0.0.1 -p 6230 power on
91
92* To check its power status::
93
94 $ ipmitool -I lanplus -U admin -P password -H 127.0.0.1 -p 6230 power status
95
96* To set the boot device to disk::
97
98 $ ipmitool -I lanplus -U admin -P password -H 127.0.0.1 -p 6230 chassis bootdev disk
99
100* To get the current boot device::
101
102 $ ipmitool -I lanplus -U admin -P password -H 127.0.0.1 -p 6230 chassis bootparam get 5