CloudBase-RE: clean-room Python take on VMware VDDK - VMDK parsing, NFC/NBD streaming, safe lab use!
70
๐ณ Docker Hub status: image
credkellar/cloudbase-re:latestโ the Hub page is created by the first Docker Publish run, which fires after the two workflow files are pasted into.github/workflows/and the per-repoDOCKERHUB_USERNAME/DOCKERHUB_TOKENsecrets are set on the GitHub repo. Source of truth: https://github.com/credkellar/CloudBase-REโ (verified head 76478069, CHECKS 12/12, pytest 11 passed).
โณ Honest workflow status: the real
ci.yml+docker-publish.ymlbadges light up once the two workflow files are pasted into.github/workflows/(plural) and run โ until then these show pending paste on purpose. The workflow files themselves are delivered with this project and are standard GitHub Actions (pytest + demo on Python 3.12; Docker Hub publish ofcredkellar/cloudbase-re:lateston push to main).
CloudBase-RE is an independent, open-source Python implementation of the OpenVixDiskLib concept, built to study and replicate the functionality of VMware's proprietary libvixDiskLib (VDDK / Virtual Disk Development Kit) - the library backup and migration tools use to read and write VMware virtual disks (.vmdk). The core challenge it takes on: interfacing with VMware vSphere/ESXi virtual disk formats and the low-level Network File Copy (NFC) and Network Block Device (NBD) protocols without closed-source SDK binaries or partner-portal downloads.
This build is a clean-room lab implementation: real VMDK descriptor parsing, a real NBD protocol codec (NBD is a public, documented protocol), a modelled NFC greeting/auth handshake, and a loopback lab fixture that stands in for an ESXi port-902 service - so the whole connect โ open โ read/write path runs and is tested locally, with synthetic disks only. Live connection to a real ESXi/vCenter stays behind HOLD gates.
VixDiskLibHandle exposes connect / open / read / write / get_info with sector addressing, mirroring the native SDK's shape (openvixdisklib/handles.py)vmdk.py), and creates synthetic lab disks (descriptor + zeroed flat extent)nbd.py)nfc.py)session.py)compression.py)errors.py)council.py)problems.py as data (the top 10 of each are in the sections below)pyVmomi is the real-world library; here it is an offline model) and receive a session token + NFC ticket..vmdk extents on the datastore - in this build, the loopback fixture's synthetic disk, through the real NBD request/reply structs.๐ The full catalogue - all 20 problems and all 20 reasons from the study doc - is in
openvixdisklib/problems.py.
git clone https://github.com/credkellar/CloudBase-RE.git
cd CloudBase-RE
python3 main.py demo
CHECKS: 12/12pip install pytest
python3 -m pytest -q
11 passeddocker build -t credkellar/cloudbase-re:latest .docker run --rm credkellar/cloudbase-re:latestdocker compose up --buildpytest - only for running the test suiteGEMINI_API_KEY (Carbon 4) and MODEL_API_KEY (Muse, paid: key creation free, usage pay-as-you-go) light up the council seats; VCENTER_USER/VCENTER_PASSWORD are env names only in this build - values are never readImagine a computer inside a computer - that is a virtual machine. Its whole hard drive is saved as one big file, like saving an entire LEGO castle as a single box. Big companies sell a special key that lets programs open the box and read the pieces. That key is hard to get. This project is like a kid who studied how the box opens and built his own key out of regular parts, in the open, so anyone can learn from it. Talking to the box uses a secret handshake language over the network; this project writes that handshake down in plain Python anyone can read. But safety first: the key is only ever tried on toy boxes we made ourselves - never on anyone's real castle.
CloudBase-RE/
โโโ main.py โถ๏ธ demo + CHECKS (12/12)
โโโ openvixdisklib/
โ โโโ __init__.py ๐ฆ version
โ โโโ vmdk.py ๐ฝ descriptor parser + synthetic disk creator
โ โโโ session.py ๐ซ vCenter session + NFC ticket model (offline)
โ โโโ nfc.py ๐ค NFC greeting/auth framing codec (model)
โ โโโ nbd.py ๐ NBD codec + loopback lab fixture server/client
โ โโโ handles.py ๐ VixDiskLibHandle API (connect/open/read/write)
โ โโโ compression.py ๐๏ธ LZ77 adapter (FastLZ-interface seat)
โ โโโ errors.py โ readable VixError hierarchy
โ โโโ council.py ๐ง Carbon 4 DECIDER + Muse advisor
โ โโโ gates.py โ 10 HOLD gates
โ โโโ problems.py ๐ 20 problems + 20 reasons (study doc)
โโโ tests/test_openvixdisklib.py ๐งช pytest (11 passed)
โโโ Dockerfile ๐ณ python:3.12-slim
โโโ docker-compose.yml ๐งฉ one service
โโโ pyproject.toml ๐ฆ package metadata
โโโ README.md ๐ this file
main.pyflowchart TD
A[python main.py demo] --> B[create synthetic VMDK]
B --> C[parse descriptor]
C --> D[session login + NFC ticket]
D --> E[NFC handshake model]
E --> F[NBD fixture stream write/read]
F --> G[compression adapter round-trip]
G --> H[council + gates + CHECKS 12/12]
openvixdisklib/vmdk.pyflowchart LR
A[create_synthetic_disk] --> B[descriptor text + flat extent]
C[descriptor text] --> D[parse_descriptor]
D --> E[extents + DDB + sector totals]
openvixdisklib/session.pyflowchart TD
A[login host + user] --> B[session token hash]
B --> C[nfc_ticket: host port 902 + path + expiry]
C --> D[ticket feeds the NFC auth frame]
openvixdisklib/nfc.pyflowchart LR
A[opcode + payload] --> B[encode_frame: NFC1 magic + version]
B --> C[decode_frame validates magic]
C --> D[greet / auth / open-disk ops]
openvixdisklib/nbd.pyflowchart TD
A[LabBlockServer on 127.0.0.1] --> B[NBDMAGIC greeting + export size]
B --> C[NbdClient connect]
C --> D{request: READ / WRITE / DISC}
D --> E[reply magic + error + data]
openvixdisklib/handles.pyflowchart TD
A[VixDiskLibHandle.connect] --> B[open descriptor]
B --> C{transport}
C -->|fixture| D[NFC model + NBD client]
C -->|file| E[local flat extent file]
D --> F[read / write sectors with bounds checks]
E --> F
openvixdisklib/compression.pyflowchart LR
A[sector bytes] --> B[compress: literal / match tokens]
B --> C[decompress]
C --> D[identical bytes back]
openvixdisklib/errors.pyflowchart TD
A[legacy hex-style code] --> B[VixError]
B --> C[plain-English message + named subclass]
C --> D[NotConnected / InvalidSector / Auth]
openvixdisklib/council.pyflowchart TD
A[Carbon 4 DECIDER: MAP-MODEL-STRESS-DECIDE] --> B{decision}
C[Muse advisor: exactly 4 advice] --> B
B --> D[tighten-only on HOLD gates]
openvixdisklib/gates.pyflowchart TD
A[10 HOLD gates] --> B[no live ESXi / no credentials / loopback only]
B --> C[every module stays inside lab scope]
openvixdisklib/problems.pyflowchart LR
A[study doc catalogue] --> B[20 PROBLEMS with solutions]
A --> C[20 REASONS it matters]
B --> D[README top-10 sections draw from here]
VCENTER_USER / VCENTER_PASSWORD are env NAMES only; values never read, stored, logged, or sent$ python3 main.py demo
disk: 1 MiB, 2048 sectors ... session ticket -> port 902 ... NBD write/read identical
CHECKS: 12/12
$ python3 -m pytest -q
11 passed
MIT
Built from Darion's Gemini study doc on Cloudbase/OpenVixDiskLib - clean-room, lab-first, honest scope: the NBD codec and VMDK parser are real, the NFC handshake and vCenter session are models, the peer is a loopback fixture, and no real hypervisor is ever contacted by this build. ๐ฝ
Content type
Image
Digest
sha256:10f3394cbโฆ
Size
44.5 MB
Last updated
about 2 hours ago
docker pull credkellar/cloudbase-re