-
Notifications
You must be signed in to change notification settings - Fork 0
vsock guest agent: runtime resource adjustment and network auto-configuration #8
Copy link
Copy link
Open
Description
Background
Currently clone/restore supports increasing CPU/Memory/Storage at creation time, but the guest requires manual operations to take effect (online CPU, resize2fs, MAC/IP reconfiguration, etc.). Runtime scaling (CH vm.resize) also faces guest awareness challenges.
Proposal
Establish a host↔guest control channel via vsock (AF_VSOCK), running a lightweight agent inside the guest:
Network Auto-Configuration (Clone Scenario)
- Host notifies agent of the new MAC/IP configuration via vsock
- Agent executes
ip link set dev ethN address NEW_MAC+ IP reconfiguration - Replaces current manual post-clone hints
Runtime Resource Adjustment
- CPU hotplug: Host calls CH
vm.resize, then notifies agent →echo 1 > /sys/devices/system/cpu/cpuN/online - Memory: virtio-mem kernel driver handles it automatically; balloon requires agent coordination
- Disk resize: Host resizes COW, then notifies agent →
resize2fs/xfs_growfs
Vertical Scaling Loop
Monitoring → trigger scaling → CH resize API → vsock notification to agent → guest auto-adapts, no restart required.
Alternative Approaches Comparison
| Approach | Applicable To | Limitations |
|---|---|---|
| cidata/cloud-init bootcmd | cloudimg one-time initialization | Boot-time only |
| kernel cmdline | OCI direct boot parameter passing | Read-only, boot-time only |
| virtiofs shared directory | Config file delivery | Requires polling, not real-time |
| vsock agent | All scenarios, runtime | Requires agent installed in guest |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels