Documentation Update: MacVTAP Feature Removal
Update 5: Updated Suhailaths comments. Update 4: Removed references to the feature gate from the live migration topic. Update 3: Removed Feature Gate section from Live Migration. Update 2: Removed feature gate from interfac and network section and added it to Live Migration section. Update 1: Removed MacVTAP from Interface and Networks and Use Shared Resource (CPU) sections Change-Id: I7092b8e11839eec0cbdfda2cb63ca5c97025cb67 Signed-off-by: Petsy Mathew <petsy.mathew@windriver.com>
This commit is contained in:
@@ -19,137 +19,6 @@ declares which logical or physical device it is connected to (also called as
|
||||
backend).
|
||||
|
||||
|
||||
MacVTap
|
||||
-------
|
||||
|
||||
In MacVTap mode, virtual machines are directly exposed to the Kubernetes nodes
|
||||
L2 network. This is achieved by 'extending' an existing network interface with
|
||||
a virtual device that has its own MAC address.
|
||||
|
||||
MacVTap interfaces are feature gated; to enable the feature, follow
|
||||
instructions, in order to activate the MacVTap feature gate (case sensitive).
|
||||
|
||||
|
||||
How to Activate a Feature Gate
|
||||
------------------------------
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
cat << END > enable-feature-gate.yaml
|
||||
---
|
||||
apiVersion: kubevirt.io/v1
|
||||
kind: KubeVirt
|
||||
metadata:
|
||||
name: kubevirt
|
||||
namespace: kubevirt
|
||||
spec:
|
||||
configuration:
|
||||
developerConfiguration:
|
||||
featureGates:
|
||||
- LiveMigration
|
||||
- Macvtap
|
||||
END
|
||||
|
||||
kubectl apply -f enable-feature-gate.yaml
|
||||
|
||||
.. note::
|
||||
|
||||
Make sure to add all existing feature gates in overrides file.
|
||||
|
||||
Alternatively, the existing kubevirt custom resources can be altered:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
kubectl edit kubevirt kubevirt -n kubevirt
|
||||
...
|
||||
spec:
|
||||
configuration:
|
||||
developerConfiguration:
|
||||
featureGates:
|
||||
- DataVolumes
|
||||
- LiveMigration
|
||||
- Macvtap
|
||||
|
||||
.. note::
|
||||
|
||||
The names of the feature gates are case sensitive.
|
||||
|
||||
Below is the usage example of MacVTap interface used by |VM|:
|
||||
|
||||
Create network attachment for the MacVTap network:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
kind: NetworkAttachmentDefinition
|
||||
apiVersion: k8s.cni.cncf.io/v1
|
||||
metadata:
|
||||
name: macvtapnetwork
|
||||
annotations:
|
||||
k8s.v1.cni.cncf.io/resourceName: macvtap.network.kubevirt.io/dataplane1
|
||||
spec:
|
||||
config: '{
|
||||
"cniVersion": "0.3.1",
|
||||
"name": "macvtapnetwork",
|
||||
"type": "macvtap",
|
||||
"mtu": 1500
|
||||
}'
|
||||
|
||||
.. note::
|
||||
|
||||
By running this yaml, the system will create 10
|
||||
``macvtap.network.kubevirt.io/dataplane1`` network attachments or
|
||||
interfaces.
|
||||
|
||||
Now you can create the |VM| using MacVTap network, for example:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
apiVersion: kubevirt.io/v1alpha3
|
||||
kind: VirtualMachine
|
||||
metadata:
|
||||
labels:
|
||||
special: vmi-host-network
|
||||
name: vmi-host-network
|
||||
spec:
|
||||
running: true
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
kubevirt.io/size: small
|
||||
kubevirt.io/domain: fedora
|
||||
spec:
|
||||
domain:
|
||||
cpu:
|
||||
cores: 1
|
||||
devices:
|
||||
disks:
|
||||
- name: containerdisk
|
||||
disk:
|
||||
bus: virtio
|
||||
- name: cloudinitdisk
|
||||
disk:
|
||||
bus: virtio
|
||||
interfaces:
|
||||
- name: hostnetwork
|
||||
macvtap: {}
|
||||
resources:
|
||||
requests:
|
||||
memory: 1024M
|
||||
networks:
|
||||
- name: hostnetwork
|
||||
multus:
|
||||
networkName: macvtapnetwork
|
||||
volumes:
|
||||
- name: containerdisk
|
||||
containerDisk:
|
||||
image: docker.io/kubevirt/fedora-cloud-container-disk-demo:devel
|
||||
- name: cloudinitdisk
|
||||
cloudInitNoCloud:
|
||||
userData: |-
|
||||
#!/bin/bash
|
||||
echo "fedora" |passwd fedora --stdin
|
||||
|
||||
|
||||
Multus
|
||||
------
|
||||
|
||||
@@ -157,12 +26,16 @@ It is also possible to connect VMIs to secondary networks using Multus. This
|
||||
assumes that multus is installed across your cluster and a corresponding
|
||||
``NetworkAttachmentDefinition`` |CRD| was created.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
.. Note: Replacing MacVTAP references with sriov in the following example configuration.
|
||||
|
||||
|
||||
.. note::
|
||||
|
||||
First create the respective network attachment, for example if you want to
|
||||
use MacVTap or |SRIOV| for a secondary interface.
|
||||
use |SRIOV| for a secondary interface.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
@@ -195,7 +68,7 @@ Example:
|
||||
- name: default
|
||||
masquerade: {}
|
||||
- name: hostnetwork
|
||||
macvtap: {}
|
||||
sriov: {}
|
||||
|
||||
resources:
|
||||
requests:
|
||||
@@ -205,7 +78,7 @@ Example:
|
||||
pod: {}
|
||||
- name: hostnetwork
|
||||
multus:
|
||||
networkName: macvtapnetwork
|
||||
networkName: sriovnetwork
|
||||
volumes:
|
||||
- name: containerdisk
|
||||
containerDisk:
|
||||
@@ -217,7 +90,7 @@ Example:
|
||||
echo "fedora" |passwd fedora --stdin
|
||||
|
||||
In the example manifest above, the |VM| uses the first interface as default and
|
||||
second interface is MacVTap which is mapped using multus.
|
||||
second interface is SR-IOV which is mapped using multus.
|
||||
|
||||
SRIOV
|
||||
-----
|
||||
|
||||
@@ -14,10 +14,52 @@ compute node while the guest workload continues to run and remain accessible.
|
||||
Enable the Live Migration Support
|
||||
---------------------------------
|
||||
|
||||
Live migration is enabled by default in recent versions of KubeVirt. Versions
|
||||
prior to v0.56 must be enabled in the feature gates. The feature gates field in
|
||||
the KubeVirt Custom Resource must be expanded by adding the live migration to
|
||||
it.
|
||||
Live migration is enabled by default in recent versions of KubeVirt.
|
||||
|
||||
.. For versions prior to v0.56, it must be enabled through feature gates. To activate a feature-gated capability, see the section below.
|
||||
|
||||
.. This feature gate section was originally part of the Interfaces and Networks documentation, where it focused on MacVTAP. With MacVTAP no longer supported, the section has been moved here for relevance, but is now being removed.
|
||||
|
||||
.. How to Activate a Feature Gate
|
||||
.. ------------------------------
|
||||
|
||||
.. Feature gates allow you to enable or disable specific KubeVirt capabilities.
|
||||
|
||||
.. .. code-block:: none
|
||||
|
||||
.. cat << END > enable-feature-gate.yaml
|
||||
---
|
||||
apiVersion: kubevirt.io/v1
|
||||
kind: KubeVirt
|
||||
metadata:
|
||||
name: kubevirt
|
||||
namespace: kubevirt
|
||||
spec:
|
||||
configuration:
|
||||
developerConfiguration:
|
||||
featureGates:
|
||||
- LiveMigration
|
||||
END
|
||||
|
||||
kubectl apply -f enable-feature-gate.yaml
|
||||
|
||||
.. Make sure to add all existing feature gates in overrides file.
|
||||
|
||||
.. Alternatively, the existing kubevirt custom resources can be altered:
|
||||
|
||||
.. .. code-block:: none
|
||||
|
||||
.. kubectl edit kubevirt kubevirt -n kubevirt
|
||||
...
|
||||
spec:
|
||||
configuration:
|
||||
developerConfiguration:
|
||||
featureGates:
|
||||
- DataVolumes
|
||||
- LiveMigration
|
||||
|
||||
.. The names of the feature gates are case sensitive.
|
||||
|
||||
|
||||
Limitation for live migrations:
|
||||
|
||||
|
||||
@@ -99,7 +99,6 @@ host's pCPUs.
|
||||
developerConfiguration:
|
||||
featureGates:
|
||||
- LiveMigration
|
||||
- Macvtap
|
||||
- Snapshot
|
||||
- CPUManager
|
||||
|
||||
|
||||
Reference in New Issue
Block a user