Skip to content

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.

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.
FlagDefaultDescription
--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-restartfalseSame as --yes.
--holdfalseKeep serving and keep the medium mounted until interrupted (Ctrl-C).
--insecurefalseSkip 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-powerfalseMount 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>10m0sHow long the image is served, and so how long boot waits for the machine to read it.
--user<string>adminBMC username (password via PK_METAL_BMC_PASSWORD).
--yesfalseAllow 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 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.

  1. The command packs the machine configuration into an ISO.
  2. 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.
  3. It ejects the media that is in the virtual media slot.
  4. It serves the ISO through HTTPS, with a user and a password that it makes for this one boot.
  5. It mounts the ISO as virtual media.
  6. It sets the boot override to that medium for the next start only.
  7. It turns the machine on. If the machine is on, it does a hard reset. This needs --yes.
  8. 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.
  9. It ejects the medium and stops the server.
--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.
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.
pk-metal boot
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
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.

Terminal window
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.11

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.

CodeMeaning
0Success.
1Error; the message is on stderr, as "pk-metal: <message>".

The command gives code 1 if the machine does not read the full image before the time of --ttl ends.