Difference between revisions of "Vnx-console-mgmt"
(→VNX Console Commands) |
(→VNX Console Commands) |
||
Line 49: | Line 49: | ||
<li>Show information about the consoles of an scenario:</li> | <li>Show information about the consoles of an scenario:</li> | ||
sudo vnx -f scenario.xml -v --console-info | sudo vnx -f scenario.xml -v --console-info | ||
+ | For example: | ||
+ | <pre> | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | Scenario "tutorial_ubuntu" started | ||
+ | |||
+ | VM_NAME | TYPE | CONSOLE ACCESS COMMAND | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | h1 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h1' or 'vncviewer :0' | ||
+ | | | con1: 'virsh -c qemu:///system console h1' or 'screen /dev/pts/0' | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | h2 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h2' or 'vncviewer :6' | ||
+ | | | con1: 'virsh -c qemu:///system console h2' or 'screen /dev/pts/12' | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | r1 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system r1' or 'vncviewer :7' | ||
+ | | | con1: 'virsh -c qemu:///system console r1' or 'screen /dev/pts/13' | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | r2 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system r2' or 'vncviewer :8' | ||
+ | | | con1: 'virsh -c qemu:///system console r2' or 'screen /dev/pts/14' | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | h3 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h3' or 'vncviewer :9' | ||
+ | | | con1: 'virsh -c qemu:///system console h3' or 'screen /dev/pts/22' | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | h4 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h4' or 'vncviewer :10' | ||
+ | | | con1: 'virsh -c qemu:///system console h4' or 'screen /dev/pts/23' | ||
+ | ----------------------------------------------------------------------------------------- | ||
+ | </pre> | ||
+ | |||
<li>Open all the consoles enabled in an scenario:</li> | <li>Open all the consoles enabled in an scenario:</li> | ||
sudo vnx -f scenario.xml -v --console | sudo vnx -f scenario.xml -v --console |
Revision as of 15:28, 28 July 2011
VNX Console Management
To be completed soon...
VNX Console Definition
Consoles available depending on type of virtual machine:
- libvirt virtual machines:
- con0: the graphical console
- con1: the textual console
- Dynamips:
- con1: the main console
- con2: aux console (only available for C7200 routers)
- Olive:
- con1: the textual console
<global> <vm_defaults> <console id="0" display="no"/> <console id="1" display="yes"/> </vm_defaults> </global> ... <vm name="h1" type="libvirt" subtype="kvm" os="linux"> ... <console id="0" display="yes"/> <console id="1" display="no"/> ... </vm> <vm name="h2" type="libvirt" subtype="kvm" os="linux"> </vm>
VNX Console Commands
Two commands are provided in VNX to manage virtual machine consoles: "--console", to open the consoles; and "--console-info" to show information about them.
Besides, two options are used to modify the behaviour of the commands: "--cid" to specify consoles identifiers (con0, con1, etc) and restrict the command to a specific console; and "-M" to specify a virtual machine or a list of virtual machines the command applies to.
- Show information about the consoles of an scenario:
sudo vnx -f scenario.xml -v --console-info
For example:
----------------------------------------------------------------------------------------- Scenario "tutorial_ubuntu" started VM_NAME | TYPE | CONSOLE ACCESS COMMAND ----------------------------------------------------------------------------------------- h1 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h1' or 'vncviewer :0' | | con1: 'virsh -c qemu:///system console h1' or 'screen /dev/pts/0' ----------------------------------------------------------------------------------------- h2 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h2' or 'vncviewer :6' | | con1: 'virsh -c qemu:///system console h2' or 'screen /dev/pts/12' ----------------------------------------------------------------------------------------- r1 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system r1' or 'vncviewer :7' | | con1: 'virsh -c qemu:///system console r1' or 'screen /dev/pts/13' ----------------------------------------------------------------------------------------- r2 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system r2' or 'vncviewer :8' | | con1: 'virsh -c qemu:///system console r2' or 'screen /dev/pts/14' ----------------------------------------------------------------------------------------- h3 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h3' or 'vncviewer :9' | | con1: 'virsh -c qemu:///system console h3' or 'screen /dev/pts/22' ----------------------------------------------------------------------------------------- h4 | libvirt-kvm-linux | con0: 'virt-viewer -c qemu:///system h4' or 'vncviewer :10' | | con1: 'virsh -c qemu:///system console h4' or 'screen /dev/pts/23' -----------------------------------------------------------------------------------------
sudo vnx -f scenario.xml -v --console
only the consoles with the 'display' attribute set to 'yes' are opened.
sudo vnx -f scenario.xml -v --console --cid con1
When using the "--cid" option to identify a specific console, the consoles are opened independently of the value of the 'display' attribute.
sudo vnx -f scenario.xml -v --console --cid con1 -M h1