一个在笔记本电脑上通过Docker和kind搭建的自包含实验环境,用于练习KubeVirt虚拟机管理和Rancher多集群管理,并明确记录和验证了平台限制。

Stars

6

7 天增长

暂无数据

Fork 数

0

开放 Issue

2

开源协议

暂无数据

最近更新

2026-07-28

AI 仓库情报摘要
FR-AI / ANALYSIS

为什么值得关注

它透明地记录了特定平台的失败情况(例如Apple Silicon无法启动虚拟机)并提供了解决方法,使其成为诚实的教学工具而非经过修饰的演示。

适合谁使用

  • 探索虚拟机工作负载的Kubernetes运维人员
  • 学习KubeVirt和Rancher的开发者
  • 学习云原生虚拟化的学生或培训师
  • 在笔记本电脑上评估多集群管理的DevOps工程师

典型使用场景

  • 学习KubeVirt CRD、实时迁移和CDI存储
  • 练习Rancher集群导入和多集群管理
  • 在受限环境中测试虚拟机网络、Day-2操作和故障排除
  • 验证KubeVirt的跨平台行为(尤其是Apple Silicon)

项目优势

  • 提供逐步实验,带有可验证的检查点和故障排除表
  • 通过Makefile目标自动化整个设置(kind、KubeVirt、CDI、Rancher)
  • 记录所有已知限制并给出解决方法(如MTU修复、自定义容器磁盘)
  • 已在Apple Silicon(M1 Pro)上验证,并提供详细的平台支持矩阵

使用前须知

  • 虚拟机无法在Apple Silicon(M1/M2)上启动,除非使用嵌套虚拟化;M3+需Colima
  • 存储仅限local-path(RWO,无CSI快照,迁移受限)
  • 无Multus或真实L2网络;无负载均衡器(仅NodePort)
  • 首次运行较慢(约25分钟,约2GB镜像),需要至少4 CPU / 8 GiB内存

README 快速开始

kubevirt-kind-lab

Practise KubeVirt (running virtual machines on Kubernetes) and Rancher (multi-cluster management) on a laptop — entirely in Docker, with every platform limitation documented and verified rather than glossed over.

Guests don't boot on Apple Silicon. The KubeVirt control plane, CDI, storage and all of Rancher work; the final QEMU boot of a VM does not, because KubeVirt requires host-passthrough on Arm64 and macOS gives containers no /dev/kvm. Full diagnosis and three fixes: docs/booting-real-vms.md. See Platform support before you start.

ContentsWhat you'll learn · Platform support · Prerequisites · Start here · Architecture · The labs · Everyday commands · Layout · Known limits · Versions

What you'll learn

  • How KubeVirt turns a VM into a pod — virt-operator/api/controller/handler, and how a CRD compiles down to libvirt domain XML
  • Why ordinary Services, DNS and NetworkPolicy work unchanged against a VM
  • How CDI imports a cloud image into a PVC, and when a disk is ephemeral vs persistent
  • Day-2 operations: live migration, disk hot-plug, snapshots, and drain-as-migration
  • How Rancher actually attaches to a cluster — the agent dials out, which is why server-url is the setting people get wrong

Platform support

HostControl plane · CDI · RancherGuest VMs boot?
Linux x86_64 with /dev/kvm✅ full speed — the best target
Linux x86_64, no KVM✅ works, 10–30× slower (QEMU TCG)
macOS Apple Silicon (M1/M2)verified❌ hardware limit — why
macOS Apple Silicon (M3+)✅ via Colima + nested virt
Windows / WSL2untested — #2untested

Verified on Apple M1 Pro / macOS 15.3.1 / Docker Desktop 29.4.1: kind + KubeVirt v1.8.4 reach Deployed, CDI v1.65.0 imports Fedora 42 into a PVC in ~3 min, and Rancher v2.12.3 imports the cluster to state active.

The scripts probe /dev/kvm on the Docker daemon's host, not on the machine you're typing on — so docker context use then make virt

项目描述

Practise KubeVirt (VMs on Kubernetes) and Rancher locally on kind — with every platform limitation documented and verified.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

programmersd21
精选
programmersd21 GitHub avatar

flow

flow is a minimalist terminal dashboard that displays real-time network throughput with smooth animations, multiple responsive modes, and zero configuration.

开发者工具CLI 与终端
277
S40911120
精选
S40911120 GitHub avatar

recensa

Recensa is a self-hosted web viewer that indexes Claude Code session transcripts into a local SQLite database, enabling full-text search, replay, and audit of all past agent conversations without uploading data anywhere.

AI 与机器学习大语言模型
67
jamesob
精选
jamesob GitHub avatar

local-llm

A comprehensive guide for building and configuring a high-end local machine to run state-of-the-art LLMs, with detailed hardware choices, BIOS tuning, and Docker-based model serving.

AI 与机器学习大语言模型
1,660