canonical/multipass

Can I pass network configuration using cloud-init?

Open

#3,947 创建于 2025年2月21日

在 GitHub 查看
 (5 评论) (1 反应) (0 负责人)C++ (634 fork)batch import
cloud-initdocumentationhelp wantedlow hanging fruitmedium

仓库指标

Star
 (6,956 star)
PR 合并指标
 (平均合并 16天 2小时) (30 天内合并 50 个 PR)

描述

The cloud-init docs state:

You can pass the user-data file to Multipass and launch a Bionic instance named test-vm with the following command:

multipass launch bionic --name test-vm --cloud-init user-data
Multipass will validate the user-data configuration file before starting the VM. This breaks all cloud-init configuration formats except the user-data cloud-config.

But if I try to include network config in a user-data file I get:

Error: Cloud config schema errors: network: Additional properties are not allowed ('network' was unexpected),

I would be grateful if someone could let me know whether what I am trying to do is even possible with the multipass implementation of cloud-init? Does the statement 'this breaks all cloud-init configuration formats except...' mean that this isn't possible?

My use case is that I am trying to use cloud-init with ubuntu on a raspberry pi and am having issues with network configuration. I decided to try multipass to see if I could debug the issue locally without juggling sd cards. I'm finding all the docs to be pretty vague and unhelpful.

I also tried providing a list of files to multipass (a separate network-config file) but this also didn't work.

I'm guessing that the networking side of multipass vms is baked in to the application to enable host->vm networking but would be grateful if someone could confirm.

贡献者指南