First I've captured image of my Azure windows virtual machine see, then I created two new virtual machines(VM1, VM2) from this captured image. Now I want to do load balancing with these 2 virtual machines see. But the "LOAD-BALANCE TRAFFIC ON AN EXISTING ENDPOINT" option is disabled (I added the endpoint in VM1) also my availability set is not showing under "AVAILABILITY SET" option in VM2.
If I do the same process by creating virtual machine from the Gallery, and follow the steps from here, it worked for me.
Is there any power shell command or other way to load balance?
Please help me.
Thanks
Kapil
You need both the virtual machines to be under the same cloud service. Only then you get the option to load balance them. There is no way add existing VMs to the same network. there are operations in the Service management API (usable through powershell) to create a new VM. You can use that to create a fresh VM from your existing image and connect it to the same service as your first VM. Then you'llhave the necessary options enabled for load balancing.
Related
I have created my infrastructure through Terraform, the relevant (Azure) resources are
Application Gateway
VMSS (Virtual Machine Scale Set)
Windows VMs => Created/Destroyed by VMSS (Windows VM are in private
subnet, and HTTPS access is through Application Gateway)
Ubuntu based Bastion Host (for RDP and ansible configuration)
So far I am able to configure one of my windows VM through Ansible using psrp protocol, but that was only possible because I knew the private IPV4 of my VM (added the private IP to host file of bastion vm). How can I do it without knowing the IP address(es)?
My other question is how will the Ansible know a new VM has been created and it needs to be configured?
Edit
If you think this is not the best approach, please guide me on how to do it properly? Should I use Packer with custom image? OR is there any other option? The main configuration I want to do is enable IIS and install a few programs like GIT.
Thank you.
The best way IMO is to use a dynamic inventory. Although the doc examples are detailed for clobber and EC2, you will find more info on the included scripts with examples for Azure.
Once you have your dynamic inventory in place, you can refresh it with meta: refresh_inventory whenever you need to.
I'm learning Azure and I'm trying to connect a load balancer to the virtual machine instances I have created that are using the same resource group and within the same availability set but the target virtual machine options within the dialog are not available. Am I missing something perhaps? This is a free trial account.
Is there something I've missed perhaps?
Many thanks,
Basic VMs are not eligible for load balancing. You need to use Standard VMs.
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/sizes-previous-gen#basic-a
Can I add existing virtual machine to virtual network?
I have seen this link
http://blogs.msdn.com/b/walterm/archive/2013/05/29/moving-a-virtual-machine-from-one-virtual-network-to-another.aspx
and it asks to unattach disk and delete and then create new virtual machine.
Which is impossible in production environment vm.
Any other way to do it?
No, no other option for time being (2014-09-05).
As already suggested, you may try with opening a support ticket, but I doubt that would also help. Before all, Virtual Networks are associated with Affinity Groups. An absolute requirement is that the VHD for the VM uses storage account in the same Affinity Group as the Virtual Network, as well as the Cloud Service that hosts the VM should be also in the same Affinity Group.
To conclude, you have slight chance to solve the issue with support ticket if your new VM and its VHDs are in the same Affinity Group as the Virtual Network. If they are not (either the VM or the VHDs), then your only option is delete and recreate.
Scenario:
I have a website on Windows Azure. That website needs to connect to a (new) Azure VM.
I have done the following:
Created new Virtual Network on Azure
Added the VM to the Virtual Network, and it does get an IP in the virtual network.
I have configured the appropiate Endpoint for the VM (Public/Private port).
Now, how do I "connect" the Azure website to the same virtual network, such that my .NET code in the website can create a TCP connection to the VM on it's IP on the Virtual Network ?
This is now possible. Be sure to use the NEW Azure Portal. For details, check out:
http://azure.microsoft.com/blog/2014/09/15/azure-websites-virtual-network-integration/
Currently you cannot connect/add Azure Web Site to a Virtual Network. You can only add VMs and Cloud Services to a Virtual Network. However this is a demanded feature and I believe we will see it in the future releases of the Web Sites service (my speculation).
The key here is to create the Virtual Network before the Virtual Machine and then place the VM in the VN during it's creation. The article here gives instructions moving a VM into a VN.
http://blogs.msdn.com/b/walterm/archive/2013/05/29/moving-a-virtual-machine-from-one-virtual-network-to-another.aspx
In the new portal I created several new VM's.
During deployment I can get an option to create a stand alone machine or connect to another machine.
But whatever choice I make there is no connectivity between the machines.
Is is possible to connect them to the same VMnwetwork/VLAN?
I want to test two servers in a setup in which they communicate with each other.
Yes, you have 2 options here:
Create a Virtual Network
Add the VM in an existing Cloud Service (mainly used for load balancing)
Note that pinging might not work without opening a port on the Windows Firewall (source)