Support vAccel/vsock Integration for Cloud Hypervisor

オープン 初心者向け
#807 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
76/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
go

調査の方向性

pkg/unikontainers/hypervisors/cloud_hypervisor.go から始めて isValidVSockAddress を見つけ、既存の Firecracker と QEMU の処理を比較します。vAccelType に vsock が設定され、示された Unix ソケットアドレスを使用する cloud-hypervisor リクエストが受け付けられ、提供された ctr コマンドが成功すれば、変更は完了です。

索引モデルが issue の本文から書いたものです。

説明

dev enhancement HW accel
Current Behavior

vAccel (vsock) support is only wired up and validated for Firecracker and QEMU.
pkg/unikontainers/hypervisors/cloud_hypervisor.go already implements the Cloud Hypervisor VMM, but the vAccel/vsock config validation function (isValidVSockAddress) only accepts "firecracker" and "qemu" as valid hypervisor values when vAccelType == "vsock". Requesting Cloud Hypervisor with vAccel enabled is currently rejected/unsupported.

Why Cloud Hypervisor Fits the Existing Pattern

Cloud Hypervisor implements vsock the same way Firecracker does "mapping guest vsock traffic to a host-side Unix domain socket". This means it can follow the same integration approach already used for Firecracker, without needing a new transport mechanism.

What I've Done

I've implemented and locally tested a Cloud Hypervisor vsock validation path mirroring Firecracker's approach. Verification steps and result below.

Step 1: Install Cloud Hypervisor

Ensure the latest cloud-hypervisor static binary is installed on the host and configured with the necessary capabilities:

wget https://github.com/cloud-hypervisor/cloud-hypervisor/releases/download/v52.0/cloud-hypervisor-static
chmod +x cloud-hypervisor-static
sudo setcap cap_net_admin+ep ./cloud-hypervisor-static
sudo mv cloud-hypervisor-static /usr/local/bin/cloud-hypervisor
Step 2: Set Up Host-Side vAccel RPC Agent & Bridge
  1. Start the vAccel RPC agent on the host listening on TCP port 65500:
    export LD_LIBRARY_PATH=/path/to/vaccel/usr/lib/x86_64-linux-gnu
    export VACCEL_PLUGINS=/path/to/vaccel/usr/lib/x86_64-linux-gnu/libvaccel-noop.so
    export VACCEL_LOG_LEVEL=4
    vaccel-rpc-agent -a tcp://127.0.0.1:65500
    
  2. Start socat to bridge the host Unix socket file to the TCP port:
    socat UNIX-LISTEN:/tmp/vaccel.sock_2049,fork,mode=777 TCP4:127.0.0.1:65500
    
Step 3: Run the Test Container

Run the container using ctr, specifying cloud-hypervisor as the hypervisor and the Unix socket address for vAccel:

sudo ctr run --rm --runtime io.containerd.urunc.v2 \
  --annotation com.urunc.unikernel.hypervisor="cloud-hypervisor" \
  --annotation com.urunc.unikernel.vAccel="vsock" \
  --annotation com.urunc.unikernel.RPCAddress="unix:///tmp/vaccel.sock_2049" \
  harbor.nbfc.io/nubificus/ubuntu-vaccel-urunc-qemu:x86_64 \
  vaccel-test-ch \
  /usr/bin/classify /usr/share/vaccel/images/example.jpg 1
Step 4: Result Confirmed Working

The execution successfully offloaded the classification task to the host agent over vsock, producing the observed output:

2026.07.04-10:55:49.42 - <info> vAccel 0.7.1-51-499fc2f7
2026.07.04-10:55:49.43 - <info> Registered plugin rpc 0.2.1-10-3d4d748c
Initialized session with id: 1
classification tags: This is a dummy classification tag!
classification imagename: This is a dummy imgname!
主要言語
Go
スター
308
フォーク
222
平均マージ
2日 12時間
マージ済み PR(30日)
42

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

urunc-dev/urunc のほかの issue

urunc-dev/urunc の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。