简体   繁体   English

如何将现有Linux虚拟机添加到Azure中的虚拟网络

[英]How to add an exisiting Linux virtual machine to virtual network in Azure

I have configured a CMS solution in my Linux Virtual Machine on Azure and want to add this VM with my Virtual Netork. 我已经在Azure上的Linux虚拟机中配置了CMS解决方案,并希望将此虚拟机添加到Virtual Netork。 I am unable to add my existing Linux Virual machine to Virtual Network. 我无法将现有的Linux Virual计算机添加到虚拟网络。

Any help is greatly appreciated. 任何帮助是极大的赞赏。

As your Linux VM was created first and Virtual Network (VNet) was created after, your Linux VM may not be able to see the Virtual Network.(This is a known issues with Linux VM) 由于首先创建了Linux VM,之后又创建了Virtual Network(VNet),所以Linux VM可能无法看到虚拟网络。(这是Linux VM的已知问题)

You can follow given steps to achieve your objective: 您可以按照给定的步骤实现目标:

  1. Delete the current VM (this will still keep the VHD stored in Azure Storage) 删除当前虚拟机(这仍将VHD存储在Azure存储中)
  2. Now go to Virtual Machines > Disks, and find the OS disk you want to use and select Delete Disk. 现在转到“虚拟机”>“磁盘”,找到要使用的OS磁盘,然后选择“删除磁盘”。 This does not delete the VHD, only unregisters it as a disk 这不会删除VHD,只会将其注销为磁盘
  3. Now create an OS image from your Saved VHD, which was use for previous VM 现在从您保存的VHD创建一个操作系统映像,该映像用于以前的VM
  4. Now create a VM from OS image (#3) 现在从OS映像创建虚拟机(#3)

This way you will have your VM ready and now to add it to VNet. 这样,您就可以准备好VM,现在将其添加到VNet。

Now because you are using Linux VM to connect with VNet, there is one problem. 现在,因为您正在使用Linux VM与VNet连接,所以存在一个问题。 You can not do it with your Linux VM as Windows Azure Manager Portal does not support this feature so you would need to use PowerShell command (on Windows) or Cross-Platform tools (on Mac and Linux) to achieve your objective. 您不能使用Linux VM来完成此操作,因为Windows Azure Manager Portal不支持此功能,因此您需要使用PowerShell命令(在Windows上)或跨平台工具(在Mac和Linux上)才能实现目标。

Following are the command you will use to create a new VM using an OS Image and Virtual Network: 以下是用于使用OS映像和虚拟网络创建新VM的命令:

$vm = New-AzureVMConfig -Name $vmname -InstanceSize ExtraSmall -ImageName $image | $ vm = New-AzureVMConfig-名称$ vmname -InstanceSize ExtraSmall -ImageName $ image | Add-AzureProvisioningConfig -Linux –LinuxUser $linuxUser -Password $adminPassword | Add-AzureProvisioningConfig -Linux –LinuxUser $ linuxUser -Password $ adminPassword | Set-AzureSubnet -SubnetNames $subnet Set-AzureSubnet -SubnetNames $ subnet

New-AzureVM -ServiceName $cloudSvcName -AffinityGroup $affinitygroup -VNetName $vnetname -VMs $vm New-AzureVM -ServiceName $ cloudSvcName -AffinityGroup $ affinitygroup -VNetName $ vnetname -VMs $ vm

http://www.zdnet.com/blog/microsoft/microsoft-to-enable-linux-on-its-windows-azure-cloud-in-2012/11508 http://www.zdnet.com/blog/microsoft/microsoft-to-enable-linux-on-its-windows-azure-cloud-in-2012/11508

To date, Microsoft has been balking at customer requests to add persistent VMs to Azure, hoping to get customers to develop Azure apps from scratch instead ... 迄今为止,Microsoft一直拒绝客户向Azure添加持久性VM的请求,希望以此代替客户从头开始开发Azure应用...

Running Linux on Azure has been a surprisingly big business-customer request, as well, my contacts said ... 我的联系人说,在Azure上运行Linux也是一个令人惊讶的大企业客户要求。

The Register reported earlier this year that Microsoft was testing the ability to run Linux on Azure in its own labs, and that the launch of such a capability was still months away. Register在今年早些时候报道说,微软正在自己的实验室中测试在Azure上运行Linux的功能,而这种功能的发布还需要几个月的时间。

There are tons of VPS services out there where you can run any OS you want, quite reliably and quite inexpensively. 那里有大量的VPS服务,您可以在其中可靠,便宜地运行所需的任何OS。 Apparently, Azure isn't one of them :) 显然,Azure并不是其中之一:)

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

相关问题 如何向Azure虚拟机规模集添加第二个网络接口? - How to add a second network interface to an Azure Virtual Machine Scale Set? 有没有办法给azure的另一个资源组的虚拟机添加网络接口? - Is there a way to add a Network interface to a Virtual Machine of another resource group in azure? 如何将用户添加到Azure虚拟网络 - How to add users to the Azure Virtual Network 如何在Windows Azure(虚拟机)中检查网络总流量 - How to check for network total traffic in Windows Azure (Virtual Machine) 如何在Azure中连接到在Linux虚拟机上运行的mysql服务器 - how to connect to a mysql server running on a linux virtual machine in azure Azure上的Linux虚拟机 - 如何应用IP限制 - Linux Virtual Machine at Azure - how to apply IP restriction 从 Linux 虚拟机如何检测/识别 Azure 平台 - From Linux Virtual machine how to detect/identify Azure platform 用于灾难恢复的虚拟机,虚拟网络和存储的PowerShell Azure IaaS导出 - PowerShell Azure IaaS export of Virtual Machine, Virtual Network and Storage for DR Microsoft Azure无法将虚拟网络分配给虚拟机 - Microsoft Azure Can not assign virtual network to virtual machine SSH 到 Azure Linux 虚拟机时遇到问题 - Trouble sshing into Azure Linux Virtual Machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM