Skip to content

Preparing Hosts for Cockpit ​

Do this on every host after AwaniOS is installed and before you deploy the Cockpit appliance. You build the host network of the network design, make it survive a reboot, and prepare the settings Cockpit needs to register the host.

The values below are the example values of the network design for the first host (vapor-01). Use your own values from the planning worksheet, and repeat this page on every host.


1. Verify the Installation ​

  1. On the console dashboard Services tab (4), confirm that vapor, libvirtd and openvswitch-switch are active (running).
  2. From the admin workstation, open https://<host-ip>:7770, accept the self-signed certificate and sign in as awanio. The Vapor dashboard opens; a System is unlicensed banner is expected at this stage.
  3. Set up key-only SSH login if you did not give a key in the installer.

2. Order of Operations ​

The order matters: build everything that does not touch the management address first, then move management onto the bond from the console, then finish and prove that the result survives a reboot.

StepWhereRisk to connectivity
Build the fabric bridges awbr1 and awbr2Vapor web UINone — NIC 3 and NIC 4 are unused
Move management to awbr0 / bond0 / mgmt0Server consoleHigh — the old address is removed
Add the NFS and cluster vPortsVapor web UINone
Make the bond reboot-safe and test a rebootConsoleLow
Create the infrastructure networksVapor web UINone
VerifyShellNone

3. Build the Fabric Bridges ​

Sign in to Vapor and open Network › Virtual Switch. The page has three tabs: Bridges, vPorts and Topology. A freshly installed host has no VS bridges yet; if the page reports an error instead of an empty list, check that openvswitch-switch is running.

Bridge awbr1 (fabric A) ​

  1. Click Create VS Bridge. Name awbr1, Fail Mode standalone, STP and RSTP off. Create.

  2. Under vPorts, click Create vPort for the uplink:

    FieldValue
    VS Bridgeawbr1
    vPort Typesystem
    Interfaceseno3 (the vPort takes the interface name)
    VLAN Modetrunk
    Trunks243,246 — leave Tag empty
    MTU Request9000 (or empty for 1500)
    Remove IP addressesLeave ticked
  3. Create the internal vPort for iSCSI path A:

    FieldValue
    VS Bridgeawbr1
    vPort Typeinternal
    vPort Nameiscsia0
    VLAN Mode / Tagaccess / 243
    Service Tagsstorage
    MTU Request9000
  4. Create the internal vPort migr0 on awbr1: access, Tag 246, Service Tags migration, MTU Request 9000.

Bridge awbr2 (fabric B) ​

  1. Create VS Bridge awbr2 (standalone, STP/RSTP off).

  2. Create the system vPort eno4 on awbr2: trunk, Trunks 244,247,248, MTU Request 9000.

  3. Create the internal vPorts on awbr2:

    vPort NameVLAN ModeTagService TagsMTU Request
    iscsib0access244storage9000
    repl0access247replicationempty (1500)
    bkup0access248backup9000

Assign the addresses ​

Open Network › Host Network › Interfaces, select each new internal vPort and use Add IP. Enter the address and the prefix length in Netmask (CIDR). Leave Gateway empty on every one of them — only mgmt0 has a gateway.

For vapor-01: iscsia0 192.168.243.11/24, migr0 192.168.246.11/24, iscsib0 192.168.244.11/24, repl0 192.168.247.11/24, bkup0 192.168.248.11/24.

Replication to a DR site

If replication traffic must reach a DR site through a router on the replication VLAN, the host needs a route to the remote replication subnet through that router rather than its default gateway. Plan this with the disaster recovery design; it is not needed for a single site.


4. Move Management onto the Bond ​

The management address currently lives on NIC 1. Turning NIC 1 into a bond member removes that address, so a browser session would drop in the middle of the change. Vapor protects you: from the web UI it refuses to remove the address a request arrived on. Do this step from the server console (BMC remote console or a local screen), where the network does not matter.

Data or connectivity loss

