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
- On the console dashboard Services tab (
4), confirm thatvapor,libvirtdandopenvswitch-switchare active (running). - From the admin workstation, open
https://<host-ip>:7770, accept the self-signed certificate and sign in asawanio. The Vapor dashboard opens; a System is unlicensed banner is expected at this stage. - 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.
| Step | Where | Risk to connectivity |
|---|---|---|
Build the fabric bridges awbr1 and awbr2 | Vapor web UI | None — NIC 3 and NIC 4 are unused |
Move management to awbr0 / bond0 / mgmt0 | Server console | High — the old address is removed |
| Add the NFS and cluster vPorts | Vapor web UI | None |
| Make the bond reboot-safe and test a reboot | Console | Low |
| Create the infrastructure networks | Vapor web UI | None |
| Verify | Shell | None |
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)
Click Create VS Bridge. Name
awbr1, Fail Modestandalone, STP and RSTP off. Create.Under vPorts, click Create vPort for the uplink:
Field Value VS Bridge awbr1vPort Type systemInterfaces eno3(the vPort takes the interface name)VLAN Mode trunkTrunks 243,246— leave Tag emptyMTU Request 9000(or empty for 1500)Remove IP addresses Leave ticked Create the internal vPort for iSCSI path A:
Field Value VS Bridge awbr1vPort Type internalvPort Name iscsia0VLAN Mode / Tag access/243Service Tags storageMTU Request 9000Create the internal vPort
migr0onawbr1:access, Tag246, Service Tagsmigration, MTU Request9000.
Bridge awbr2 (fabric B)
Create VS Bridge
awbr2(standalone, STP/RSTP off).Create the system vPort
eno4onawbr2:trunk, Trunks244,247,248, MTU Request9000.Create the internal vPorts on
awbr2:vPort Name VLAN Mode Tag Service Tags MTU Request iscsib0access244 storage9000 repl0access247 replicationempty (1500) bkup0access248 backup9000
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).
On the console, sign in to the dashboard as
awanioand press5for the Terminal tab.Set the values for this host. Every command below reads them, so you only edit this block:
bashVAPOR=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]'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:
bashread -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. OnLOGIN 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.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"Check the result:
baship -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:
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 Name | VLAN Mode | Tag | Service Tags | Address (vapor-01) |
|---|---|---|---|---|
nfs0 | access | 242 | storage | 192.168.242.11/24 |
clus0 | access | 245 | shared-heartbeat | 192.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.
- 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 - Under
ethernets:, make the bond members address-less and mark the bond entry optional:yamlnetwork: 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 - Validate the syntax without applying it:
sudo netplan generate(no output means success). - From the console, reboot the host (
6Power › Reboot). After it comes back, confirm from the workstation thathttps://<host-ip>:7770answers 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 name | Backend Type | Forwarding Mode | Host Bridge Name | Portgroup (Set as default) | VLAN Tags |
|---|---|---|---|---|---|
vmnet-mgmt | Open vSwitch (OVS) | Bridge | awbr0 | pg-241 ✓ | 241 |
vmnet-cockpit-ha | Open vSwitch (OVS) | Bridge | awbr0 | pg-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
# 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>| Port | Expected tag | Expected trunks | Expected vlan_mode |
|---|---|---|---|
bond0 | 241 | [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
- In the Vapor UI, open Host › System and the Time Synchronization tab.
- Click + Add Source, add your NTP server and remove sources the host cannot reach.
- If the clock is far off, click Sync Now. The system time offset should settle within milliseconds.
- Set the same time zone on every host. AwaniOS defaults to
Asia/Jakarta; to change it, runsudo 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.
- In the Vapor UI, open Host › API Token and click Generate New Token.
- Give it a descriptive name, for example
cockpit-dc1, and click Create Token. - 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-mgmtandvmnet-cockpit-haexist on every host. - [ ] Time synchronized on every host, and one API token per host recorded.
Continue with Deploying the Cockpit Appliance.