You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/virt-hot-plugging-bridge-network-interface-cli.adoc
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,8 +12,7 @@ Hot plug a secondary network interface to a virtual machine (VM) while the VM is
12
12
13
13
* A network attachment definition is configured in the same namespace as your VM.
14
14
* You have installed the `virtctl` tool.
15
-
* You have installed the OpenShift CLI (`oc`).
16
-
* You have permission to create and list `VirtualMachineInstanceMigration` objects.
15
+
* You have installed the {oc-first}.
17
16
18
17
.Procedure
19
18
@@ -24,12 +23,7 @@ Hot plug a secondary network interface to a virtual machine (VM) while the VM is
24
23
$ virtctl start <vm_name> -n <namespace>
25
24
----
26
25
27
-
. Use the following command to add the new network interface to the running VM. Editing the VM specification adds the new network interface to the VM and virtual machine instance (VMI) configuration but does not attach it to the running VM.
28
-
+
29
-
[source,terminal]
30
-
----
31
-
$ oc edit vm <vm_name>
32
-
----
26
+
. Use your preferred text editor to edit the `VirtualMachine` manifest, as shown in the following example:
33
27
+
34
28
.Example VM configuration
35
29
[source,yaml]
@@ -61,13 +55,18 @@ template:
61
55
<2> Specifies the name of the network. This must be the same as the `name` of the new network interface that you defined in the `template.spec.domain.devices.interfaces` list.
62
56
<3> Specifies the name of the `NetworkAttachmentDefinition` object.
63
57
58
+
. Save your changes and exit the editor.
64
59
65
-
. To attach the network interface to the running VM, live migrate the VM by running the following command:
60
+
. For the new configuration to take effect, apply the changes by running the following command. Applying the changes triggers automatic VM live migration and attaches the network interface to the running VM.
66
61
+
67
62
[source,terminal]
68
63
----
69
-
$ virtctl migrate <vm_name>
64
+
$ oc apply -f <filename>.yaml
70
65
----
66
+
+
67
+
where:
68
+
69
+
<filename>:: Specifies the name of your `VirtualMachine` manifest YAML file.
Copy file name to clipboardExpand all lines: modules/virt-hot-unplugging-bridge-network-interface-cli.adoc
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,17 +18,11 @@ Hot unplugging is not supported for Single Root I/O Virtualization (SR-IOV) inte
18
18
* Your VM must be running.
19
19
* The VM must be created on a cluster running {VirtProductName} 4.14 or later.
20
20
* The VM must have a bridge network interface attached.
21
-
* You have permission to create and list `VirtualMachineInstanceMigration` objects.
22
21
* You have installed the {oc-first}.
23
22
24
23
.Procedure
25
24
26
-
. Edit the VM specification to hot unplug a secondary network interface. Setting the interface state to `absent` detaches the network interface from the guest, but the interface still exists in the pod.
27
-
+
28
-
[source,terminal]
29
-
----
30
-
$ oc edit vm <vm_name>
31
-
----
25
+
. Using your preferred text editor, edit the `VirtualMachine` manifest file and set the interface state to `absent`. Setting the interface state to `absent` detaches the network interface from the guest, but the interface still exists in the pod.
32
26
+
33
27
.Example VM configuration
34
28
[source,yaml]
@@ -58,9 +52,15 @@ template:
58
52
----
59
53
<1> Set the interface state to `absent` to detach it from the running VM. Removing the interface details from the VM specification does not hot unplug the secondary network interface.
60
54
61
-
. Remove the interface from the pod by migrating the VM:
55
+
. Save your changes and exit the editor.
56
+
57
+
. For the new configuration to take effect, apply the changes by running the following command. Applying the changes triggers automatic VM live migration and removes the interface from the pod.
62
58
+
63
59
[source,terminal]
64
60
----
65
-
$ virtctl migrate <vm_name>
61
+
$ oc apply -f <filename>.yaml
66
62
----
63
+
+
64
+
where:
65
+
66
+
<filename>:: Specifies the name of your `VirtualMachine` manifest YAML file.
0 commit comments