Skip to content

Commit ef066d6

Browse files
authored
Revert "BZ2028490: Updated procedures to connect to Win VMs with RDP"
1 parent 643d7b1 commit ef066d6

File tree

3 files changed

+67
-85
lines changed

3 files changed

+67
-85
lines changed

modules/virt-accessing-rdp-console.adoc

Lines changed: 48 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -6,101 +6,71 @@
66
[id="virt-accessing-rdp-console_{context}"]
77
= Connecting to a Windows virtual machine with an RDP console
88

9-
Create a Kubernetes `Service` object to connect to a Windows virtual machine (VM) by using your local Remote Desktop Protocol (RDP) client.
9+
The Remote Desktop Protocol (RDP) provides a better console experience for
10+
connecting to Windows virtual machines.
11+
12+
To connect to a Windows virtual machine with RDP, specify the IP address of the
13+
attached L2 NIC to your RDP client.
1014

1115
.Prerequisites
1216

13-
* A running Windows virtual machine with the QEMU guest agent installed. The `qemu-guest-agent` is included in the VirtIO drivers.
14-
* An RDP client installed on your local machine.
17+
* A running Windows virtual machine with the QEMU guest agent installed. The
18+
`qemu-guest-agent` is included in the VirtIO drivers.
19+
* A layer 2 NIC attached to the virtual machine.
20+
* An RDP client installed on a machine on the same network as the
21+
Windows virtual machine.
1522
1623
.Procedure
1724

18-
. Edit the `VirtualMachine` manifest to add the label for service creation:
19-
+
20-
[source,yaml]
21-
----
22-
apiVersion: kubevirt.io/v1
23-
kind: VirtualMachine
24-
metadata:
25-
name: vm-ephemeral
26-
namespace: example-namespace
27-
spec:
28-
running: false
29-
template:
30-
metadata:
31-
labels:
32-
special: key <1>
33-
# ...
34-
----
35-
<1> Add the label `special: key` in the `spec.template.metadata.labels` section.
36-
+
37-
38-
[NOTE]
39-
====
40-
Labels on a virtual machine are passed through to the pod. The `special: key` label must match the label in the `spec.selector` attribute of the `Service` manifest.
41-
====
42-
43-
. Save the `VirtualMachine` manifest file to apply your changes.
44-
. Create a `Service` manifest to expose the VM:
45-
+
46-
[source,yaml]
47-
----
48-
apiVersion: v1
49-
kind: Service
50-
metadata:
51-
name: rdpservice <1>
52-
namespace: example-namespace <2>
53-
spec:
54-
ports:
55-
- targetPort: 3389 <3>
56-
protocol: TCP
57-
selector:
58-
special: key <4>
59-
type: NodePort <5>
60-
# ...
61-
----
62-
<1> The name of the `Service` object.
63-
<2> The namespace where the `Service` object resides. This must match the `metadata.namespace` field of the `VirtualMachine` manifest.
64-
<3> The VM port to be exposed by the service. It must reference an open port if a port list is defined in the VM manifest.
65-
<4> The reference to the label that you added in the `spec.template.metadata.labels` stanza of the `VirtualMachine` manifest.
66-
<5> The type of service.
67-
68-
. Save the `Service` manifest file.
69-
. Create the service by running the following command:
25+
. Log in to the {VirtProductName} cluster through the `oc` CLI tool as a user with
26+
an access token.
7027
+
7128
[source,terminal]
7229
----
73-
$ oc create -f <service_name>.yaml
30+
$ oc login -u <user> https://<cluster.example.com>:8443
7431
----
7532

