azure-virtual-machine

How to Bulk-Add Azure endpoints?

风格不统一 提交于 2019-12-30 08:17:09
问题 I've got an FTP server running on Azure. I had to manually add in 20 endpoints for the 'data' connection. It was painful. Surely there's a better way to bulk add endpoints to an Azure VM, somehow? If so, could someone list some instructions? I'm open to anything. eg. I would love to create TCP public port 61020 - private port 61020 to TCP public port 61100 - private port 61100 hmmm.... 回答1: You can do this with PowerShell. A just tested script: Add-AzureAccount Select-AzureSubscription

Attaching restored OS disk to existing VM

六眼飞鱼酱① 提交于 2019-12-25 16:54:26
问题 I have one VM with a daily backup scheduled. Today I deleted a file in that VM and changed some configuration. I restored yesterday's data disk from my recovery service vault and changed the names of the recovered data disk. Now I want to attach yesterday's restored backup to my existing VM. Is it possible? If not then suppose I delete my VM but I keep its network interface card. I can create a new VM from restored VHDs using ARM templates but how can I assign an existing NIC to my new VM?

SFTP RSA authentication in Azure VM

徘徊边缘 提交于 2019-12-25 16:53:30
问题 Requirement- Connecting SFTP server from local windows machines using WinSCP with keys Technical- I have Azure VM(Windows 2012 server R2) in which Cygwin64 is installed for SFTP. I want to connect SFTP server using RSA authentication i.e using keys. I have edited the sshd_config file for RSA authentication. In cygwin64 folder I have also created .ssh folder and under that Authorized_keys file. From local machine using putty I have generated Public and private keys and this public key I have

Issues deploying dscExtension to Azure VMSS

我们两清 提交于 2019-12-25 10:25:08
问题 I've been having some issues deploying a dscExtension to an Azure virtual machine scale set (VMSS) using a deployment template. Here's how I've added it to my template: { "name": "dscExtension", "properties": { "publisher": "Microsoft.Powershell", "type": "DSC", "typeHandlerVersion": "2.9", "autoUpgradeMinorVersion": true, "settings": { "ModulesUrl": "[concat(parameters('_artifactsLocation'), '/', 'MyDscPackage.zip', parameters('_artifactsLocationSasToken'))]", "ConfigurationFunction":

How to restrict access to some public websites

冷暖自知 提交于 2019-12-25 09:40:21
问题 I am new to cloud computing. Sorry if this is a silly question. I have created a VM from azure portal. My requirement is not to allow the user using the VM to access public website. Can anyone help me how to achieve this functionality? Thanks 回答1: You probably have a Network Security Group that was created when you created the VM. In there you can specify rules for inbound and outbound data traffic. Find the NSG and add a rule that blocks all outbound traffic from the VM. You should still be

How to restrict access to some public websites

痞子三分冷 提交于 2019-12-25 09:40:09
问题 I am new to cloud computing. Sorry if this is a silly question. I have created a VM from azure portal. My requirement is not to allow the user using the VM to access public website. Can anyone help me how to achieve this functionality? Thanks 回答1: You probably have a Network Security Group that was created when you created the VM. In there you can specify rules for inbound and outbound data traffic. Find the NSG and add a rule that blocks all outbound traffic from the VM. You should still be

Disable VPN gateway in Azure classic VM virtual network

爷,独闯天下 提交于 2019-12-25 07:38:03
问题 While trying Azure VM migration from ASM to ARM, I realized that "Configure point-to-site connectivity" is checked (so we can say VPN gateway is configured) to the network settings even though I does not have any connection to the VPN gateway. The network is in use description is displayed in old portal and it still remains after deallocating the VM. Unchecking then save action gives failure as expected by using PowerShell command and Portal. How to disable this setting? Do I have to recreate

login to azure account without popup using powershell

守給你的承諾、 提交于 2019-12-25 02:28:28
问题 I'm trying to create Azure VM using powershell.I have also the script to create it. First I need to login into Azure account : Login-AzureRMAccount This gives a pop-up to enter the credentials. Second I need to run the below script: $UserName = "username" $Password = ConvertTo-SecureString "password" -AsPlainText -Force $psCred = New-Object System.Management.Automation.PSCredential($UserName, $Password) New-AzureRmVm ` -ResourceGroupName "RG1" ` -Name "VM1" ` -ImageName "Image1" ` -Location

Azure Availability sets, Fault Domains, and Update Domains

落爺英雄遲暮 提交于 2019-12-25 01:34:50
问题 I'm Azure newbie and need some clarifications: When adding machines to Availability set, in order to prevent VM from rebooting, what's best strategy for VM's, put them in: -different update and fault domains -same update domain -same fault domain ? My logic is that it's enough to put them in diffrent update AND fault domain I used this as reference:https://blogs.msdn.microsoft.com/plankytronixx/2015/05/01/azure-exam-prep-fault-domains-and-update-domains/ Am i correct ? These update/fault

delete specific resource i.e, vm,nic,nsg using terraform

a 夏天 提交于 2019-12-25 00:47:21
问题 I have created azure vm ,nic ,nsg inside the firewall. Now i need to delete specific created vm,nic,nsg inside the firewall. This i will be doing continuously. When i try i delete with specific vm,ns,nic with below, but it is deleting total resource group. terraform init terraform apply -no-color -auto-approve terraform destroy -force My code: # Configure the Microsoft Azure Provider provider "azurerm" { subscription_id = "xxxxx" client_id = "xxxxx" client_secret = "xxxxx" tenant_id = "xxxxx"