Skip to content

Commit 29ada54

Browse files
author
David Scott
committed
Consoles: tidy up formatting, fix shell fragments
Signed-off-by: David Scott <[email protected]>
1 parent 56e5128 commit 29ada54

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

xen-api/consoles.md

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ layout: default
55

66
Most XenAPI graphical interfaces will want to gain access to the VM consoles, in order to render them to the user as if they were physical machines. There are several types of consoles available, depending on the type of guest or if the physical host console is being accessed:
77

8-
**Console access**
8+
Types of consoles
9+
=================
910

1011
|Operating System|Text|Graphical|Optimized graphical|
1112
|:---------------|:---|:--------|:------------------|
@@ -21,7 +22,8 @@ The physical host console is only available as a `vt100` console, which is expos
2122

2223
RFB (Remote Framebuffer) is the protocol which underlies VNC, specified in [The RFB Protocol](http://www.realvnc.com/docs/rfbproto.pdf). Third-party developers are expected to provide their own VNC viewers, and many freely available implementations can be adapted for this purpose. RFB 3.3 is the minimum version which viewers must support.
2324

24-
### Retrieving VNC consoles using the API
25+
Retrieving VNC consoles using the API
26+
=====================================
2527

2628
VNC consoles are retrieved using a special URL passed through to the host agent. The sequence of API calls is as follows:
2729

@@ -49,35 +51,46 @@ This scheme requires direct access from the client to the control domain's IP, a
4951

5052
Retrieve the VM UUID by running:
5153

52-
xe vm-list params=uuid --minimal name-label=
54+
```sh
55+
$ VM=$(xe vm-list params=uuid --minimal name-label=<name>)
56+
```
5357

5458
Retrieve the console information:
5559

56-
xe console-list vm-uuid=
57-
uuid ( RO): 714f388b-31ed-67cb-617b-0276e35155ef
58-
vm-uuid ( RO): 8acb7723-a5f0-5fc5-cd53-9f1e3a7d3069
59-
vm-name-label ( RO): etch
60-
protocol ( RO): RFB
61-
location ( RO): https://192.168.0.1/console?ref=(...)
60+
```sh
61+
$ xe console-list vm-uuid=$VM
62+
uuid ( RO) : 8013b937-ff7e-60d1-ecd8-e52d66c5879e
63+
vm-uuid ( RO): 2d7c558a-8f03-b1d0-e813-cbe7adfa534c
64+
vm-name-label ( RO): 6
65+
protocol ( RO): RFB
66+
location ( RO): https://10.80.228.30/console?uuid=8013b937-ff7e-60d1-ecd8-e52d66c5879e
67+
```
6268

6369
Use command-line utilities like `ping` to test connectivity to the IP address provided in the `location` field.
6470

65-
### Disabling VNC forwarding for Linux VM
71+
Disabling VNC forwarding for Linux VM
72+
=====================================
6673

6774
When creating and destroying Linux VMs, the host agent automatically manages the `vncterm` processes which convert the text console into VNC. Advanced users who wish to directly access the text console can disable VNC forwarding for that VM. The text console can then only be accessed directly from the control domain directly, and graphical interfaces such as XenCenter will not be able to render a console for that VM.
6875

6976
Before starting the guest, set the following parameter on the VM record:
7077

71-
xe vm-param-set uuid=uuid other-config:disable_pv_vnc=1
78+
```sh
79+
$ xe vm-param-set uuid=$VM other-config:disable_pv_vnc=1
80+
```
7281

7382
Start the VM.
7483

7584
Use the CLI to retrieve the underlying domain ID of the VM with:
7685

77-
xe vm-list params=dom-id uuid= --minimal
86+
```sh
87+
$ DOMID=$(xe vm-list params=dom-id uuid=$VM --minimal)
88+
```
7889

7990
On the host console, connect to the text console directly by:
8091

81-
/usr/lib/xen/bin/xenconsole
92+
```sh
93+
$ /usr/lib/xen/bin/xenconsole $DOMID
94+
```
8295

8396
This configuration is an advanced procedure, and we do not recommend that the text console is directly used for heavy I/O operations. Instead, connect to the guest over SSH or some other network-based connection mechanism.

0 commit comments

Comments
 (0)