Skip to content

Commit

Permalink
[Linux] Add variables for installing FusionOS with static IP address (#…
Browse files Browse the repository at this point in the history
…531)

Signed-off-by: Qi Zhang <[email protected]>
  • Loading branch information
keirazhang authored Jan 11, 2024
1 parent f5ef47d commit b69332c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
8 changes: 6 additions & 2 deletions autoinstall/FusionOS/server_with_GUI/ks.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ keyboard --xlayouts='us'
lang en_US.UTF-8

# Network information
network --bootproto=dhcp --onboot=yes --ipv6=auto --activate
network --hostname=localhost.localdomain
{% if ethernet0_ipv4_addr | default('') and ethernet0_gateway | default('') and ethernet0_netmask | default('') %}
network --bootproto=static --onboot=yes --ip={{ ethernet0_ipv4_addr }} --gateway={{ ethernet0_gateway }} --netmask={{ ethernet0_netmask }} --nameserver={{ ethernet0_nameservers | default('') }} --ipv6=auto --activate
{% else %}
network --bootproto=dhcp --onboot=yes --ipv6=auto --activate
{% endif %}
network --hostname=localhost.localdomain

# Use CDROM installation media
cdrom
Expand Down
8 changes: 6 additions & 2 deletions autoinstall/FusionOS/server_without_GUI/ks.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ keyboard --xlayouts='us'
lang en_US.UTF-8

# Network information
network --bootproto=dhcp --ipv6=auto --activate
network --hostname=localhost.localdomain
{% if ethernet0_ipv4_addr | default('') and ethernet0_gateway | default('') and ethernet0_netmask | default('') %}
network --bootproto=static --onboot=yes --ip={{ ethernet0_ipv4_addr }} --gateway={{ ethernet0_gateway }} --netmask={{ ethernet0_netmask }} --nameserver={{ ethernet0_nameservers | default('') }} --ipv6=auto --activate
{% else %}
network --bootproto=dhcp --onboot=yes --ipv6=auto --activate
{% endif %}
network --hostname=localhost.localdomain

# Use CDROM installation media
cdrom
Expand Down
11 changes: 11 additions & 0 deletions vars/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,14 @@ flatcar_python3_download_url: "https://downloads.activestate.com/ActivePython/re
# server in VM to get packages.
#
# http_proxy_vm: "http://myproxy.company.com:8080"

# FusionOS:
# By default, VM's IPv4 address is assigned by DHCP server. To install FusionOS
# with static IP, set 'ethernet0_ipv4_addr', 'ethernet0_gateway' and 'ethernet0_netmask'
# with static IPv4 address, gateway, and netmask. 'ethernet0_nameservers' can be set
# with DNS nameservers separated by comma or leave it empty.
#
# ethernet0_ipv4_addr: 192.168.1.10
# ethernet0_gateway: 192.168.1.1
# ethernet0_netmask: 255.255.255.0
# ethernet0_nameservers: 192.168.1.1,192.168.1.2

0 comments on commit b69332c

Please sign in to comment.