Can't connect Network Interface to VM in Azure - azure

I created a VM in HyperV and modified it to be a DLP machine.
I saved the machine's disk and uploaded it to Azure on a new VM and when I tried to connect a Network Interface to the VM it didn't work, I could do that and it seemed as if it worked but when went to Networking it said:
This network interface does not contain network security groups
Which basically means it didn't set anything, also when tried to add a new NIC (Network Interface) for the third time the following error was given:
Failed to attach network interface 'Dlp-machine-NetworkINT' to virtual machine 'Dlp-machine'. Error: The number of network interfaces for virtual machine Dlp-machine exceeds the maximum allowed for the virtual machine size Standard_D2s_v3. The number of network interfaces is 3 and the maximum allowed is 2.
So it seems like the former NICs were saved but were not really applied or used.
I came to realize that what's the problem is that since the VM is using a local disk it's configured to use the local NIC.
Anyone has encountered something like this when uploading a local disk to Azure and knows what to do?

What the second error says is that your VM is limited to only 2 NICs by its SKU. You should use Standard_D8s_v3 (or some other SKU) to allow to use 4 NICs
https://learn.microsoft.com/en-us/azure/virtual-machines/windows/sizes-general#dsv3-series-1

Related

Accessing openstack instances hosted in Cloud

I'm newbie to OpenStack! I've installed Openstack in Ubuntu Server 18.04 LTS on Microsoft Azure virtual machine (for my learning purpose because I don't have the required resources like 16GB RAM and 4 CPUs). I'm able to access the Openstack Dashboard with the help of public ip address of that VM using the browser in my machine. I've assigned floating ip address to the instance (here it is 172.24.4.8).
My instance specs are
This is my network topology and my azure virtual machine's network configurations
azure vm's private ip = 192.168.0.4
azure vm's public ip = 20.193.227.12
I can access the OpenStack Dashboard using azure vm's public ip address, But I'm unable to access the instance via SSH from my local machine and from that azure virtual machine too. Help me how to access them!
From your network topology screenshot, I guess that you used Devstack to create the cloud. Can you confirm that?
The external network named public is not connected to the world outside the cloud in any way. This is so because by default, Devstack creates an isolated external network for testing purposes. You should be able to access the instance from the Azure VM, however. The information given is not sufficient to explain why you can't.
See the Devstack networking page. It states that the
br-ex interface (...) is not connected to any physical interfaces
This is the technical reason for not being able to access instances.
The Shared Guest Interface section of the above page documents how to connect a Devstack cloud to a real external network.
EDIT:
The Shared Guest Interface instructions ask you to set this:
PUBLIC_INTERFACE= NIC connected to external network. *eth0* in your case.
HOST_IP= *192.168.0.4* for you
FLOATING_RANGE= Your netmask is 255.255.255.128, which translates to a network prefix of 25,
I think. If I am right, the value is *192.168.0.0/25*.
PUBLIC_NETWORK_GATEWAY= The IP address of the router on the *192.168.0.0/25* network.
Q_FLOATING_ALLOCATION_POOL= The range of addresses from FLOATING_RANGE
that you want to use as floating IPs for
your OpenStack instances.
FLAT_INTERFACE might be an old setting for the defunct Nova-Network service. I don't see it mentioned at all in the Ussuri version of Devstack.

How to configure the endpoints for the "new" windows azure virtual machine?

I've just created a "new" virtual machine in Windows Azure. I say "new" because there is a "Virtual Machine (classic)" option.
The "new" virtual machine is not accesible by the "old" https://manage.windowsazure.com, it's only accesible by the "new" https://portal.azure.com
My problem is that I've expent a couple of days configuring the "new" Virtual Machine and now I want to open the port 80... but I don't find the "endpoint" configuration!!
I've been looking for it many hours :S
Any clues?
Azure Resource Managed VMs now use the concept of Network adapters, Virtual Networks and Security Groups to manage ingress, egress from a machine.
A virtual machine has a network adapter attached, the adapter is placed within a subnet within a virtual network. A security group can then be placed against the subnet and / or the network adapter.
The network adapter can optionally have a publically accessible address bound to it. Either dynamically or statically bound (i.e. if you take a fixed address, you will be charged for it for when the machine isn't running)
I'm not entirely sure its possible to create a security group via the portal (at least I couldn't find any option for it when I just (albeit briefly) looked.
However you can use New-AzureNetworkSecurityGroup to create a security group and then attach it to your Nic through the portal and also configure the security policy. Which you get to via -
Virtual machines -> VNMame-> Settings -> Network interfaces -> NicName -> Choose network security group
It is a little more complicated than the previous method, but once you're used to it it is a lot more flexible.
Edited to add
Depending on your config, you might need to a public IP address attaching also - use New-AzurePublicIpAddress
It's all good. The get-help wasn't up to date and optional params are actually needed. Just make sure to use all params

creating an image changes the network adapter name

I have a VM which have a network adapter called 'Ethernet'.
When I create an image from this VM, any VM that I create from that image have only one network adapter named 'Ethernet 2'.
How can I force it have the same network adapter name?
Thank you very much for your help!
This is expected behavior. Network adapter would also change if your VM is healed (i.e. the underlying hardware fails and your image is re-instantiated on a new one). This will also happen if you scale the VM (change the VM size). Changing the name of the network adapter also would happen sometimes when you shutdown the VM (from the portal, which would also de-allocate resources).
Even if the above mentioned limitations are fixed (today, or in the future). I would not rely on using specific name for the adapter in my application.
Even with the recently added feature to have multiple NICs, as described here, you cannot influence the name of the NIC which the OS uses:
The interface name must be unique for the VM, but does not represent
the names of the NICs inside the VM.
It is important to know that the settings for the NIC you dictate from your Virtual Network setup (DNS, IP Address, Subnet Mask) are guaranteed to be taken by your VM. So why the need for specific network adapter name. Also, keep in mind that you should never manually change the network settings inside an Azure VM.

Moving primary domain controller to a different Azure virtual network

I have created an Azure virtual network with a specific address space - 10.0.0.0/8. I created a subnet beneath it, 10.10.0.0/16, and added several machines to this subnet, including a PDC and a BDC, which are also acting as DNS servers.
Unfortunately, that is not exactly what I meant to do, I meant to create the address space as 10.10.0.0/16, with the intent of connecting it to some other virtual networks using S2S VPN gateways. The other virtual networks are set up using address spaces configured as: 10.x.0.0/16
To rectify the situation, based on what I could find here and on MSDN, I created a new virtual network in the same region with the correct address space (10.10.0.0/16), then deleted the VMs in the old virtual network (but left the VHDs) and recreated the VMs in the new virtual network using the old VHDs.
This seems to be working as expected. Now I am down to the domain controllers and one other machine. Will there be any issues with following the same process to move a domain controller? I realize the system GUID will be different, but was not sure if this impacts anything relative to AD and the DNS servers.
TIA for you help.
Looks like no impacts from the AD perspectives. From a DNS perspective, Azure assigned IP addresses to the machines in the order that they were restarted, so to avoid confusing DNS, I restarted the VMs in order of increasing IP address.
Needed to make sure SQL Server data volumes were attached before starting the machine, otherwise the database would show as being in a pending recovery state.
Also, apps that depend on MAC address (such as some license servers) did require new license files, as the MAC address changed.

Can't access Azure VM

I was trying to change the network numbers address of my Virtual machine on Azure to be in same network rang as another Virtual machine on Azure pool, once I click save on network card, it freezes & became not accessible with Remote Desktop or any other way.
Please Help.
NEVER try to manually change the NIC. The NIC is still owned by the Windows Azure fabric and when you manually make changes, the fabric interprets it as an attempt to bypass its network security measure. You should be able to get access to the VM back by removing and re-adding the VM (when you remove it, be sure not to remove its disks then you can re-provision it from those same disks).
If you're trying to adjust network address spaces (subnets?), you may want to look at using an Azure virtual network to help group VMs together. While this still won't guarantee a fixed internal IP address, it will give you a degree of predictability.

Resources