Command · pk-metal
pk-metal boot
changes machinesno cluster necessary
pk-metal boot starts one machine from a rendered machine configuration. It works without the operator.
Use it for the first machines of a site, before a management cluster is there.
This is the only command that changes a machine without an approval. It prints its steps first, and it refuses a machine that is on unless you give --yes.
Synopsis
Section titled “Synopsis”pk-metal boot --config <rendered.yaml> --node <name> (--listen addr | --relay addr) [flags] <bmc-url><bmc-url>- The address of the BMC, for example
https://192.0.2.11. Give one address.
| Flag | Default | Description |
|---|---|---|
--bmc-ca<string> | - | PEM file with the CA certificates that the BMC's TLS certificate must chain to. |
--config<string>required | - | Rendered machine config file. |
--force-restart | false | Same as --yes. |
--hold | false | Keep serving and keep the medium mounted until interrupted (Ctrl-C). |
--insecure | false | Skip TLS verification of the BMC (prefer --bmc-ca). |
--listen<string> | - | Address to serve the image on; the BMC must reach it (not with --relay). |
--media<string> | - | Virtual media slot id (default: the first one that can mount an image, CD first). |
--no-power | false | Mount the medium and set the next boot only; you restart the machine. |
--node<string>required | - | Node name; names the served .iso. |
--relay<string> | - | Address of a pk-metal relay to serve the image through (not with --listen). |
--relay-secret-file<string> | - | File with the relay's shared secret (or set $PK_METAL_RELAY_SECRET). |
--system<string> | - | System id (default: the BMC's only system). |
--ttl<duration> | 10m0s | How long the image is served, and so how long boot waits for the machine to read it. |
--user<string> | admin | BMC username (password via PK_METAL_BMC_PASSWORD). |
--yes | false | Allow a hard reset of a machine that is on. |
Give --listen or --relay, not the two. The BMC must reach the address that serves the image.
The installer medium
Section titled “The installer medium”The command mounts the machine configuration only. It does not mount an installer.
A blank machine must start a Talos installer from a second virtual media slot.
The installer must have the kernel argument talos.config=metal-iso, so that it reads the configuration from the medium of this command.
Mount the installer yourself, and give the other slot with --media.
Bootstrap without the operator shows the steps.
A BMC with one slot cannot hold the two media. Install such a machine with the operator. See One-slot BMC.
What it does
Section titled “What it does”- The command packs the machine configuration into an ISO.
- It logs in to the BMC with a Redfish session, or with HTTP Basic authentication if the BMC has no sessions, and prints its plan.
- It ejects the media that is in the virtual media slot.
- It serves the ISO through HTTPS, with a user and a password that it makes for this one boot.
- It mounts the ISO as virtual media.
- It sets the boot override to that medium for the next start only.
- It turns the machine on. If the machine is on, it does a hard reset. This needs
--yes. - It waits until the machine reads the full image, at most the time of
--ttl. Only the reads after the power step count. The BMC reads part of the image when it mounts it, and that read is not the boot. - It ejects the medium and stops the server.
Options for the power step
Section titled “Options for the power step”--yes,--force-restart- Let the command do the hard reset of a machine that is on. The two flags are equal.
--no-power- The command does not touch the power. Restart the machine yourself, for example from the web console of the BMC. The command waits until the machine reads the image.
--hold- The command keeps the medium mounted and continues to serve it until you push Ctrl+C.
Inputs from the environment
Section titled “Inputs from the environment”| Variable | Content |
|---|---|
PK_METAL_BMC_PASSWORD |
The password of the BMC user. It is never a flag. |
PK_METAL_RELAY_SECRET |
The shared secret of the relay, when you use --relay without --relay-secret-file. |
Examples
Section titled “Examples”export PK_METAL_BMC_PASSWORD=...
pk-metal boot --config clusterconfig/cp-1.yaml --node cp-1 --listen 10.0.0.2:8443 https://192.0.2.11
boot: plan for system 1 (media slot CD, vmm-control):
boot: 1. eject whatever is mounted on slot CD
boot: 2. serve the config ISO for node cp-1 for up to 10m0s, under a one-time user and password
boot: 3. mount it on slot CD
boot: 4. boot from Cd at the next start only
boot: 5. power the machine on
boot: 6. wait until the machine has read the image, then eject it and stop serving
boot: serving 73728 B under a 10m0s grant at https://10.0.0.2:8443/grants/q3VbZ1…/cp-1.iso
boot: media mounted
boot: boot override Cd (once)
boot: power On
boot: image read complete
boot: media ejected
boot: grant revoked
boot: OK, the machine read the 73728 byte image (139264 bytes served)
A machine that is on gives this message. Nothing on the BMC changed.
pk-metal boot --config clusterconfig/cp-1.yaml --node cp-1 --listen 10.0.0.2:8443 https://192.0.2.11
pk-metal: the machine is on, and booting it means a hard reset that kills what runs there. Nothing on the BMC was changed. Rerun with --yes to allow the reset, or with --no-power to mount the medium only and restart the machine yourself
Serve the image through a relay, when your workstation is not on the BMC network.
pk-metal boot --config clusterconfig/cp-1.yaml --node cp-1 \ --relay 127.0.0.1:9443 --relay-secret-file ~/.config/pk-metal/relay.secret \ https://192.0.2.11Objects
Section titled “Objects”The command reads and writes no object in the cluster. It changes the BMC directly:
| Part of the BMC | Change |
|---|---|
| Virtual media slot | Eject, mount, eject. |
| Boot override | One-time boot from the medium. |
| Power | Power on or hard reset, unless you give --no-power. |
With the operator, a HostOperation does the same steps after an approval: InsertMedia, SetBootOverride and PowerCycle.
Exit status
Section titled “Exit status”The command gives code 1 if the machine does not read the full image before the time of --ttl ends.
Related
Section titled “Related”- pk-metal render makes the machine configuration.
- pk-metal relay serves the image from a host on the BMC network.
- pk-metal bootstrap is the next step.
- Bootstrap without the operator
- Virtual media boot