スキル一覧に戻る
atrawog

vm

by atrawog

Claude Code plugins for Bazzite AI

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: vm description: | QCOW2 virtual machine management using libvirt. Creates VMs from pre-built images downloaded from R2 CDN with cloud-init customization. Supports SSH, VNC, and virtiofs home directory sharing. Use when users need to create, manage, or connect to bazzite-ai VMs.

VM - QCOW2 Virtual Machine Management

Overview

The vm command manages bazzite-ai virtual machines using libvirt. VMs are created from pre-built QCOW2 images downloaded from R2 CDN, customized via cloud-init.

Key Concept: VMs run in user session (qemu:///session), not requiring root. Home directory is shared via virtiofs at /workspace in the VM.

Quick Reference

ActionCommandDescription
Addujust vm add [NAME]Add new VM with default image
Boot-logujust vm boot-log [NAME]Get boot messages via guest agent
Createujust vm create [NAME]Create VM from existing disk
Deleteujust vm delete [NAME]Delete VM and optionally its disk
Diagujust vm diag [NAME]Full diagnostic (no SSH required)
Downloadujust vm download [BRANCH]Download QCOW2 image
Execujust vm exec [NAME] CMDExecute command via guest-agent
Recreateujust vm recreate [NAME]Recreate VM config preserving disk
Seedujust vm seed [NAME]Regenerate cloud-init seed ISO
Serialujust vm serial [NAME]Serial console connection
Shell-execujust vm shell-exec [NAME] CMDExecute shell command via guest agent
SSHujust vm ssh [NAME]SSH connection to VM
Startujust vm start [NAME]Start VM
Statusujust vm status [NAME]Show VM status
Stopujust vm stop [NAME]Stop VM
Updateujust vm update [NAME] WHATUpdate QCOW2 or seed
VNCujust vm vnc [NAME]VNC graphical connection
Wait-agentujust vm wait-agent [NAME]Wait for guest agent to be ready

Parameters

ParameterLong FlagShortDefaultDescription
action(positional)-requiredAction: add, update, delete, download, etc.
vm_name(positional)-bazzite-aiVM name
url--url-R2 CDN URLQCOW2 image URL
cpus--cpus-4Number of CPUs
ram--ram-8192Memory in MB
disk_size--disk-size-100GDisk size
username--username-u$USERVM username
password--password-(empty)VM password
autologin--autologin-trueEnable autologin
ssh_port--ssh-port-4444SSH port forwarding
vnc_port--vnc-port-5900VNC port
ssh_user--ssh-user-$USERSSH user for connection
share_dir--share-dir-$HOMEDirectory to share
branch--branch-bstableImage branch (stable/testing)
what--what--Update target (for update action)

Add VM (Full Workflow)

# Default: bazzite-ai VM with auto-detect settings
ujust vm add

# Named VM with custom config (long form)
ujust vm add myvm --cpus=8 --ram=16384 --disk-size=200G

# Testing branch image
ujust vm add testing-vm --branch=testing

# Short form for branch
ujust vm add testing-vm -b testing

# Different SSH port
ujust vm add dev-vm --ssh-port=4445

# No home sharing
ujust vm add isolated --share-dir=''

The add command:

  1. Downloads QCOW2 image (cached)
  2. Creates cloud-init seed ISO
  3. Creates libvirt VM
  4. Configures port forwarding

Individual Steps

Download QCOW2

# Stable image (default)
ujust vm download

# Testing branch (long form)
ujust vm download --branch=testing

# Testing branch (short form)
ujust vm download -b testing

# Custom URL
ujust vm download --url=https://example.com/custom.qcow2

Create Seed ISO

# Long form
ujust vm seed myvm --username=developer --password=secret

# Short form for username
ujust vm seed myvm -u developer --password=secret

Create VM

ujust vm create myvm --cpus=4 --ram=8192

VM Lifecycle

Start VM

ujust vm start              # Default VM
ujust vm start myvm         # Named VM

Auto-adds VM if it doesn't exist.

Stop VM

ujust vm stop              # Graceful shutdown
ujust vm stop myvm         # Named VM

Delete VM

ujust vm delete myvm        # Remove VM and disk

Connecting to VM

SSH Connection

# Connect to default VM
ujust vm ssh

# Named VM
ujust vm ssh myvm

# Different user
ujust vm ssh myvm --ssh-user=root

# Run command (use -- separator)
ujust vm ssh myvm -- ls -la

Default SSH: ssh -p 4444 localhost

VNC Connection

ujust vm vnc              # Opens VNC viewer
ujust vm vnc myvm

Default VNC: Port 5900

Home Directory Sharing

By default, your home directory is shared to the VM at /workspace via virtiofs.

# Default: $HOME -> /workspace
ujust vm add

# Disable sharing
ujust vm add isolated --share-dir=''

# Share specific directory
ujust vm add project --share-dir=/path/to/project

Inside VM:

ls /workspace  # Your home directory

Image Branches

BranchTagDescription
stable:stableProduction, tested
testing:testingLatest features
# Long form
ujust vm download --branch=stable
ujust vm download --branch=testing

# Short form
ujust vm download -b stable
ujust vm download -b testing

Storage Locations

ItemLocation
Download cache~/.local/share/bazzite-ai/vm/cache/
VM disks~/.local/share/libvirt/images/
VM config~/.local/share/bazzite-ai/vm/<name>.conf
Seed ISO~/.local/share/bazzite-ai/vm/<name>-seed.iso

Common Workflows

Quick Test VM

# Add and start default VM
ujust vm add
ujust vm start
ujust vm ssh

Development Environment

# Create dev VM with more resources
ujust vm add dev --cpus=8 --ram=16384 --disk-size=200G

# Start it
ujust vm start dev

# SSH in
ujust vm ssh dev

# Your home is at /workspace

Testing Branch

# Test latest features (long form)
ujust vm add testing-vm --branch=testing

# Or short form
ujust vm add testing-vm -b testing

ujust vm start testing-vm
ujust vm ssh testing-vm

Multiple VMs

# Create VMs on different ports
ujust vm add dev1 --ssh-port=4444
ujust vm add dev2 --ssh-port=4445
ujust vm add dev3 --ssh-port=4446

# Start all (not a built-in command, use loop)
for vm in dev1 dev2 dev3; do ujust vm start $vm; done

Troubleshooting

VM Won't Start

Check:

ujust vm status myvm
virsh --connect qemu:///session list --all

Common causes:

  • Disk image not found
  • Port conflict
  • Virtiofs path issue

Fix:

ujust vm delete myvm
ujust vm add myvm

SSH Connection Refused

Check:

ssh -p 4444 localhost

Common causes:

  • VM not fully booted
  • Wrong SSH port
  • SSH not started in VM

Fix:

# Wait longer after start
sleep 30
ujust vm ssh myvm

# Check VM console via VNC
ujust vm vnc myvm

Virtiofs Not Working

Symptom: /workspace empty or not mounted

Cause: SHARE_DIR path issue (symlinks)

Fix:

# Delete and recreate with canonical path
ujust vm delete myvm
ujust vm add myvm --share-dir=$(readlink -f $HOME)

Out of Disk Space

Check:

qemu-img info ~/.local/share/libvirt/images/myvm.qcow2

Fix:

# Create new VM with larger disk
ujust vm delete myvm
ujust vm add myvm --disk-size=200G

Cross-References

  • Related Skills: bootc (alternative: bootc-based VMs)
  • Prerequisites: ujust config libvirtd enable
  • bcvk alternative: ujust install bcvk + ujust bootc

When to Use This Skill

Use when the user asks about:

  • "create VM", "add VM", "start VM"
  • "ssh to VM", "connect to VM"
  • "download qcow2", "VM image"
  • "VM not starting", "VM connection failed"
  • "share directory with VM", "virtiofs"

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です