10.18.2. Customizing the MAC pool range


KubeMacPool works by allocating MAC addresses to VMs from a range. The rangeStart and rangeEnd parameters in the HyperConverged custom resource (CR) define the MAC pool range.

As a cluster administrator, you can configure this range to ensure that MAC addresses for VMs hosted on OpenShift Virtualization do not conflict with other virtualization solutions on the same network.

Prerequisites

  • You have cluster administrator access on an OpenShift Container Platform cluster.
  • You have installed the OpenShift CLI (oc).

Procedure

  1. Edit the HyperConverged CR by running the following command:

    $ oc edit hyperconverged kubevirt-hyperconverged -n openshift-cnv
  2. Update the HyperConverged CR to configure the rangeStart and rangeEnd parameters that define your required MAC address range:

    apiVersion: hco.kubevirt.io/v1beta1
    kind: HyperConverged
    metadata:
      name: kubevirt-hyperconverged
    spec:
      kubeMacPoolConfiguration:
        rangeStart: "AA:00:00:00:00:00"
        rangeEnd: "FD:FF:FF:FF:FF:FF"
    # ...

Verification

  1. Run the following command and observe the output:

    $ oc get hco kubevirt-hyperconverged -n openshift-cnv -o=jsonpath='{.spec.kubeMacPoolConfiguration}'

    If you have successfully applied the configuration changes, the output shows the new MAC pool range you have configured:

    Example output:

    {
      "rangeStart": "AA:00:00:00:00:00",
      "rangeEnd": "FD:FF:FF:FF:FF:FF"
    }
  2. Optional. Create a new VM and run the following command to check the MAC address of the VM’s network interface:

    $ oc get vmi <vm-name> -o=jsonpath='{.status.interfaces[0].macAddress}'

    Example output:

    macAddress: AA:00:00:00:00:04

    If you have successfully applied the configuration changes, the macAddress field in the VM interface is within the range you specified in your kubeMacPoolConfiguration, between the value of rangeStart and rangeEnd.

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동