Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for FusionOS 22 and 23 #514

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 28 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,33 +65,34 @@ This project supports below scenarios for end-to-end guest operating system vali

### Compatible Guest Operating Systems

| Guest Operating Systems | Automatic Install from ISO Image | Deploy from OVA Template | Existing VM with Guest Operating System Installed |
|:----------------------------------------------| :------------------------------: | :----------------------: | :--------------------------------: |
| Red Hat Enterprise Linux 7.x, 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| CentOS 7.x, 8.x | :heavy_check_mark: | | :heavy_check_mark: |
| Oracle Linux 7.x, 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| Rocky Linux 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| AlmaLinux 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| SUSE Linux Enterprise 15 SP3 and later | :heavy_check_mark: | | :heavy_check_mark: |
| SUSE Linux Enterprise 12 SP5, 15 SP0/SP1/SP2 | | | :heavy_check_mark: |
| VMware Photon OS 3.0, 4.0, 5.0 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Ubuntu 18.04 live-server | :heavy_check_mark: | | :heavy_check_mark: |
| Ubuntu 18.04 desktop | | | :heavy_check_mark: |
| Ubuntu 20.04 and later | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Flatcar 2592.0.0 and later | | :heavy_check_mark: | :heavy_check_mark: |
| Debian 10.10 and later, 11.x, 12.x | :heavy_check_mark: | | :heavy_check_mark: |
| Debian 9.x, 10.9 and earlier | | | :heavy_check_mark: |
| Windows 10, 11 | :heavy_check_mark: | | :heavy_check_mark: |
| Windows Server 2019, 2022 | :heavy_check_mark: | | :heavy_check_mark: |
| UnionTech OS Server 20 1050a | :heavy_check_mark: | | :heavy_check_mark: |
| Fedora Server 36 and later | :heavy_check_mark: | | :heavy_check_mark: |
| ProLinux Server 7.9, 8.5 | :heavy_check_mark: | | :heavy_check_mark: |
| FreeBSD 13 and later | :heavy_check_mark: | | :heavy_check_mark: |
| Pardus 21.2 Server,XFCE Desktop and later | :heavy_check_mark: | | :heavy_check_mark: |
| openSUSE Leap 15.3 and later | :heavy_check_mark: | | :heavy_check_mark: |
| BCLinux 8.x | :heavy_check_mark: | | :heavy_check_mark: |
| BCLinux-for-Euler 21.10 | :heavy_check_mark: | | :heavy_check_mark: |
| Red Hat Enterprise Linux CoreOS (RHCOS) 4.13 and later | | :heavy_check_mark: | :heavy_check_mark: |
| Guest Operating Systems | Automatic Install from ISO Image | Deploy from OVA Template | Existing VM with Guest Operating System Installed |
|:-------------------------------------------------------| :------------------------------: | :----------------------: | :--------------------------------: |
| Red Hat Enterprise Linux 7.x, 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| CentOS 7.x, 8.x | :heavy_check_mark: | | :heavy_check_mark: |
| Oracle Linux 7.x, 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| Rocky Linux 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| AlmaLinux 8.x, 9.x | :heavy_check_mark: | | :heavy_check_mark: |
| SUSE Linux Enterprise 15 SP3 and later | :heavy_check_mark: | | :heavy_check_mark: |
| SUSE Linux Enterprise 12 SP5, 15 SP0/SP1/SP2 | | | :heavy_check_mark: |
| VMware Photon OS 3.0, 4.0, 5.0 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Ubuntu 18.04 live-server | :heavy_check_mark: | | :heavy_check_mark: |
| Ubuntu 18.04 desktop | | | :heavy_check_mark: |
| Ubuntu 20.04 and later | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
| Flatcar 2592.0.0 and later | | :heavy_check_mark: | :heavy_check_mark: |
| Debian 10.10 and later, 11.x, 12.x | :heavy_check_mark: | | :heavy_check_mark: |
| Debian 9.x, 10.9 and earlier | | | :heavy_check_mark: |
| Windows 10, 11 | :heavy_check_mark: | | :heavy_check_mark: |
| Windows Server 2019, 2022 | :heavy_check_mark: | | :heavy_check_mark: |
| UnionTech OS Server 20 1050a | :heavy_check_mark: | | :heavy_check_mark: |
| Fedora Server 36 and later | :heavy_check_mark: | | :heavy_check_mark: |
| ProLinux Server 7.9, 8.5 | :heavy_check_mark: | | :heavy_check_mark: |
| FreeBSD 13 and later | :heavy_check_mark: | | :heavy_check_mark: |
| Pardus 21.2 Server,XFCE Desktop and later | :heavy_check_mark: | | :heavy_check_mark: |
| openSUSE Leap 15.3 and later | :heavy_check_mark: | | :heavy_check_mark: |
| BCLinux 8.x | :heavy_check_mark: | | :heavy_check_mark: |
| BCLinux-for-Euler 21.10 | :heavy_check_mark: | | :heavy_check_mark: |
| Red Hat Enterprise Linux CoreOS (RHCOS) 4.13 and later | | :heavy_check_mark: | :heavy_check_mark: |
| FusionOS 22 and 23 | :heavy_check_mark: | | :heavy_check_mark: |
linhuali marked this conversation as resolved.
Show resolved Hide resolved

