azure-virtual-machine

Azure VM not connecting to Azure Redis Cache but local is connecting to Azure Redis Cache

故事扮演 提交于 2021-01-29 12:40:30
问题 The same Azure Redis cache is getting connected from local machince. The port 6380, on which cache is running is open in firewall of both inbound and outbound in the VM. I tried in both NodeJs and Java. Both are connecting to remote Azure Redis from local and the exact same code for NodeJS and Java is not connceting to Azure Redis cache from VM. Java config: spring.redis.host=my-cache.redis.cache.windows.net spring.redis.password=<password> spring.redis.port=6380 spring.redis.ssl=true NodeJS

Not able to fetch custom Metrics (for Azure Linux Virtual Machine) using Azure Monitor REST API

一世执手 提交于 2021-01-29 09:12:18
问题 I have configured Diagnostic Settings and Insights to get the Custom Metrics. After configured, I get the Custom Metrics Namespace and Metrics also display the data. But when I try to fetch the same metric data using the Azure Monitor REST API (https://docs.microsoft.com/en-us/rest/api/monitor/metrics/list) then I'm unable to fetch data because "Custom metric Namespace and Metric name" are not available for Linux Virtual Machine. Example for Windows VM: Metric Namespace for Windows VM: "Azure

Unable to copy a binary to a remote Azure VM

不想你离开。 提交于 2021-01-29 07:52:06
问题 I have a Shavlink agent binary from on-prem(VMWare) that has to be copied across to a Azure VM(s). I used the public VM of the target Azure VM to perform the copy: Copy-Item –Path "C:\ProgramData\LANDESK\Shavlik Protect\Console\DataFiles\STPlatformUpdater.exe" –Destination "D:\Shavlik-Agent\" –ToSession (New-PSSession –ComputerName a.b.c.d) Unfortunately, it gives error as below: New-PSSession : [a.b.c.d] Connecting to remote server a.b.c.d. failed with the following error message : The WinRM

Azure Windows VM - how can I find out what Resource Group it is in?

妖精的绣舞 提交于 2021-01-28 04:27:56
问题 I have C# code running on an Azure Windows VM. Is there a way for me to find out what Resource Group this VM is in? VM has been deployed with Azure Resource Management API (new, not classic) 回答1: The following will guarantee the ability to distinguish between vm's with the same name across different resource groups: From your C# code, find the vmId (involves running one of the commands at the following link or possibly using an Azure SDK: https://azure.microsoft.com/en-us/blog/accessing-and

How to set a custom domain for Azure Virtual Machine?

天大地大妈咪最大 提交于 2021-01-20 12:49:23
问题 I have an Azure Virtual Machine which has myvmname.northeurope.cloudapp.azure.com set as a DNS name. I want it to be something like somename.my.domain.com . I am an owner of my.domain.com . How do I change it on the portal for the VM? Did I get stuck with default provided one? Docs are not clear for VMs. 回答1: Azure VM has a default FQDN that you only could change the DNS label. If you want to add your own custom domain for that Azure VM, you could add a CNAME type DNS record like somename.my

Run command in linux vm in azure using python sdk

我怕爱的太早我们不能终老 提交于 2020-08-02 20:47:29
问题 I have found that azure python sdk has provided following method for running command in linux vm. from azure.mgmt.compute import compute_management_client from azure.common.credentials import ServicePrincipalCredentials credentials = ServicePrincipalCrendentials(client_id, secret, tenant) client = compute_management_client(credentials, subscription_id) client.virtual_machines.run_command(resource_group_name, vm_name, parameters, customheaders=None, raw=False, **operation_config) But how do I

Using cloud-init on an Azure VM to mount a data disk fails

随声附和 提交于 2020-07-22 05:27:05
问题 This is a similar problem to a previous SO question, from which I adapted my code How can i use cloud-init to load a datadisk on an ubuntu VM in azure Using a cloud-config file passed through Terraform: #cloud-config disk_setup: /dev/disk/azure/scsi1/lun0: table_type: gpt layout: true overwrite: false fs_setup: - device: /dev/disk/azure/scsi1/lun0 partition: 1 filesystem: ext4 mounts: - [ "/dev/disk/azure/scsi1/lun0-part1", "/opt/data", auto, "defaults,noexec,nofail", ] data "template_file"