简体   繁体   English

在MAAS中设置cloud-config-url的IP地址

[英]Setting ip address of cloud-config-url in MAAS

I'm trying to set up a group of VM's using MAAS with vagrant and virtualbox using a host only network shared between the VMs. 我正在尝试使用VMA在VMA之间共享的仅主机网络,使用vagrant和virtualbox来设置一组VM。 I'm trying to get the node VMs to use PXE to install the operating system. 我正在尝试使节点VM使用PXE来安装操作系统。 I've got the node VMs to start PXE booting by setting up DHCP on the controller VM and forcing the node VM to boot from the second nic. 我已经通过在控制器VM上设置DHCP并强制节点VM从第二个网卡引导来启动PXE引导。 The installation gets part of the way through before stopping when cloud-init tries to download the config. 当cloud-init尝试下载配置时,安装将在停止之前完成一部分工作。 My Vagrant file is at https://gist.github.com/pj/3db0fe2e87cf35d4f6ffb37a5b5b8bb6 . 我的Vagrant文​​件位于https://gist.github.com/pj/3db0fe2e87cf35d4f6ffb37a5b5b8bb6

As far as I can tell, MAAS is delivering the address to cloud-init through the cloud-config-url boot parameter. 据我所知,MAAS正在通过cloud-config-url引导参数将地址传递给cloud-init。 From looking at the output when the PXE node tries to boot I can see that the address being delivered contains the ip address of the NAT nic that Vagrant automatically creates for VMs, not the ip address of the host-only network which was used for DHCP and to deliver the PXE boot files. 通过查看PXE节点尝试引导时的输出,我可以看到传递的地址包含Vagrant自动为VM创建的NAT nic的ip地址,而不是用于DHCP的仅主机网络的ip地址。并提供PXE引导文件。

Is there a way to change the ip of the cloud-config-url boot parameter? 有没有办法更改cloud-config-url引导参数的ip? In the MAAS source it seems like this is derived from some part of the RackController config, but I couldn't trace where it was set from. 在MAAS源代码中,这似乎是从RackController配置的某些部分派生的,但是我无法跟踪它的设置位置。

Okay figured it out, I needed to set the url for the rack and region controller using the following commands: 知道了,我需要使用以下命令为机架和区域控制器设置url:

    sudo maas-region local_config_set --maas-url="http://192.168.50.2:5240/MAAS"
    sudo maas-rack config --region-url="http://192.168.50.2:5240/MAAS"

In our setup, instead of forcing slave nodes (the one that PXE-booted and managed by MAAS controler) to use host-network IP as shown above, we have made the MAAS controller a router for its managing subnet. 在我们的设置中,没有像上面所示那样强迫从属节点(由MAA控制器PXE引导和管理的从属节点)使用主机网络IP,而是使MAAS控制器成为其管理子网的路由器。 This is a more robust configuration and closer to an actual environment. 这是更健壮的配置,更接近实际环境。

From what we have seen, these nodes, once PXE-booted, need internet access in order to load more packages on top of OS. 从我们所看到的,这些节点,一旦PXE引导,就需要Internet访问,以便在OS之上加载更多软件包。 Otherwise, they can be in an intermediate state and never finish "deploy" until a timeout error. 否则,它们可能处于中间状态,并且永远不会完成“部署”,直到出现超时错误为止。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM