Quantcast
Channel: Azure Virtual Machines forum
Viewing all 12545 articles
Browse latest View live

Update-AzVM slow when run from remote powershell

$
0
0

Hi all,

I am creating a script which tags VM's based on responses of a powershell form (it tags start and stop times for use with automation).

I am finding the performance when running from powershell on my local computer is pretty pants. It takes around 1min 15 seconds to run the update-azvm to update the tag values on the target VM.

At the start of the script, I clear off all the tags relating to start stop times, then apply the changes with update-azvm. I've copied this part of the code as its the shortest bit:

$VMName = "vmstartstoptest"
$RGName = "RG-NP-UKS-STARTSTOPTEST"

    $ScheduleTags = "Daily_Start",`
                    "Daily_Stop",`
                    "Weekday_Start",`
                    "Weekday_Stop",`
                    "Weekend_Start",`
                    "Weekend_Stop",`
                    "Monday_Start",`
                    "Monday_Stop",`
                    "Tuesday_Start",`
                    "Tuesday_Stop",`
                    "Wednesday_Start",`
                    "Wednesday_Stop",`
                    "Thursday_Start",`
                    "Thursday_Stop",`
                    "Friday_Start",`
                    "Friday_Stop",`
                    "Saturday_Start",`
                    "Saturday_Stop",`
                    "Sunday_Start",`
                    "Sunday_Stop"

    $vm = Get-AzVM -ResourceGroupName $RGName -Name $VMName

    foreach ($SchTag in $ScheduleTags)
    {

        $TagExists = $vm.tags.ContainsKey($SchTag)

            
        if ($TagExists -eq 'True')
        {
            $vm.tags.remove($SchTag)
        }
    }

     Update-AzVM -ResourceGroupName $RGName -VM $vm -tag $vm.tags | Out-Null

If I run this same code from within Azure Powershell, its still not quick, but completes in around 30 seconds, so its well over twice as quick.

I am on a decent internet connection so connection speed shouldn't be an issue.

Does anyone know why the update-vm command is so slow from a powershell session running on a remote computer?

Thanks in advance

Dave


Unable to connect to Server 2016 with WMI

$
0
0

I have created and started a new server from the following image:

Active Directory Domain Controller 2016

This image automatically opens the firewall for WMI and enables remote management, however; I am unable to connect with WMI.  I am able to connect with other network protocols.

Active Directory Domain Controller 2016

A question about Azure “Virtual Machine Contributor” role

$
0
0

Azure has defined three RBAC roles regarding virtual machines: Virtual Machine Administrator Login, Virtual Machine Contributor, and Virtual Machine User login. For the moment, it seems that the two ‘Login’ roles are only applicable to Linux virtual machines (Preview: Log in to a Linux virtual machine in Azure using Azure Active Directory authentication http://docs.microsoft.com/en-us/azure/virtual-machines/linux/login-using-aad).

By the definition, the “Virtual Machine Contributor” role is used to manage a virtual machine, but without access to the VM. The access to a Windows VM requires the use of local accounts defined on the VM through RDP sessions. However, Azure provides a few of remote access abilities to a Windows VM directly from Azure side, for example running any Powershell script through Custom Script Extension. As long as an AAD user has been assigned the Virtual Machine Contributor role, he/she can run Powershell scripts on a Windows VM with ‘NT AUTHORITY\SYSTEM’ privilege. Is this not full access to the VM?

An AAD user with the Virtual Machine Contributor role can also reset the local administrator through VMAccess extension. With the local admin password, he/she can also access the VM through RDP.

Why is the “Virtual Machine Contributor” defined/claimed for manage purpose only without access?

Issue with port being blocked on VM.

Loosing RDP when i connect VPN on azure VM

$
0
0

Hi All, 

I have one azure VM and I need to install one VPN in azure VM, I need to enable it and connect to another server so I am connecting to azure VM through RDP and the moment i enable vpn my rdp session is disconnecting, could anyone please help to know the required configurations for it

thanks 



Azure Hybrid with Software Assurance

$
0
0

Hi all,

i have some question to understand azure hybrid for my vm. At the moment we have SA contract with this windows datacenter licence:

23 x CISSteDCCore ALNG SA MVL 2Lic CoreLic

I red documentation and i did this calculation:

- 1 of CISSteDCCore ALNG SA MVL 2Lic CoreLic is good for  maximum 16 core (8 core x 2 socket)

so, can i licence on azure 368 core(16core x 23licence)? (the best situation is to licence on azure, 46 vm with 8 core or 23 vm with 16 core each to optimize cost)

If i use hybrid and enable all 23 licence on azure, i have to buy other licence for onpremise or i can run on both environment vm with only 23 licence?

Thanks

SCCM Deployment in AZURE

$
0
0

HEllo

We are planning to deploy entireSCCM  infrastructure from scratch in azure. Is there any reference architecture?

Also Does SCCM has dependencies on windows Active Directory(Domain controllers)? Can I use Azure AD ?

Also I will need SQL server? Can I use azure SQL DBaaS or do I need to have SQL server n a VM in azure?

In order to push the application to devices what is recommended VPN or Express route? 

Moving Biztalk VM to Azure

$
0
0

Team,

Can anyone provide me insight on the In scope and Out of scope for BizTalk VM migration into Azure VM.

Thank you for your support.

Regards

Srik


How to move my domain name from another service provider to azure virtual windows server

$
0
0
Hello , 

I have a domain name . The domain name located a virtual server  which is provide another service provider.

İ want to move the my domain name into azure virtual windows server .

There is some information   but that is not covered my request .

Could you please help me how to move my domain to azure virtual windows server ?

Thanks in advance 

Regards

Adnan

Accessing multiple website on Azure VM IIS

$
0
0
I am creating VM via arm template. The VM is running fine. I have created three different websites apart from default website in IIS. I have configured host headers for three website in bindings. And added an alias as CNAME record in local DNS for these host headers.I am able to brows all the websites locally on vm. When I am browsing websites using public IP or Azure provided dns name ,it is pointing to default website. Now I want to access the other three website from public internet too, there I am stuck...

the Shared Gallery Image to which to publish the managed image version to does not exist in the resource group

$
0
0

Hi, 

I am trying to move VM image from one RG to Shared Image gallery using packer. But am getting the following error. 

The Shared Gallery Image to which to publish the managed image version to does not exist in the resource group.

Kindly suggest me any solution for this. 

Please find the script below.

{
  "builders": [{
    "type""azure-arm",
    "client_id""",
    "client_secret""",
    "subscription_id""",
    "tenant_id""",
    "os_type""Windows",
    "image_publisher""MicrosoftWindowsServer",
    "image_offer""WindowsServer",
    "image_sku""2012-R2-Datacenter",
    "communicator""winrm",
    "winrm_use_ssl""true",
    "winrm_insecure""true",
    "winrm_timeout""5m",
    "winrm_username""packer",
    "managed_image_resource_group_name""shivu",
    "managed_image_name""myPackerImg12",
    "shared_image_gallery_destination": {
        "resource_group":"shivu",
        "gallery_name""sharedimage",
        "image_name""test",
        "image_version""1.0",
        "replication_regions": ["South India"]
    },
    "azure_tags": {
        "dept""Engineering",
        "task""Image deployment"
    },
    "location""East US",
    "vm_size""Standard_D2_v2"
  }],
  "provisioners": [{
    "type""powershell",
    "inline": [
      "Add-WindowsFeature Web-Server",
      "& $env:SystemRoot\\System32\\Sysprep\\Sysprep.exe /oobe /generalize /quiet /quit",
      "while($true) { $imageState = Get-ItemProperty HKLM:\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Setup\\State | Select ImageState; if($imageState.ImageState -ne 'IMAGE_STATE_GENERALIZE_RESEAL_TO_OOBE') { Write-Output $imageState.ImageState; Start-Sleep -s 10  } else { break } }"
    ]   
  }]
}


"The selected image is too large for the OS cache of the selected instance"

$
0
0

I am seeing a warning/info message when attempting to create an Azure SQL Server VM:

"The selected image is too large for the OS cache of the selected instance"

Can anyone explain what this means and whether I need to be concerned?  I'm not very clear on the OS Disk (C:) vs the OC Cache and "ephemeral OS disk".

The image I was trying to use was the {BYOL} SQL Server 2017 Standard on Windows Server 2016.

TIA,

-Peter


Azure Run Command via Rest API

$
0
0

HI,

I have created a VM and a simple python script that opens a local file and print time in there. Then a shell script to run it. This is an experiment for my actual future plan

The shell script look like this

#!/bin/bash

python /home/adminwm/quick-python-time-print.py

echo "Done!"

The python file looks like

#!/usr/bin/env python3

import time

f=open('File-test.txt','a')

f.write(time.ctime(time.time()))

f.close()

It runs ok, as expected.

However, I wanted to run this using Rest API vm run command and the body looks like

{"commandId": "RunShellScript","script": ["sh /home/adminwm/quick-python-test.sh"
  ]
}

I have tried other versions like directly sh quick-python-test.sh and etc/. I get 202 error, but I can see that it has not worked, as the file does not have the time appended to it.

What am I doing wrong?


Windows updates in a lockdown environment

$
0
0

Hi,

I have a Windows Server 2019 Azure VM in a lockdown vnet. I only allow certain outbound traffic from the VM. What do I need to allow in order to have the VM updated on regular basis? The outbound connection is controlled by Network Security Group the VM belongs to. It seems there is no Windows Update service tag to utilize. I can't imagine open up the outbound connections based on a list of IPs. How do people get around this?

Thank you.

Hyper-V and Azure Hybrid Benefit?

$
0
0

Ok I just want to clarify...

We use Hyper-V Environment.

25 hosts with data center licenses.

243 VMs.

We are moving to Azure and wanted to find out how that would be calculated

If we did a Lift and Shift, can we use the azure hybrid benefit on all 243 VM's with our 25 data center licenses or is that only available for 25 of the VMs?


Chaos causes progress, Order inhibits it.


Automation Account

$
0
0

HI Team,

I have two subsciption sub1 & sub2 and resource group rg1 is created sub1 & rg2 is created in sub2. Now we have VM1 in sub1-rg1 and configured with auto start using automation account VM1 is starting automatically. 

After moving the virtual machine from RG1 -sub1  to RG2 -sub2 , automation account is not working. VM is not getting started automatically. 

Please do help in this regards.

Regards

Khamaruddin shaik

Email -Khamaruddin.shaikh@gmail.com


How do you enable Intel Turbo boost technology 2.0? (nv series vm capped at 2.6ghz?)

$
0
0

Hello,

New to Azure, having a lot of fun learning but I don't understand why the NV series VM I built appears to cap it's CPU usage at 2.6hz (approx) when the Microsoft site says that single core performance should get as high as 3.7ghz (approx) based on the VM selection.

I was wondering if I'm missing something, am I supposed to enable Intel Turbo Boost somehow on the VM?, if so how - I was unable to find any info regarding this on the forums or a google search - what I did find just confused me a bit more so I figured better check with the community!

Thanks all,


Ubuntu 18.04.3 LTS Performing sudo commands requires a password

$
0
0

When I changed user alex's password, executing sudo command required me to enter a password. Before making this modification, I executed sudo command without entering a password. I tried to set sudoers, but it didn't work. Executing sudo-l, showing the following content, I know the problem should be the last line, but I don't know how to change it.

Who can help me? Thank you.

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px 'Courier New'; color: #0dff01; background-color: #1c1c1c; background-color: rgba(28, 28, 28, 0.91)} span.s1 {font-variant-ligatures: no-common-ligatures} </style>

    (ALL : ALL) ALL

    (ALL) NOPASSWD: ALL

    (ALL) ALL

Azure Logical Unit Number(LUN) Value of a disk

$
0
0

I need the Logical Unit Number of the azure disks as it is required in almost all the operations on virtual machines disks (update data disk, delete data disk etc..)

https://management.core.windows.net/<subscription-id>/services/hostedservices/<service-name>/deployments/<deployment-name>/roles/<role-name>/DataDisks/<lun>

Where can i get the LUN value?

Managed disks with Linux available yet?

$
0
0

I know a while back Managed Disks were not yet available for Linux VM's that are migrated from On-prem. Is this still true?

I just got an email from Microsoft today recommending that we upgrade to managed disks. This usually comes at a time when Microsoft gets ready to say that they are discontinuing support for something 2-3 years later. So I thought I would ask if Linux was supported on Managed Disks yet.

Thanks!

Viewing all 12545 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>