@@ -19,7 +19,7 @@ You can access a virtual machine (VM) that is attached to a secondary network in
19
19
+
20
20
[source,terminal]
21
21
----
22
- $ oc get vm -n secondary-test vm-test-sec-dns -o yaml
22
+ $ oc get vm -n < namespace > < vm _name > -o yaml
23
23
----
24
24
+
25
25
.Example output
@@ -29,51 +29,41 @@ apiVersion: kubevirt.io/v1
29
29
kind: VirtualMachine
30
30
metadata:
31
31
labels:
32
- kubevirt.io/vm: vm-test-sec-dns
33
- name: vm-test-sec-dns <1>
34
- namespace: secondary-test <2>
32
+ kubevirt.io/vm: example-vm
33
+ name: example-vm
34
+ namespace: example-namespace
35
35
spec:
36
36
running: true
37
37
template:
38
38
metadata:
39
39
labels:
40
- kubevirt.io/vm: vm-test-sec-dns
40
+ kubevirt.io/vm: example-vm
41
41
spec:
42
42
domain:
43
43
devices:
44
44
# ...
45
45
interfaces:
46
46
- bridge: {}
47
- name: nic1
47
+ name: example-nic
48
48
# ...
49
49
networks:
50
50
- multus:
51
51
networkName: bridge-conf
52
- name: nic1 <3 >
52
+ name: example-nic <1 >
53
53
# ...
54
54
----
55
- <1> The name of the `VirtualMachine` object.
56
- <2> The namespace in which the `VirtualMachine` object is defined.
57
- <3> The name of the secondary network interface.
55
+ <1> Specify the name of the secondary network interface.
58
56
59
57
. Connect to the VM by using the `ssh` command:
60
58
+
61
- --
62
59
[source,terminal]
63
60
----
64
- $ ssh <interface _name >.<vm _name >.<namespace >.vm.<FQDN>
61
+ $ ssh <user _name >@< interface _name >.<vm _name >.<namespace >.vm.<FQDN> <1 >
65
62
----
66
-
67
- where:
68
-
69
- * `<interface_name>` specifies the name of the secondary network interface.
70
- * `<vm_name>` specifies the name of the `VirtualMachine` object.
71
- * `<namespace>` specifies the namespace in which the `VirtualMachine` object is defined.
72
- * `<FQDN>` specifies the fully qualified domain name of the cluster.
73
- --
63
+ <1> Specify the user name, interface name, VM name, VM namespace, and FQDN.
74
64
+
75
65
.Example
76
66
[source,terminal]
77
67
----
78
- $ ssh nic1.vm-test-sec-dns.secondary-test .vm.openshift.example.com
68
+ $ ssh
[email protected] .vm.openshift.example.com
79
69
----
0 commit comments