Skip to content

Conversation

@WashingtonKK
Copy link
Contributor

What type of PR is this?

What does this do?

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

Did you document any new/modified features?

Notes

Copy link
Contributor

@SammyOina SammyOina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include screenshots of buildroot configuration for HAL image, also this guide needs to state it is for HAL and keep it separate from public cloud/cloud init which should be documented as well

Copy link
Contributor

@SammyOina SammyOina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please go through your changes

Clone the Cube HAL repository and its Buildroot submodule:

```bash
git clone https://github.com/ultravioletrs/cube-hal.git
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no such repo exists

```bash
git clone https://github.com/ultravioletrs/cube-hal.git
cd cube-hal
git submodule update --init --recursive
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have submodules

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Copy link
Contributor

@SammyOina SammyOina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please go through the chnages and verify accuracy of the info


## Managing Confidential VMs

This guide explains how to start, monitor, and manage Confidential Virtual Machines (CVMs) for Cube AI using the Hardware Abstraction Layer (HAL) with Buildroot-based images and the provided management scripts. It is written as a practical, step-by-step reference so you can move from initial launch to ongoing operations without having to infer script behavior.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is HAL only we'll need a section for cloud init

This guide explains how to start, monitor, and manage Confidential Virtual Machines (CVMs) for Cube AI using the Hardware Abstraction Layer (HAL) with Buildroot-based images and the provided management scripts. It is written as a practical, step-by-step reference so you can move from initial launch to ongoing operations without having to infer script behavior.

:::info
This guide is specifically for HAL-based CVM deployments using Buildroot images. It assumes you are running the HAL tooling locally and that your VM images follow the Buildroot layout. For public cloud deployments using cloud-init, please refer to the separate cloud deployment documentation instead.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HAL tooling? what does that mean

Comment on lines 76 to 81
- 6190 → 22 (SSH)
- 6191 → 80 (HTTP)
- 6192 → 443 (HTTPS)
- 6193 → 7001 (Cube Agent)
- 6194 → 11434 (Ollama)
- 6195 → 8000 (vLLM)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only forwarded port to cvm should be agent and ssh, remove all others make sure this reflects in the cube repo as well


### Certificate Management

Certificates are embedded in the filesystem image at build time. This means certificate rotation happens by rebuilding the image, not by editing a running VM.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can rotate certs by ssh into the cvm and restart services

Load the Cocos HAL configuration using the BR2_EXTERNAL mechanism:

```bash
make BR2_EXTERNAL=../cocos/hal/linux cocos_defconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cocos?

Comment on lines 88 to 91
- **Server CA Certificates File** - Path to CA certificate file (default: `/etc/cube/certs/ca.pem`)
- **Server Certificate File** - Path to server certificate (default: `/etc/cube/certs/server.crt`)
- **Server Key File** - Path to server private key (default: `/etc/cube/certs/server.key`)
- **Client CA Certificates File** - Path to client CA certificates (default: `/etc/cube/certs/client_ca.pem`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not env, it is actual file uploaded to build

**Ollama Configuration:**

- **ollama** - Ollama package dependency (automatically required when selected as LLM backend)
- **Install default models** - Pre-install common models during build
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we have specific ones, should be listed


**Important Notes:**

- If **Agent CA URL** is configured, the agent will fetch certificates from the CA at runtime using the **Certs Token** for authentication
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reference which CA we actually use

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>

## Managing Confidential VMs

This guide explains how to start, monitor, and manage Confidential Virtual Machines (CVMs) for Cube AI using the Hardware Abstraction Layer (HAL) with Buildroot-based images and the provided management scripts. It is written as a practical, step-by-step reference so you can move from initial launch to ongoing operations without having to infer script behavior.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This guide explains how to start, monitor, and manage Confidential Virtual Machines (CVMs) for Cube AI using the Hardware Abstraction Layer (HAL) with Buildroot-based images and the provided management scripts. It is written as a practical, step-by-step reference so you can move from initial launch to ongoing operations without having to infer script behavior.
This guide explains how to start, monitor, and manage Confidential Virtual Machines (CVMs) for Cube AI using the Hardware Abstraction Layer (HAL) with Buildroot-based images and the provided management scripts.

For AMD Secure Encrypted Virtualization, use the SEV-SNP launch path. This mode enables hardware-backed memory protection for the guest.

```bash
./qemu.sh start_cvm
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the other is start_tdx this should be start_sev or start_snp, but auto detect would be be better. make the change in cube as well

Monitor the CVM interactively. Ctrl+C stops monitoring but leaves the CVM running, which makes this mode convenient for temporary observation.

```bash
./cvm-monitor.sh daemon
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-d flag would be better

Production mode - monitor runs detached in background. Use this when you want the monitor to persist across terminal sessions.

```bash
./cvm-monitor.sh background
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

daemon is a process that runs in the background, so this clashes with the previous section, daemon should be a flag (set or not set) reflect on cube

ssh -p 6190 user@localhost

# Access Ollama API
curl http://localhost:6194/api/tags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ollama should not be exposed through port forwarding, fix in cube too

Load the Cube HAL configuration using the BR2_EXTERNAL mechanism:

```bash
make BR2_EXTERNAL=../cube/hal/linux cube_defconfig
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cube does not have such a file path, please review the changes and test

Comment on lines 144 to 154
### 5. Boot Inside an SEV-SNP CVM

Use the provided scripts to launch a CVM with your HAL image:

```bash
# For AMD SEV-SNP
./qemu.sh start_cvm

# For Intel TDX
./qemu.sh start_tdx
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate of the other doc, make references instead

Comment on lines 163 to 170
# SSH into the CVM
ssh -p 6190 root@localhost

# Check Cube Agent status
systemctl status cube-agent

# Verify Ollama is running
curl http://localhost:11434/api/tags
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants