diff --git a/buildcore.sh b/buildcore.sh index 14b584513..abd9ba6a2 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -371,6 +371,9 @@ if [ "$OSNAME" != "AIX" ]; then if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS xCAT-genesis-scripts-x86_64"; fi ./makerpm xCAT-genesis-scripts ppc64 "$EMBED" if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS xCAT-genesis-scripts-ppc64"; fi + # Do not build xCAT-genesis-scripts-aarch64 yet + #./makerpm xCAT-genesis-scripts aarch64 "$EMBED" + #if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS xCAT-genesis-scripts-aarch64"; fi if [ "$FAILEDRPMS" = "$ORIGFAILEDRPMS" ]; then # all succeeded rm -f $DESTDIR/xCAT-genesis-scripts*rpm rm -f $SRCDIR/xCAT-genesis-scripts*rpm @@ -392,7 +395,7 @@ for rpmname in xCAT xCATsn; do ./makerpm $rpmname "$EMBED" if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname"; fi else - for arch in x86_64 ppc64 ppc64le s390x; do + for arch in x86_64 ppc64 ppc64le s390x aarch64; do if [ "$rpmname" = "xCAT-OpenStack" -a "$arch" != "x86_64" ] || [ "$rpmname" = "xCAT-OpenStack-baremetal" -a "$arch" != "x86_64" ] ; then continue; fi # only bld openstack for x86_64 for now ./makerpm $rpmname $arch "$EMBED" if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname-$arch"; fi diff --git a/buildlocal.sh b/buildlocal.sh index 54bd06a86..853471758 100755 --- a/buildlocal.sh +++ b/buildlocal.sh @@ -123,7 +123,7 @@ echo "This is an $OSNAME system" $CURDIR/makerpm $rpmname if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname"; fi else - for arch in x86_64 ppc64 s390x; do + for arch in x86_64 ppc64 s390x aarch64; do $CURDIR/makerpm $rpmname $arch if [ $? -ne 0 ]; then FAILEDRPMS="$FAILEDRPMS $rpmname-$arch"; fi done diff --git a/docs/source/advanced/mixed_cluster/building_stateless_images.rst b/docs/source/advanced/mixed_cluster/building_stateless_images.rst index daec246f5..b08f855e0 100644 --- a/docs/source/advanced/mixed_cluster/building_stateless_images.rst +++ b/docs/source/advanced/mixed_cluster/building_stateless_images.rst @@ -9,6 +9,28 @@ In a homogeneous cluster, the management node is the same hardware architecture The issues arises in a heterogeneous cluster, where the management node is running a different level operating system *or* hardware architecture as the compute nodes in which to deploy the image. The ``genimage`` command that builds stateless images depends on various utilities provided by the base operating system and needs to be run on a node with the same hardware architecture and *major* Operating System release as the nodes that will be booted from the image. +When running xCAT >= 2.17 on EL >= 8 based management node with x86_64 architecture, qemu-user-static can be used to cross-build ppc64* and aarch64 osimages. Therefore, you don't need to build images on systems with the target architecture anymore. + +Cross-build ppc64*/aarch64 stateless/statelite image on x86_64 management node +------------------------------------------------------------------------------ + +#. Download qemu-user-static binaries for ppc64le and/or aarch64: :: + + wget https://github.com/multiarch/qemu-user-static/releases/latest/download/qemu-ppc64le-static -P /usr/bin + wget https://github.com/multiarch/qemu-user-static/releases/latest/download/qemu-aarch64-static -P /usr/bin + chmod 755 /usr/bin/qemu-*-static + +#. Configure systemd-binfmt accordingly: :: + + wget https://raw.githubusercontent.com/qemu/qemu/master/scripts/qemu-binfmt-conf.sh + bash qemu-binfmt-conf.sh --systemd 'ALL' --qemu-path '/usr/bin' --qemu-suffix '-static' --persistent 'yes' + systemctl restart systemd-binfmt.service + +#. Make sure ``osimage.osarch`` of your image is set to your target architecture eg. ``ppc64le`` or ``aarch64``. + + Now, ``genimage`` will use systemd-binfmt and the qemu-user-static binary to build the image for the specified architecture. + + Same Operating System, Different Architecture --------------------------------------------- diff --git a/docs/source/advanced/mixed_cluster/index.rst b/docs/source/advanced/mixed_cluster/index.rst index cbe8f293c..1e2cfe4bc 100644 --- a/docs/source/advanced/mixed_cluster/index.rst +++ b/docs/source/advanced/mixed_cluster/index.rst @@ -1,7 +1,7 @@ Mixed Cluster ============= -The concept of mixed cluster support in xCAT is managing cluster which contain different hardware architectures. Most commonly, this is usually a cluster consisting of both Power and x86 systems. +The concept of mixed cluster support in xCAT is managing cluster which contain different hardware architectures. Most commonly, this is usually a cluster consisting of both Power, ARM and x86 systems. .. toctree:: :maxdepth: 2 diff --git a/docs/source/advanced/mixed_cluster/support_matrix.rst b/docs/source/advanced/mixed_cluster/support_matrix.rst index 08f85eb75..8fcbacfd0 100644 --- a/docs/source/advanced/mixed_cluster/support_matrix.rst +++ b/docs/source/advanced/mixed_cluster/support_matrix.rst @@ -1,49 +1,50 @@ Support Matrix ============== -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| | RHEL | SLES | RHEL | SLES | Ubuntu | RHEL | SLES | Ubuntu | -| | ppc64 | ppc64 | x86_64 | x86_64 | x86_64 | ppc64le | ppc64le | ppc64el | -| | CN | CN | CN | CN | CN | CN | CN | CN | -+=========+=========+=========+=========+=========+=========+=========+=========+=========+ -| RHEL | | | | | | | | | -| ppc64 | yes | yes | yes | yes | yes | yes | yes | yes | -| MN/SN | | | [1]_ | [1]_ | [1]_ | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| SLES | | | | | | | | | -| ppc64 | yes | yes | yes | yes | yes | yes | yes | yes | -| MN/SN | | | [1]_ | [1]_ | [1]_ | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| RHEL | | | | | | | | | -| x86_64 | yes | yes | yes | yes | yes | yes | yes | yes | -| MN/SN | [4]_ | [4]_ | | | | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| SLES | | | | | | | | | -| x86_64 | yes | yes | yes | yes | yes | yes | yes | yes | -| MN/SN | [4]_ | [4]_ | | | | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| Ubuntu | | | | | | | | | -| x86_64 | yes | yes | yes | yes | yes | yes | yes | yes | -| MN/SN | [5]_ | [5]_ | | | | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| RHEL | | | | | | | | | -| ppc64le | yes | yes | yes | yes | yes | yes | yes | yes | -| MN/SN | [2]_ | [2]_ | | | | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| SLES | | | | | | | | | -| ppc64le | no | no | yes | yes | yes | yes | yes | yes | -| MN/SN | | | | | | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ -| Ubuntu | | | | | | | | | -| ppc64el | yes | yes | yes | yes | yes | yes | yes | yes | -| MN/SN | [3]_ | [3]_ | | | | | | | -+---------+---------+---------+---------+---------+---------+---------+---------+---------+ ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| | RHEL | SLES | RHEL | SLES | Ubuntu | RHEL | SLES | Ubuntu | RHEL | SLES | Ubuntu | +| | ppc64 | ppc64 | x86_64 | x86_64 | x86_64 | ppc64le | ppc64le | ppc64el | aarch64 | aarch64 | aarch64 | +| | CN | CN | CN | CN | CN | CN | CN | CN | CN | CN | CN | ++=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+=========+ +| RHEL | | | | | | | | | | | | +| ppc64 | yes | yes | yes | yes | yes | yes | yes | yes | no | no | no | +| MN/SN | | | [1]_ | [1]_ | [1]_ | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| SLES | | | | | | | | | | | | +| ppc64 | yes | yes | yes | yes | yes | yes | yes | yes | no | no | no | +| MN/SN | | | [1]_ | [1]_ | [1]_ | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| RHEL | | | | | | | | | | | | +| x86_64 | yes | yes | yes | yes | yes | yes | yes | yes | yes | no | no | +| MN/SN | [4]_ | [4]_ | | | | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| SLES | | | | | | | | | | | | +| x86_64 | yes | yes | yes | yes | yes | yes | yes | yes | yes | no | no | +| MN/SN | [4]_ | [4]_ | | | | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| Ubuntu | | | | | | | | | | | | +| x86_64 | yes | yes | yes | yes | yes | yes | yes | yes | yes | no | no | +| MN/SN | [5]_ | [5]_ | | | | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| RHEL | | | | | | | | | | | | +| ppc64le | yes | yes | yes | yes | yes | yes | yes | yes | no | no | no | +| MN/SN | [2]_ | [2]_ | | | | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| SLES | | | | | | | | | | | | +| ppc64le | no | no | yes | yes | yes | yes | yes | yes | no | no | no | +| MN/SN | | | | | | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ +| Ubuntu | | | | | | | | | | | | +| ppc64el | yes | yes | yes | yes | yes | yes | yes | yes | no | no | no | +| MN/SN | [3]_ | [3]_ | | | | | | | | | | ++---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+---------+ + Notes: * The support statements refers to hardware control, operating system (os) provisioning, and general purpose system management where we do not see any obvious problems with the indicated combination. -* For diskless mixed cluster support, the initial diskless image must be created on a node running the target operating system version and architecture. see :doc:`/advanced/mixed_cluster/building_stateless_images` for more details. +* For xCAT < 2.17 diskless mixed cluster support, the initial diskless image must be created on a node running the target operating system version and architecture. On xCAT >= 2.17 with x86 based management nodes QEMU emulation can be used for different architectures (eg. ppc64 or aarch64) if qemu-user-static is installed and configured via systemd-binfmt. See :doc:`/advanced/mixed_cluster/building_stateless_images` for more details. .. rubric:: Footnotes diff --git a/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst b/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst index ce02b697e..15f3d48d3 100644 --- a/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst +++ b/docs/source/guides/admin-guides/basic_concepts/xcat_object/node.rst @@ -13,7 +13,7 @@ Key Attributes The operating system deployed on this node. Valid values: AIX, rhels*, rhelc*, rhas*, centos*, SL*, fedora*, sles* (where * is the version #) * arch: - The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64. + The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64, aarch64. * groups: Usually, there are a set of nodes with some attributes in common, xCAT admin can define a node group containing these nodes, so that the management task can be issued against the group instead of individual nodes. A node can be a member of different groups, so the value of this attributes is a comma-delimited list of groups. At least one group is required to create a node. The new created group names should not be prefixed with "__" as this token has been preserved as the internal group name. @@ -33,7 +33,7 @@ Key Attributes +--------------------------+----------------------+-----------------------------------+ | Arch and Machine Type | OS | valid netboot options | +==========================+======================+===================================+ - | x86, x86_64 | ALL | pxe, xnba | + | x86, x86_64 | ALL | pxe, xnba, grub2 | +--------------------------+----------------------+-----------------------------------+ | ppc64 | <=rhel6, <=sles11.3 | yaboot | +--------------------------+----------------------+-----------------------------------+ @@ -42,6 +42,8 @@ Key Attributes | ppc64le NonVirtualize | ALL | petitboot | +--------------------------+----------------------+-----------------------------------+ | ppc64le PowerKVM Guest | ALL | grub2,grub2-http,grub2-tftp | + +--------------------------+----------------------+-----------------------------------+ + | aarch64 | >=el8 | grub2 | +-------------------------------------------------+-----------------------------------+ * postscripts: diff --git a/docs/source/guides/admin-guides/references/man1/genimage.1.rst b/docs/source/guides/admin-guides/references/man1/genimage.1.rst index 85107fe69..1d13e6ede 100644 --- a/docs/source/guides/admin-guides/references/man1/genimage.1.rst +++ b/docs/source/guides/admin-guides/references/man1/genimage.1.rst @@ -49,7 +49,9 @@ Besides prompting for some parameter values, the \ **genimage**\ command takes If \ **-**\ **-onlyinitrd**\ is specified, genimage only regenerates the initrd for a stateless image to be used for a diskless install. -The \ **genimage**\ command must be run on a system that is the same architecture and same distro with same major release version as the nodes it will be used on. If the management node is not the same architecture or same distro level, copy the contents of +The \ **genimage**\ command must be run on a system that is the same architecture and same distro with same major release version as the nodes it will be used on. +For different architectures, \ **genimage**\ will try to use QEMU emulation if qemu-user-static is installed and configured via systemd-binfmt. +If this does not work or the management node is not the same distro level, copy the contents of /opt/xcat/share/xcat/netboot/ to a system that is the proper architecture, and mount /install from the management node to that system. Then change directory to /opt/xcat/share/xcat/netboot/ and run ./genimage. @@ -70,7 +72,7 @@ OPTIONS \ **-a**\ \ *arch*\ - The hardware architecture of this node: ppc64le, x86_64, ppc64, x86, ia64, etc. If omitted, the current hardware architecture will be used. + The hardware architecture of this node: ppc64le, x86_64, ppc64, x86, ia64, aarch64 etc. If omitted, the current hardware architecture will be used. diff --git a/docs/source/guides/admin-guides/references/man5/noderes.5.rst b/docs/source/guides/admin-guides/references/man5/noderes.5.rst index 98bc13b24..67bb5fde7 100644 --- a/docs/source/guides/admin-guides/references/man5/noderes.5.rst +++ b/docs/source/guides/admin-guides/references/man5/noderes.5.rst @@ -56,11 +56,12 @@ noderes Attributes: .. code-block:: perl Arch OS valid netboot options - x86, x86_64 ALL pxe, xnba + x86, x86_64 ALL pxe, xnba, grub2 ppc64 <=rhel6, <=sles11.3 yaboot ppc64 >=rhels7, >=sles11.4 grub2,grub2-http,grub2-tftp ppc64le NonVirtualize ALL petitboot ppc64le PowerKVM Guest ALL grub2,grub2-http,grub2-tftp + aarch64 >=el8 grub2 diff --git a/docs/source/guides/admin-guides/references/man5/nodetype.5.rst b/docs/source/guides/admin-guides/references/man5/nodetype.5.rst index 311832594..72e6d6f4b 100644 --- a/docs/source/guides/admin-guides/references/man5/nodetype.5.rst +++ b/docs/source/guides/admin-guides/references/man5/nodetype.5.rst @@ -50,7 +50,7 @@ nodetype Attributes: \ **arch**\ - The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64. + The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64, aarch64. diff --git a/docs/source/guides/admin-guides/references/man5/osimage.5.rst b/docs/source/guides/admin-guides/references/man5/osimage.5.rst index 959007aa6..b5bf84f82 100644 --- a/docs/source/guides/admin-guides/references/man5/osimage.5.rst +++ b/docs/source/guides/admin-guides/references/man5/osimage.5.rst @@ -110,7 +110,7 @@ osimage Attributes: \ **osarch**\ - The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64. + The hardware architecture of this node. For netboot/statelite images, QEMU emulation for non-native architectures is used if qemu-user-static is installed and configured via systemd-binfmt. Valid values: x86_64, ppc64, x86, ia64, aarch64. diff --git a/docs/source/guides/admin-guides/references/man7/group.7.rst b/docs/source/guides/admin-guides/references/man7/group.7.rst index c8f339e5a..8865f8347 100644 --- a/docs/source/guides/admin-guides/references/man7/group.7.rst +++ b/docs/source/guides/admin-guides/references/man7/group.7.rst @@ -47,7 +47,7 @@ group Attributes: \ **arch**\ (nodetype.arch) - The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64. + The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64, aarch64. @@ -591,11 +591,12 @@ group Attributes: .. code-block:: perl Arch OS valid netboot options - x86, x86_64 ALL pxe, xnba + x86, x86_64 ALL pxe, xnba, grub2 ppc64 <=rhel6, <=sles11.3 yaboot ppc64 >=rhels7, >=sles11.4 grub2,grub2-http,grub2-tftp ppc64le NonVirtualize ALL petitboot ppc64le PowerKVM Guest ALL grub2,grub2-http,grub2-tftp + aarch64 >=el8 grub2 diff --git a/docs/source/guides/admin-guides/references/man7/node.7.rst b/docs/source/guides/admin-guides/references/man7/node.7.rst index 48ca38dc1..163702384 100644 --- a/docs/source/guides/admin-guides/references/man7/node.7.rst +++ b/docs/source/guides/admin-guides/references/man7/node.7.rst @@ -59,7 +59,7 @@ node Attributes: \ **arch**\ (nodetype.arch) - The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64. + The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64, aarch64. @@ -591,11 +591,12 @@ node Attributes: .. code-block:: perl Arch OS valid netboot options - x86, x86_64 ALL pxe, xnba + x86, x86_64 ALL pxe, xnba, grub2 ppc64 <=rhel6, <=sles11.3 yaboot ppc64 >=rhels7, >=sles11.4 grub2,grub2-http,grub2-tftp ppc64le NonVirtualize ALL petitboot ppc64le PowerKVM Guest ALL grub2,grub2-http,grub2-tftp + aarch64 >=el8 grub2 diff --git a/docs/source/guides/admin-guides/references/man7/osimage.7.rst b/docs/source/guides/admin-guides/references/man7/osimage.7.rst index cf2767a56..ad59cdcab 100644 --- a/docs/source/guides/admin-guides/references/man7/osimage.7.rst +++ b/docs/source/guides/admin-guides/references/man7/osimage.7.rst @@ -225,7 +225,7 @@ osimage Attributes: \ **osarch**\ (osimage.osarch) - The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64. + The hardware architecture of this node. For netboot/statelite images, QEMU emulation for non-native architectures is used if qemu-user-static is installed and configured via systemd-binfmt. Valid values: x86_64, ppc64, x86, ia64, aarch64. diff --git a/docs/source/guides/install-guides/yum/grub2.rst b/docs/source/guides/install-guides/yum/grub2.rst new file mode 100644 index 000000000..ff0b498a3 --- /dev/null +++ b/docs/source/guides/install-guides/yum/grub2.rst @@ -0,0 +1,17 @@ +grub2 support for x86_64 and aarch64 +==================================== + +xCAT 2.17 enables grub2 boot support for x86_64 and aarch64 but does not ship the necessary grub2 binaries for both architectures. +If you want to use grub2 for x86_64 or aarch64 you need to download the binaries from some EL OS repository. + +#. Download files from an BaseOS EL repository mirror + + For EL these files are named ``grubx64.efi`` (x86_64) and ``grubaa64.efi`` (aarch64) and usually in ``BaseOS//os/EFI/BOOT``. + For very recent hardware you might need to use a newer grub version. Therefore, it's recommended to use a binary from the latest operationg system release available. + You can use Red Hat Enterprise Linux, AlmaLinux, Rocky Linux or even Fedora repositories to download the grub files. + +#. Copy downloaded files to ``/tftpboot/boot/grub2``: + + * x86_64: ``/tftpboot/boot/grub2/grub2.aarch64`` + * aarch64: ``/tftpboot/boot/grub2/grub2.x86_64`` + diff --git a/docs/source/guides/install-guides/yum/install.rst b/docs/source/guides/install-guides/yum/install.rst index 0396dd0ba..f29815ecc 100644 --- a/docs/source/guides/install-guides/yum/install.rst +++ b/docs/source/guides/install-guides/yum/install.rst @@ -10,3 +10,4 @@ Installing xCAT automatic_install.rst manual_install.rst + grub2.rst diff --git a/docs/source/overview/differentiators.rst b/docs/source/overview/differentiators.rst index 10b27dcc9..2f4fe5e49 100644 --- a/docs/source/overview/differentiators.rst +++ b/docs/source/overview/differentiators.rst @@ -16,7 +16,7 @@ Differentiators * Support Multiple Hardware - IBM Power, IBM Power LE, x86_64 + IBM Power, IBM Power LE, x86_64, aarch64 (alpha support) * Support Multiple Virtualization Infrastructures diff --git a/docs/source/overview/support_matrix.rst b/docs/source/overview/support_matrix.rst index 7e526c614..d458c6167 100644 --- a/docs/source/overview/support_matrix.rst +++ b/docs/source/overview/support_matrix.rst @@ -1,22 +1,22 @@ Operating System & Hardware Support Matrix ========================================== -+-------+-------+-------+-----+-------+--------+--------+--------+ -| | Power | Power | zVM | Power | x86_64 | x86_64 | x86_64 | -| | | LE | | KVM | | KVM | Esxi | -+=======+=======+=======+=====+=======+========+========+========+ -|RHEL | yes | yes | yes | yes | yes | yes | yes | -| | | | | | | | | -+-------+-------+-------+-----+-------+--------+--------+--------+ -|SLES | yes | yes | yes | yes | yes | yes | yes | -| | | | | | | | | -+-------+-------+-------+-----+-------+--------+--------+--------+ -|Ubuntu | no | yes | no | yes | yes | yes | yes | -| | | | | | | | | -+-------+-------+-------+-----+-------+--------+--------+--------+ -|CentOS | no | no | no | no | yes | yes | yes | -| | | | | | | | | -+-------+-------+-------+-----+-------+--------+--------+--------+ -|Windows| no | no | no | no | yes | yes | yes | -| | | | | | | | | -+-------+-------+-------+-----+-------+--------+--------+--------+ ++-------+-------+-------+-----+-------+--------+--------+--------+----------+ +| | Power | Power | zVM | Power | x86_64 | x86_64 | x86_64 | aarch64 | +| | | LE | | KVM | | KVM | Esxi | | ++=======+=======+=======+=====+=======+========+========+========+==========+ +|RHEL | yes | yes | yes | yes | yes | yes | yes | yes | +| | | | | | | | | | ++-------+-------+-------+-----+-------+--------+--------+--------+----------+ +|SLES | yes | yes | yes | yes | yes | yes | yes | no | +| | | | | | | | | | ++-------+-------+-------+-----+-------+--------+--------+--------+----------+ +|Ubuntu | no | yes | no | yes | yes | yes | yes | no | +| | | | | | | | | | ++-------+-------+-------+-----+-------+--------+--------+--------+----------+ +|CentOS | no | no | no | no | yes | yes | yes | no | +| | | | | | | | | | ++-------+-------+-------+-----+-------+--------+--------+--------+----------+ +|Windows| no | no | no | no | yes | yes | yes | no | +| | | | | | | | | | ++-------+-------+-------+-----+-------+--------+--------+--------+----------+ diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 9a46920d8..69c36e5cb 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -678,11 +678,12 @@ passed as argument rather than by table value', netboot => 'The type of network booting to use for this node. Valid values: Arch OS valid netboot options - x86, x86_64 ALL pxe, xnba + x86, x86_64 ALL pxe, xnba, grub2 ppc64 <=rhel6, <=sles11.3 yaboot ppc64 >=rhels7, >=sles11.4 grub2,grub2-http,grub2-tftp ppc64le NonVirtualize ALL petitboot ppc64le PowerKVM Guest ALL grub2,grub2-http,grub2-tftp + aarch64 >=el8 grub2 ', tftpserver => 'The TFTP server for this node (as known by this node). If not set, it defaults to networks.tftpserver.', @@ -757,7 +758,7 @@ passed as argument rather than by table value', descriptions => { node => 'The node name or group name.', os => 'The operating system deployed on this node. Valid values: AIX, rhels*,rhelc*, rhas*,centos*, alma*, rocky*,SL*, fedora*, sles* (where * is the version #). As a special case, if this is set to "boottarget", then it will use the initrd/kernel/parameters specified in the row in the boottarget table in which boottarget.bprofile equals nodetype.profile.', - arch => 'The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64.', + arch => 'The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64, aarch64.', profile => 'The string to use to locate a kickstart or autoyast template to use for OS deployment of this node. If the provmethod attribute is set to an osimage name, that takes precedence, and profile need not be defined. Otherwise, the os, profile, and arch are used to search for the files in /install/custom first, and then in /opt/xcat/share/xcat.', provmethod => 'The provisioning method for node deployment. The valid values are install, netboot, statelite or an os image name from the osimage table. If an image name is specified, the osimage definition stored in the osimage table and the linuximage table (for Linux) or nimimage table (for AIX) are used to locate the files for templates, pkglists, syncfiles, etc. On Linux, if install, netboot or statelite is specified, the os, profile, and arch are used to search for the files in /install/custom first, and then in /opt/xcat/share/xcat.', supportedarchs => 'Comma delimited list of architectures this node can execute.', @@ -800,7 +801,7 @@ passed as argument rather than by table value', profile => 'The node usage category. For example compute, service.', osname => 'Operating system name- AIX or Linux.', osvers => 'The Linux operating system deployed on this node. Valid values: rhels*,rhelc*, rhas*,centos*,alma*, rocky*,SL*, fedora*, sles* (where * is the version #).', - osarch => 'The hardware architecture of this node. Valid values: x86_64, ppc64, x86, ia64.', + osarch => 'The hardware architecture of this node. For netboot/statelite images, QEMU emulation for non-native architectures is used if qemu-user-static is installed and configured via systemd-binfmt. Valid values: x86_64, ppc64, x86, ia64, aarch64.', synclists => 'The fully qualified name of a file containing a list of files to synchronize on the nodes. Can be a comma separated list of multiple synclist files. The synclist generated by PCM named /install/osimages//synclist.cfm is reserved for use only by PCM and should not be edited by the admin.', postscripts => 'Comma separated list of scripts that should be run on this image after diskful installation or diskless boot. For installation of RedHat, CentOS, Fedora, the scripts will be run before the reboot. For installation of SLES, the scripts will be run after the reboot but before the init.d process. For diskless deployment, the scripts will be run at the init.d time, and xCAT will automatically add the list of scripts from the postbootscripts attribute to run after postscripts list. For installation of AIX, the scripts will run after the reboot and acts the same as the postbootscripts attribute. For AIX, use the postbootscripts attribute. See the site table runbootscripts attribute.', postbootscripts => 'Comma separated list of scripts that should be run on this after diskful installation or diskless boot. On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list. See the site table runbootscripts attribute.', diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index bb3827a16..2c510bda9 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -4828,7 +4828,7 @@ sub lookupNetboot { $ret = "nimol"; } elsif ($imgtype =~ /^Linux$/i) { if ($osarch =~ /^x86_64$/i) { - $ret = "xnba,pxe"; + $ret = "xnba,pxe,grub2"; } elsif ($osarch =~ /^ppc64$/i) { if (($osv =~ /rh/i and $osn < 7) or ($osv =~ /sles/i and ($osn < 11 or ($osn == 11 and $osm < 4)))) { $ret = "yaboot"; @@ -4839,6 +4839,8 @@ sub lookupNetboot { } } elsif ($osarch =~ /^ppc64le$/i or $osarch =~ /^ppc64el$/i) { $ret = "petitboot,grub2,grub2-tftp,grub2-http"; + } elsif ($osarch =~ /^aarch64$/i) { + $ret = "grub2"; } } return $ret; diff --git a/xCAT-client/pods/man1/genimage.1.pod b/xCAT-client/pods/man1/genimage.1.pod index 8145a637e..60d9c78be 100644 --- a/xCAT-client/pods/man1/genimage.1.pod +++ b/xCAT-client/pods/man1/genimage.1.pod @@ -32,7 +32,9 @@ Besides prompting for some parameter values, the B command takes defau If B<--onlyinitrd> is specified, genimage only regenerates the initrd for a stateless image to be used for a diskless install. -The B command must be run on a system that is the same architecture and same distro with same major release version as the nodes it will be used on. If the management node is not the same architecture or same distro level, copy the contents of +The B command must be run on a system that is the same architecture and same distro with same major release version as the nodes it will be used on. +For different architectures, B will try to use QEMU emulation if qemu-user-static is installed and configured via systemd-binfmt. +If this does not work or the management node is not the same distro level, copy the contents of /opt/xcat/share/xcat/netboot/ to a system that is the proper architecture, and mount /install from the management node to that system. Then change directory to /opt/xcat/share/xcat/netboot/ and run ./genimage. @@ -48,7 +50,7 @@ I specifies the name of an os image definition to be used. The specif =item B<-a> I -The hardware architecture of this node: ppc64le, x86_64, ppc64, x86, ia64, etc. If omitted, the current hardware architecture will be used. +The hardware architecture of this node: ppc64le, x86_64, ppc64, x86, ia64, aarch64 etc. If omitted, the current hardware architecture will be used. =item B<-o> I diff --git a/xCAT-genesis-builder/xCAT-genesis-base.spec b/xCAT-genesis-builder/xCAT-genesis-base.spec index 03b66047b..54f157017 100644 --- a/xCAT-genesis-builder/xCAT-genesis-base.spec +++ b/xCAT-genesis-builder/xCAT-genesis-base.spec @@ -10,6 +10,9 @@ Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")} %ifarch ppc ppc64 ppc64le %define tarch ppc64 %endif +%ifarch aarch64 +%define tarch aarch64 +%endif BuildArch: noarch %define name xCAT-genesis-base-%{tarch} %define __spec_install_post : diff --git a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec index 48edf3267..a0384f6f2 100644 --- a/xCAT-genesis-scripts/xCAT-genesis-scripts.spec +++ b/xCAT-genesis-scripts/xCAT-genesis-scripts.spec @@ -7,6 +7,9 @@ %ifarch ppc ppc64 %define tarch ppc64 %endif +%ifarch aarch64 +%define tarch aarch64 +%endif %define rpminstallroot /opt/xcat/share/xcat/netboot/genesis/%{tarch}/fs BuildArch: noarch %define name xCAT-genesis-scripts-%{tarch} diff --git a/xCAT-server/lib/xcat/plugins/anaconda.pm b/xCAT-server/lib/xcat/plugins/anaconda.pm index 541cec729..542c4e75a 100644 --- a/xCAT-server/lib/xcat/plugins/anaconda.pm +++ b/xCAT-server/lib/xcat/plugins/anaconda.pm @@ -1225,7 +1225,7 @@ sub mkinstall if ( ( - $arch =~ /x86/ and + ( $arch =~ /x86/ or $arch =~ /aarch64/ ) and ( -r "$pkgdir/images/pxeboot/vmlinuz" and $kernpath = "$pkgdir/images/pxeboot/vmlinuz" @@ -2685,7 +2685,7 @@ sub insert_dd { # and copy it to the /tftpboot my @new_kernels = <$dd_dir/rpm/boot/vmlinuz*>; foreach my $new_kernel (@new_kernels) { - if (-r $new_kernel && $new_kernel =~ /\/vmlinuz-(.*(x86_64|ppc64|el\d+|ppc64le))$/) { + if (-r $new_kernel && $new_kernel =~ /\/vmlinuz-(.*(x86_64|ppc64|el\d+|ppc64le|aarch64))$/) { $new_kernel_ver = $1; $cmd = "/bin/mv -f $new_kernel $kernelpath"; xCAT::Utils->runcmd($cmd, -1); diff --git a/xCAT-server/lib/xcat/plugins/dhcp.pm b/xCAT-server/lib/xcat/plugins/dhcp.pm index 17a116b78..05dd98d9e 100644 --- a/xCAT-server/lib/xcat/plugins/dhcp.pm +++ b/xCAT-server/lib/xcat/plugins/dhcp.pm @@ -2740,6 +2740,9 @@ sub addnet push @netent, " } else if option client-architecture = 00:02 { #ia64\n "; push @netent, " filename \"elilo.efi\";\n"; + push @netent, + " } else if option client-architecture = 00:0b { #aaarch64\n "; + push @netent, " filename \"boot/grub2/grub2.aarch64\";\n"; push @netent, " } else if option client-architecture = 00:0e { #OPAL-v3\n "; push @netent, " option conf-file = \"http://$tftp:$httpport/tftpboot/pxelinux.cfg/p/" . $net . "_" . $maskbits . "\";\n"; diff --git a/xCAT-server/lib/xcat/plugins/grub2.pm b/xCAT-server/lib/xcat/plugins/grub2.pm index b1e5becdc..cbe57965c 100644 --- a/xCAT-server/lib/xcat/plugins/grub2.pm +++ b/xCAT-server/lib/xcat/plugins/grub2.pm @@ -254,14 +254,19 @@ sub setstate { $protocolrootdir = $tftpdir; } + my $efi = ""; + if ($nodearch =~ /x86/i) { + $efi = "efi"; + } + if ($kern and $kern->{kcmdline}) { - print $pcfg " linux $protocolrootdir/$kern->{kernel} $kern->{kcmdline}\n"; + print $pcfg " linux$efi $protocolrootdir/$kern->{kernel} $kern->{kcmdline} BOOTIF=\$net_default_mac\n"; } else { - print $pcfg " linux $protocolrootdir/$kern->{kernel}\n"; + print $pcfg " linux$efi $protocolrootdir/$kern->{kernel} BOOTIF=\$net_default_mac\n"; } print $pcfg " echo Loading initial ramdisk ...\n"; if ($kern and $kern->{initrd}) { - print $pcfg " initrd $protocolrootdir/$kern->{initrd}\n"; + print $pcfg " initrd$efi $protocolrootdir/$kern->{initrd}\n"; } print $pcfg "}"; diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 166a38247..6063bba3d 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -277,6 +277,8 @@ if ($netdriver) { # Add the default driver list if ($arch eq 'x86' or $arch eq 'x86_64') { push @ndrivers, qw/tg3 bnx2 bnx2x e1000 e1000e igb mlx_en virtio_net be2net/; +} elsif ($arch eq 'aarch64') { + push @ndrivers, qw/tg3 bnx2 bnx2x e1000e igb mlx_en virtio_net/; } elsif ($arch eq 'ppc64') { push @ndrivers, qw/e1000 e1000e igb ibmveth ehea/; } elsif ($arch eq 's390x') { @@ -330,8 +332,20 @@ if($onlyinitrd){ open($yumconfig, ">", "/tmp/genimage.$$.yum.conf"); #yum/rpm/zypper has defect on calculating diskspace usage when installing rpm on a NFS mounted installroot + my $main_section = 0; if (isNFSdir("$rootimg_dir")) { print $yumconfig "[main]\ndiskspacecheck=0\n\n"; + $main_section = 1; + } + + # try to force non-native arch and use qemu-user-static if available + my $host_arch = `uname -m`; + chomp($host_arch); + $host_arch = "x86" if ($arch =~ /i.86$/); + if ($host_arch ne $arch) { + print $yumconfig "[main]\n" unless ($main_section); + print $yumconfig "arch=$arch\nignorearch=True\n\n"; + $main_section = 1; } my $repnum = 0; @@ -1843,7 +1857,7 @@ EOMS } } - if ($arch =~ /x86_64/) { + if ($arch =~ /x86_64/ or $arch =~ /aarch64/) { push @filestoadd, "lib64/libnss_dns.so.2"; push @filestoadd, "lib64/libresolv.so.2"; } else {