**Notes**
This compatible guest operating systems list is used for this project only. For guest operating system support status on ESXi, please refer to [VMware Compatibility Guide](https://www.vmware.com/resources/compatibility/search.php?deviceCategory=software&testConfig=16).
Expand Down
96 changes: 96 additions & 0 deletions autoinstall/FusionOS/server_with_GUI/ks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#version=DEVEL
# Use graphical install
graphical

%packages
@^graphical-server-environment
kexec-tools
cloud-init
java-1.8.0-openjdk-headless
java-1.8.0-openjdk
ndctl
iproute
rdma-core
librdmacm-utils
libibverbs
libibverbs-utils
infiniband-diags
perftest
%end

# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network --bootproto=dhcp --onboot=yes --ipv6=auto --activate
network --hostname=localhost.localdomain

# Use CDROM installation media
cdrom
# SELinux configuration
selinux --disabled

# X Window System configuration information
xconfig --startxonboot
# Do not run the Setup Agent on first boot
firstboot --disable
# System services
services --enabled="chronyd"
services --disabled="firewalld"

ignoredisk --only-use={{ boot_disk_name }}
autopart
# Partition clearing information
clearpart --none --initlabel

# System timezone
timezone Asia/Shanghai --utc

# Shutdown when the install is finished.
shutdown

# Root password
rootpw --iscrypted {{ vm_password_hash }}
# Add SSH key
sshkey --username=root "{{ ssh_public_key }}"

{% if new_user is defined and new_user != 'root' %}
user --name={{ new_user }} --password={{ vm_password_hash }} --groups=root,wheel --iscrypted --gecos="{{ new_user }}"
sshkey --username={{ new_user }} "{{ ssh_public_key }}"
{% endif %}

%addon com_redhat_kdump --disable --reserve-mb='128'

%end

%anaconda
pwpolicy root --minlen=8 --minquality=1 --strict --nochanges --notempty
pwpolicy user --minlen=8 --minquality=1 --strict --nochanges --emptyok
pwpolicy luks --minlen=8 --minquality=1 --strict --nochanges --notempty
%end

%post --interpreter=/usr/bin/bash --log=/root/ks-post.log
if [ -f /etc/cloud/cloud.cfg ]; then
sed -i 's/^disable_root:.*/disable_root: false/' /etc/cloud/cloud.cfg
sed -i 's/^ssh_pwauth:.*/ssh_pwauth: yes/' /etc/cloud/cloud.cfg
fi

# Permit root login via SSH
sed -i 's/^PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config

# Workaround for setting guest_os_family as RHEL
if [ -f /etc/FusionOS-release ] && [ ! -f /etc/redhat-release ]; then
ln -s /etc/FusionOS-release /etc/redhat-release
fi

{% if new_user is defined and new_user != 'root' %}
# Add new user to sudoer
echo '{{ new_user }} ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/{{ new_user }}
# Enable autologin
sed -i '/\[daemon\]/a AutomaticLogin={{ new_user }}' /etc/gdm/custom.conf
sed -i '/\[daemon\]/a AutomaticLoginEnable=True' /etc/gdm/custom.conf
{% endif %}
echo '{{ autoinstall_complete_msg }}' >/dev/ttyS0
%end
91 changes: 91 additions & 0 deletions autoinstall/FusionOS/server_without_GUI/ks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
#version=DEVEL
# Use graphical install
graphical

%packages
@^server-product-environment
kexec-tools
#open-vm-tools-desktop
cloud-init
java-1.8.0-openjdk-headless
java-1.8.0-openjdk
ndctl
iproute
rdma-core
librdmacm-utils
libibverbs
libibverbs-utils
infiniband-diags
perftest
%end

# Keyboard layouts
keyboard --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network --bootproto=dhcp --ipv6=auto --activate
network --hostname=localhost.localdomain

# Use CDROM installation media
cdrom
# SELinux configuration
selinux --disabled

# X Window System configuration information
xconfig --startxonboot
# Do not run the Setup Agent on first boot
firstboot --disable
# System services
services --enabled="chronyd"
services --disabled="firewalld"

ignoredisk --only-use={{ boot_disk_name }}
autopart
# Partition clearing information
clearpart --none --initlabel

# System timezone
timezone Asia/Shanghai --utc

# Shutdown when the install is finished.
shutdown

# Root password
rootpw --iscrypted {{ vm_password_hash }}
# Add SSH key
sshkey --username=root "{{ ssh_public_key }}"

{% if new_user is defined and new_user != 'root' %}
user --name={{ new_user }} --password={{ vm_password_hash }} --groups=root,wheel --iscrypted --gecos="{{ new_user }}"
sshkey --username={{ new_user }} "{{ ssh_public_key }}"
{% endif %}

%addon com_redhat_kdump --disable --reserve-mb='128'

%end

%post --interpreter=/usr/bin/bash --log=/root/ks-post.log
if [ -f /etc/cloud/cloud.cfg ]; then
sed -i 's/^disable_root:.*/disable_root: false/' /etc/cloud/cloud.cfg
sed -i 's/^ssh_pwauth:.*/ssh_pwauth: yes/' /etc/cloud/cloud.cfg
fi

# Permit root login via SSH
sed -i 's/^PermitRootLogin .*/PermitRootLogin yes/' /etc/ssh/sshd_config

# Workaround for setting guest_os_family as RHEL
if [ -f /etc/FusionOS-release ] && [ ! -f /etc/redhat-release ]; then
ln -s /etc/FusionOS-release /etc/redhat-release
fi

{% if new_user is defined and new_user != 'root' %}
# Add new user to sudoer
echo '{{ new_user }} ALL=(ALL) NOPASSWD:ALL' >/etc/sudoers.d/{{ new_user }}
# Enable autologin
sed -i '/\[daemon\]/a AutomaticLogin={{ new_user }}' /etc/gdm/custom.conf
sed -i '/\[daemon\]/a AutomaticLoginEnable=True' /etc/gdm/custom.conf
{% endif %}
echo '{{ autoinstall_complete_msg }}' >/dev/ttyS0
%end
linhuali marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions autoinstall/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
22. For openSUSE Leap 15.3 or later unattend auto-install, please use file openSUSE/15/autoinst.xml.
23. For BCLinux 8.x unattend auto-install, please use file BCLinux/8/ks.cfg.
24. For BCLinux-for-Euler 21.10 unattend auto-install, please use file BCLinux-for-Euler/21.10/ks.cfg.
25. For FusionOS 22 unattend auto-install, please use files under Fusion.
26. For FusionOS 23 unattend auto-install, please use file Fusion/server_without_GUI/ks.cfg.

# Notes
## For Windows
Expand Down
3 changes: 2 additions & 1 deletion linux/deploy_vm/deploy_vm_from_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
- (('RHEL' in unattend_install_conf) or
('CentOS' in unattend_install_conf) or
('Fedora' in unattend_install_conf) or
('FusionOS' in unattend_install_conf) or
('BCLinux' in unattend_install_conf))

# For UnionTech OS, send key to boot screen
Expand Down Expand Up @@ -249,7 +250,7 @@
vm_get_fullname_timeout: 600
when:
- unattend_install_conf is defined
- unattend_install_conf | lower is not match('.*(minimal|server_without_gui|bclinux-for-euler).*')
- unattend_install_conf | lower is not match('.*(minimal|server_without_gui|bclinux-for-euler|fusionos).*')
linhuali marked this conversation as resolved.
Show resolved Hide resolved

- name: "Get VM guest IPv4 address and add to in-memory inventory"
include_tasks: ../../common/update_inventory.yml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
(guest_os_ansible_distribution == "Rocky" and
guest_os_ansible_distribution_ver is version('8.4', '<=')) or
guest_os_ansible_distribution is match('Pardus.*') or
(guest_os_ansible_distribution in ["Astra Linux (Orel)", "ProLinux", "UnionTech", "Uos", "FreeBSD", "BigCloud"])
(guest_os_ansible_distribution in ["Astra Linux (Orel)", "ProLinux", "UnionTech", "Uos", "FreeBSD", "BigCloud", "FusionOS"])

- name: "Skip test case for OS version which has vulnerable bootloaders"
block:
Expand Down