Do not perform this step over SSH or the Vapor web UI. Have the BMC console open and know how to reach the host if the address does not come back (see Troubleshooting).

  1. On the console, sign in to the dashboard as awanio and press 5 for the Terminal tab.

  2. Set the values for this host. Every command below reads them, so you only edit this block:

    bash
    VAPOR=https://127.0.0.1:7770/api/v1
    NIC1=eno1                 # bond member 1 (ToR A)
    NIC2=eno2                 # bond member 2 (ToR B)
    MGMT_VLAN=241
    MGMT_IP=192.168.241.11    # this host's management address
    MGMT_PREFIX=24
    GATEWAY=192.168.241.1
    # Every VLAN the bond will carry: management, NFS, cluster, Cockpit HA,
    # Virtual Network and all VM VLANs this host will ever need.
    TRUNKS='[241,242,245,249,250,100,101,102,103,104,105]'
  3. Authenticate to the local Vapor API. The commands call Vapor on the loopback address, which works regardless of the network state. The password is passed on standard input and the token is kept in a private file, so neither appears in the process list:

    bash
    read -rsp "awanio password: " PW; echo
    TOKEN=$(printf '{"username":"awanio","auth_type":"password","password":"%s"}' "$PW" \
      | curl -sk -X POST "$VAPOR/auth/login" -H 'Content-Type: application/json' --data @- \
      | sed -n 's/.*"token" *: *"\([^"]*\)".*/\1/p')
    unset PW
    HDR=$(mktemp)
    printf 'Authorization: Bearer %s\nContent-Type: application/json\n' "$TOKEN" > "$HDR"
    api() { curl -sk -H @"$HDR" "$@"; }
    [ -n "$TOKEN" ] && echo "authenticated" || echo "LOGIN FAILED"

    Continue only when it prints authenticated. On LOGIN FAILED, check the password and run the block again.

    If your password contains " or \, escape it with a backslash, or temporarily change it to one without.

  4. Create the front-end bridge, the bond, the management vPort and its address:

    bash
    # Front-end bridge
    api -X POST "$VAPOR/network/ovs/bridge" -d '{"name":"awbr0","fail_mode":"standalone"}'
    
    # bond0 from NIC 1 + NIC 2: management VLAN untagged, the other VLANs tagged.
    # This removes the management address from NIC 1: the host is unreachable
    # until the address is added to mgmt0 below.
    api -X POST "$VAPOR/network/ovs/port" --data @- <<EOF
    {"bridge":"awbr0","name":"bond0","interfaces":["$NIC1","$NIC2"],
     "bond_mode":"active-backup","lacp":"off",
     "vlan_mode":"native-untagged","tag":$MGMT_VLAN,
     "trunks":$TRUNKS,"flush_addresses":true}
    EOF
    
    # Management vPort in the management VLAN, tagged "management"
    api -X POST "$VAPOR/network/ovs/port" --data @- <<EOF
    {"bridge":"awbr0","name":"mgmt0","type":"internal",
     "vlan_mode":"access","tag":$MGMT_VLAN,"service_tags":["management"]}
    EOF
    
    # Management address and default gateway on mgmt0
    api -X POST "$VAPOR/network/interfaces/mgmt0/address" --data @- <<EOF
    {"address":"$MGMT_IP","netmask":$MGMT_PREFIX,"gateway":"$GATEWAY"}
    EOF
    
    rm -f "$HDR"
  5. Check the result:

    bash
    ip -br addr show mgmt0
    ping -c3 "$GATEWAY"

Each API call returns a JSON message such as {"status":"success", ...}. If a call returns an error, read the message, fix the value and repeat only that call (authenticate again first if you already removed the header file). You can change the VLAN list later from the web UI by editing bond0.

INFO

curl -k skips certificate verification. That is acceptable here only because the commands talk to Vapor on 127.0.0.1 on the same machine. In the Vapor web UI the same objects appear as a system vPort bond0 with two interfaces, Bond Mode active-backup, LACP off, VLAN Mode native-untagged, Tag 241, and an internal vPort mgmt0.

Restore name resolution if needed ​

The DNS servers entered in the installer were attached to NIC 1. Check that the host still resolves names:

bash
resolvectl status | grep -A2 'DNS Servers'
getent hosts <another-host-fqdn>

If no DNS server is listed, set it globally so it no longer depends on any one interface: edit /etc/systemd/resolved.conf, set DNS=<dns-server> and Domains=<your-domain> under [Resolve], then run sudo systemctl restart systemd-resolved.


5. Add the NFS and Cluster vPorts ​

The host is reachable again at its management address. Return to the Vapor web UI and, on awbr0, create two more internal vPorts, then add their addresses (no gateway):

vPort NameVLAN ModeTagService TagsAddress (vapor-01)
nfs0access242storage192.168.242.11/24
clus0access245shared-heartbeat192.168.245.11/24

6. Make the Bond Reboot-Safe ​

Vapor persists its network configuration in /etc/netplan/01-awanios.yaml; internal vPorts and their VLAN tags are additionally restored at boot by awanios-ovs-ports.service. For a bond, the member NICs still carry the address the installer configured, so they must be cleared in the file before the first reboot.

  1. Back up and open the file:
    bash
    sudo cp /etc/netplan/01-awanios.yaml /root/01-awanios.yaml.bak
    sudo nano /etc/netplan/01-awanios.yaml
  2. Under ethernets:, make the bond members address-less and mark the bond entry optional:
    yaml
    network:
      ethernets:
        eno1:
          dhcp4: false        # remove addresses:, routes:, nameservers: here
        eno2:
          dhcp4: false
        bond0:
          dhcp4: false
          optional: true
        # leave mgmt0, nfs0, iscsia0 ... entries as Vapor wrote them
  3. Validate the syntax without applying it: sudo netplan generate (no output means success).
  4. From the console, reboot the host (6 Power › Reboot). After it comes back, confirm from the workstation that https://<host-ip>:7770 answers and run the checks in Verify the Host Network.