76-
. Start the VM. If the VM is already running, restart it.
77-
. Query the `Service` object to verify that it is available:
33+
. Use `oc describe vmi` to display the configuration of the running
34+
Windows virtual machine.
7835
+
79-
[source, terminal]
80-
----
81-
$ oc get service -n example-namespace
82-
----
83-
+
84-
.Example output for `NodePort` service
8536
[source,terminal]
8637
----
87-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
88-
rdpservice NodePort 172.30.232.73 <none> 3389:30000/TCP 5m
89-
----
90-
91-
. Run the following command to obtain the IP address for the node:
92-
+
93-
[source,terminal]
94-
----
95-
$ oc get node <node_name> -o wide
38+
$ oc describe vmi <windows-vmi-name>
9639
----
9740
+
9841
.Example output
99-
[source,terminal]
42+
[source,yaml]
10043
----
101-
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP
102-
node01 Ready worker 6d22h v1.24.0 192.168.55.101 <none>
44+
...
45+
spec:
46+
networks:
47+
- name: default
48+
pod: {}
49+
- multus:
50+
networkName: cnv-bridge
51+
name: bridge-net
52+
...
53+
status:
54+
interfaces:
55+
- interfaceName: eth0
56+
ipAddress: 198.51.100.0/24
57+
ipAddresses:
58+
198.51.100.0/24
59+
mac: a0:36:9f:0f:b1:70
60+
name: default
61+
- interfaceName: eth1
62+
ipAddress: 192.0.2.0/24
63+
ipAddresses:
64+
192.0.2.0/24
65+
2001:db8::/32
66+
mac: 00:17:a4:77:77:25
67+
name: bridge-net
68+
...
10369
----
10470

105-
. Specify the node IP address and the assigned port in your preferred RDP client.
106-
. Enter the user name and password to connect to the Windows virtual machine.
71+
. Identify and copy the IP address of the layer 2 network interface. This is
72+
`192.0.2.0` in the above example, or `2001:db8::` if you prefer IPv6.
73+
. Open an RDP client and use the IP address copied in the previous step for the
74+
connection.
75+
. Enter the *Administrator* user name and password to connect to the
76+
Windows virtual machine.

modules/virt-creating-a-service-from-a-virtual-machine.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,21 @@ $ oc get service -n example-namespace
8585
----
8686
+
8787
.Example output for `ClusterIP` service
88-
[source,terminal]
88+
[source, terminal]
8989
----
9090
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
9191
vmservice ClusterIP 172.30.3.149 <none> 27017/TCP 2m
9292
----
9393
+
9494
.Example output for `NodePort` service
95-
[source,terminal]
95+
[source, terminal]
9696
----
9797
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
9898
vmservice NodePort 172.30.232.73 <none> 27017:30000/TCP 5m
9999
----
100100
+
101101
.Example output for `LoadBalancer` service
102-
[source,terminal]
102+
[source, terminal]
103103
----
104104
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
105105
vmservice LoadBalancer 172.30.27.5 172.29.10.235,172.29.10.235 27017:31829/TCP 5s

modules/virt-vm-rdp-console-web.adoc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,32 @@
66
[id="virt-vm-rdp-console-web_{context}"]
77
= Connecting to a Windows virtual machine with RDP
88

9-
The *Desktop viewer* console, which utilizes the Remote Desktop Protocol (RDP), provides a better console experience for connecting to Windows virtual machines.
9+
The desktop viewer console, which utilizes the Remote Desktop Protocol (RDP),
10+
provides a better console experience for connecting to Windows virtual machines.
1011

11-
To connect to a Windows virtual machine with RDP, download the `console.rdp` file for the virtual machine from the *Console* tab on the *VirtualMachine details* page of the web console and supply it to your preferred RDP client.
12+
To connect to a Windows virtual machine with RDP, download the `console.rdp` file for the virtual machine from the *Consoles* tab on the *VirtualMachine Details* page of the web console and supply it to your preferred RDP client.
1213

1314
.Prerequisites
1415

1516
* A running Windows virtual machine with the QEMU guest agent installed. The `qemu-guest-agent` is included in the VirtIO drivers.
17+
* A layer-2 NIC attached to the virtual machine.
1618
* An RDP client installed on a machine on the same network as the Windows virtual machine.
1719
1820
.Procedure
1921

2022
. In the {product-title} console, click *Virtualization* -> *VirtualMachines* from the side menu.
2123
. Click a Windows virtual machine to open the *VirtualMachine details* page.
2224
. Click the *Console* tab.
23-
. From the list of consoles, select *Desktop viewer*.
25+
. In the *Console* list, select *Desktop Viewer*.
26+
. In the *Network Interface* list, select the layer-2 NIC.
2427
. Click *Launch Remote Desktop* to download the `console.rdp` file.
25-
. Reference the `console.rdp` file in your preferred RDP client to connect to the Windows virtual machine.
28+
. Open an RDP client and reference the `console.rdp` file. For example, using
29+
*remmina*:
30+
+
31+
[source,terminal]
32+
----
33+
$ remmina --connect /path/to/console.rdp
34+
----
35+
36+
. Enter the *Administrator* user name and password to connect to the
37+
Windows virtual machine.

0 commit comments

Comments
 (0)