我的自定义虚拟机无法从DHCP获取IP [英] My Custom VMs not getting IP from DHCP

查看:115
本文介绍了我的自定义虚拟机无法从DHCP获取IP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用2个自定义Linux虚拟机,它们是cusotm路由器品牌,它们在部署后启动和加载

I am using 2 custom Linux VMs , they are cusotm routers brands and they boot and load fine after deployment

但是他们没有从Azure DHCP获取IP,我相信这是因为Azure Vnet连接到路由器的一个错误接口,这就是为什么我认为路由器WAN接口正在请求DHCP IP但没有获得一个(尽管Azure Vnet配置了
私有和公共IP)

however they do not get IP from Azure DHCP , i believe it is because Azure Vnet is attached to one of the wrong interfaces of the routers , thats why i think the router WAN interface is requesting DHCP IP but not getting one (although Azure Vnet is configured with private and public IP)

其他路由器更具挑剔性,默认情况下它不会请求IP并使用自己的默认静态IP(你基本上连接到任何一个)它的端口并连接到它),屏幕显示"按Enter键以配置网络"。但我没有
a意味着这样做,这实际上是对云的限制,

the other router is more challanging , by default it does not request IP and use its own default static IP (where you basically connect to any of its ports and connect to it) , the screen shows "Press Enter to configure network" but i do not have a mean of doing so , which is really a limit on cloud, 

我最好的镜头是配置Azure Vnet,其私有范围与路由器上的默认设置(但我不希望这个工作,因为我相信Azure需要DHCP租用IP并将其添加到其转发基础,即使
VM上的IP是静态正确的,Azure也没有租赁它)

my best shot would be configuring Azure Vnet with private range of the same as the default on the router (but i am not expecting this to work because i believe Azure requires DHCP to lease the IP and adds it to its forwarding base , even if the ip on the VM is statically correct , Azure did not lease it)

那么这两台路由器可以做些什么呢?如何确保Vnet正确绑定到路由器上WAN的接口

So what can be done for these 2 routers here? how can i make sure that the Vnet is bond correctly to the interface of the WAN on routers

推荐答案

嗨Krmprince, 

Hi Krmprince, 

当您将自定义VM作为映像带到Azure时,您的操作系统必须是通用的或Sysprep。这样IP地址和其他环境参数就会消失。理想情况下,一切都是自动化的,您无需在操作系统级别配置或分配IP。 

When you bring your Custom VM to Azure as Image, your OS has to be generalized or Sysprep'd. So that the IP address and other environmental parameters will be gone. Ideally everything is automated, and you don't need to configure or assign IP in the OS level. 

Azure分配私有IP如果您选择加入,则来自您的VNET地址空间和公共IP。 

Azure assigns a private IP from your VNET address space and a public IP as well if you opt for it. 

以下是参考文档:  https ://docs.microsoft.com/en-in/azure/virtual-machines/windows/upload-generalized-managed

Here is a reference doc: https://docs.microsoft.com/en-in/azure/virtual-machines/windows/upload-generalized-managed

-------------- -------------------------------------------------- -------------------------------------------

如果你发现了这个发布有用,请给它一个"有用的"投票。 

如果答案有帮助,请记得将答案标记为答案。


这篇关于我的自定义虚拟机无法从DHCP获取IP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