Never skip the reboot test

A host that only works until its next reboot will fail at the worst moment — during a power event or a patch window, when HA expects it to come back. In release 3.3, Vapor removes the member NICs' addresses from the running system when it creates a bond, but leaves the installer's address in their netplan entries; without this edit the members get the management address back at the next boot.


7. Create the Infrastructure Networks ​

The Cockpit appliance is a VM, so its two NICs attach to libvirt networks on awbr0 with a default VLAN. Create these two networks on every host with identical names, so the appliance can later run on any host. Go to Virtualization › Networks and create:

Network nameBackend TypeForwarding ModeHost Bridge NamePortgroup (Set as default)VLAN Tags
vmnet-mgmtOpen vSwitch (OVS)Bridgeawbr0pg-241 ✓241
vmnet-cockpit-haOpen vSwitch (OVS)Bridgeawbr0pg-249 ✓249

Always set a default portgroup

Tick Set as default for this network on the portgroup. A VM NIC on a Virtual Switch network that ends up with no VLAN is untagged and can reach nothing. With a default portgroup, choosing the network chooses the VLAN.

Production VM networks are created later, once, as Cockpit distributed networks (see Initial Setup).


8. Verify the Host Network ​

bash
# Bridges and ports
sudo ovs-vsctl show
sudo ovs-vsctl --columns=name,tag,trunks,vlan_mode list Port
# Bond health: both members "enabled", one "active member"
sudo ovs-appctl bond/show bond0
# Addresses: every vPort in its own subnet, no address on the NICs or the bridges
ip -br addr
# Only one default route, through mgmt0
ip route show default
# Reach the other hosts on each VLAN (after they are built) and the storage targets
ping -c2 <cluster-ip-of-another-host>
ping -c2 <nfs-server>
# Jumbo frames end to end (8972 = 9000 - 28 bytes of headers); must not fragment
ping -c2 -M do -s 8972 <iscsi-portal-a>
ping -c2 -M do -s 8972 <iscsi-portal-b>
PortExpected tagExpected trunksExpected vlan_mode
bond0241[241, 242, 245, 249, 250, 100 …]native-untagged
eno3 / eno4[][243, 246] / [244, 247, 248]trunk
mgmt0, nfs0, clus0, iscsia0 …241, 242, 245, 243 …[]access

Unplug NIC 1 (or shut its switch port) and confirm that pings to the gateway continue through NIC 2, then restore it.


9. Time, Identity and API Token ​

Time synchronization ​

  1. In the Vapor UI, open Host › System and the Time Synchronization tab.
  2. Click + Add Source, add your NTP server and remove sources the host cannot reach.
  3. If the clock is far off, click Sync Now. The system time offset should settle within milliseconds.
  4. Set the same time zone on every host. AwaniOS defaults to Asia/Jakarta; to change it, run sudo timedatectl set-timezone <zone> from the console Terminal tab.

Identity and certificate ​

  • Confirm the hostname on the dashboard Overview, and that the host's FQDN resolves from the other hosts and the workstation.
  • Vapor generates a self-signed certificate for port 7770. If you changed the hostname after installation, click Regenerate & Restart on the TLS Certificate tab of Host › System so the certificate matches the name; the web UI reconnects after a few seconds.

API token for Cockpit ​

Cockpit registers a host with an API token generated on that host, not with the awanio password.

  1. In the Vapor UI, open Host › API Token and click Generate New Token.
  2. Give it a descriptive name, for example cockpit-dc1, and click Create Token.
  3. Copy the token into your password manager, labelled with the host name. It is shown only once.

WARNING

Treat API tokens like passwords. If one is exposed, revoke it on the host's API Token page and update the host's registration in Cockpit with a new token.

Licensing ​

Do not apply standalone licenses to hosts that Cockpit will manage. Cockpit holds the license for the whole environment and propagates it to its hosts; the System is unlicensed banner then disappears.


Host Readiness Checklist ​

  • [ ] All hosts built with the Virtual Switch layout above and survived a reboot test.
  • [ ] Each host can ping the others on the management, NFS and cluster VLANs and on the jumbo VLANs it shares with them.
  • [ ] vmnet-mgmt and vmnet-cockpit-ha exist on every host.
  • [ ] Time synchronized on every host, and one API token per host recorded.

Continue with Deploying the Cockpit Appliance.