BCVK-LIBVIRT-LIST(8)

πŸ“¦
version 0.21.0 Β· 2 versions
, in fedora 43, fedora 44

🌸 NAME 🌸

bcvk-libvirt-list β€” bestie, this lists all your available bootc volumes with metadata, and it's giving main character energy πŸ’…


✨ SYNOPSIS ✨

bcvk libvirt list [DOMAIN_NAME] [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so picture this: you wanna see every bootc domain you've got hanging around, and you want the receipts too, not just names. That's literally this command. It lists available bootc domains with metadata β€” no cap 🫢

And when you hand it a domain name? It's not gonna dump the whole list on you, it's gonna return info about that specific domain only. Iconic behavior, honestly.

Now here's the part that makes automation girlies scream: when you use --format=json with a specific domain name, the output is a single JSON object (not an array). Why does that matter? Because it makes it so easy to pull SSH credentials and connection info out with tools like jq. Lowkey the best design choice. ⭐


πŸ’– OPTIONS πŸ’–

DOMAIN_NAME

Optional domain name to query. When specified, returns information about only this domain.


πŸŽ€ OPTIONS πŸŽ€

bestie yes, the manpage really does have OPTIONS twice. We keep the lore intact. πŸ’€

DOMAIN_NAME

Domain name to query (returns only this domain)

--format=FORMAT

Output format. You get options, and they are:

  • table
  • json
  • yaml
  • xml

Default: table

-a, --all

Show all domains including stopped ones. Like, the ones that are napping 😴

--label=LABEL

Filter domains by label


🌈 EXAMPLES 🌈

List all running bootc VMs:

bcvk libvirt list

List all bootc VMs including stopped ones:

bcvk libvirt list --all

Show VM status in your workflow:

# Check what VMs are running
bcvk libvirt list

# Start a specific VM if needed
bcvk libvirt start my-server

Query a specific domain:

bcvk libvirt list my-domain

πŸ”₯ Working with SSH credentials via JSON output πŸ”₯

Connect via SSH using extracted credentials:

# Query once, save to file, then extract credentials
DOMAIN_NAME="mydomain"

# Query domain info once and save to file
bcvk libvirt list $DOMAIN_NAME --format=json > /tmp/domain-info.json

# Extract SSH private key
jq -r '.ssh_private_key' /tmp/domain-info.json > /tmp/key.pem
chmod 600 /tmp/key.pem

# Extract SSH port
SSH_PORT=$(jq -r '.ssh_port' /tmp/domain-info.json)

# Connect via SSH
ssh -o IdentitiesOnly=yes -i /tmp/key.pem -p $SSH_PORT -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@127.0.0.1

# Cleanup
rm /tmp/domain-info.json /tmp/key.pem

This is useful for automation scripts, or when you need direct SSH access without going through bcvk libvirt ssh. Chef's kiss for your CI pipelines 🧚✨


πŸ‘‘ SEE ALSO πŸ‘‘


πŸ’œ VERSION πŸ’œ

v0.1.0


and that's the whole page, bestie πŸ₯° this was bcvk-libvirt-list, sitting at v0.1.0, and it ate. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from