MicrosoftDocs / azure-docs

Open source documentation of Microsoft Azure
https://docs.microsoft.com/azure
Creative Commons Attribution 4.0 International
10.2k stars 21.34k forks source link

Azure Connected Machine Agent -- installation failed (Windows Server) #52975

Closed dgancho closed 4 years ago

dgancho commented 4 years ago

Attempts to install Azure Connected Machine Agent on multiple Windows servers (2012R2, 2016, 2019) fail with 1603. Looks like it reaches almost complete install, and then rolls back and deleted all files and folder in C:\Program Files


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

dgancho commented 4 years ago

Installation log (Windows Server 2012R2) - attached installationlog.txt

SwathiDhanwada-MSFT commented 4 years ago

@dhancho Thanks for your comment. We are actively investigating and will get back to you shortly.

femsulu commented 4 years ago

Hi @dgancho - We are reviewing your logs with the feature owner and should have an update soon. You mentioned above that the installation files are deleted from C:\Program Files. Can you confirm if the configuraiton files are also deleted from %ProgramData%? By default, the agent binaries and configuration files are installed in both locations. image

dgancho commented 4 years ago

@femsulu Yes, I confirm. Folder AzureConnectedMachineAgent does not exist in both C:\Program Files and C:\ProgramData locations (on servers where I attempted to install it). I attach a quick screenshot video showing what's happening - see C:\ProgramData\AzureConnectedMachineAgent being created and then deleted. AgentInstall.zip

JaneYan-2016 commented 4 years ago

@dgancho, can you check if you have C:\programData\GuestConfiguration folder? and logs in the folder? Could you share?

dgancho commented 4 years ago

Attaching log files (2) from C:\ProgramData\GuestConfig folder

gc_agent_telemetry.txt gc_agent.log

JaneYan-2016 commented 4 years ago

Thanks for the log. We find that during the agent installation, after GC service started, it received a stop signal from the service control. Is there some apps on the machine to prevent new services starting on the machine?

femsulu commented 4 years ago

@dgancho - any update to @JaneYan-2016's question ?

femsulu commented 4 years ago

HI @dgancho , we hope the investigation update above was helpful. Please don't hesitate to respond if you have any follow up questions. We will now close this issue. If there are further questions regarding this matter, please reply and we will gladly continue the discussion.

dgancho commented 4 years ago

@femsulu Please reopen, the issue is not resolved.

Is there some apps on the machine to prevent new services starting on the machine?

I do not believe so. Is there anything specific you want me to check or look into?

menace232 commented 3 years ago

I am having a similar issue.

It appears the installer runs, but cannot start the Azure Hybrid Instance Metadata Service.

The reason the service fails to run is because the C:\ProgramData\AzureConnectedMachineAgent\Config\agentconfig.json does not exist.

So to create the file, you need to run a command to configure it with azcmagent.exe.

However, azcmagent.exe requires the Azure Hybrid Instance Metadata Service to be running to complete the configuration.

So we have a chicken or the egg here. The Azure Hybrid Instance Metadata Service cannot run without the Json file. But you cannot create the json file until the Azure Hybrid Instance Metadata Service is running.

Whoops.

So, a template JSON file were the details could be manually entered may resolve the problem.

And does anyone have that?

danabrash commented 3 years ago

I am also blocked from deploying the agent. For me I do not get the azcmagent.exe installed at all.

The msi throws 1603 error and rolls back. log attached. installationlog.txt

Any help appreciated

MGoedtel commented 3 years ago

Looping in @rpsqrd and @edyoung to get eyes on this thread. Upon review of the installation log shared by danabrash, in his case the install failed trying to start the GCExtension service, and as a result, the install was rolled back.

rpsqrd commented 3 years ago

Can those affected confirm a few details for us:

  1. Are these machines running in Azure or on-prem? (There are known installation issues on Azure VMs)
  2. Is (or was) an older version of our agent installed on this machine?
danabrash commented 3 years ago

Hi @rpsqrd

It's an Azure VM, brand new install. just spun it up to test Arc, so it started 100% clean. I've removed folders etc. trying to reset, but it never gets the azcmagent.exe in the right folder at all.

thanks for your help!

rpsqrd commented 3 years ago

Thanks for confirming. We don't technically support running Arc in Azure VMs, since all the capabilities Arc provides are natively available in Azure VMs.

However, if you want to use an Azure VM for testing purposes, you can do so by blocking access to the Instance Metadata Service endpoint and removing the Azure Guest Agent before trying to install the Arc agent. We just published 2 jumpstart scenarios for this today to help you quickly get started with Arc demos in Azure on Windows and Ubuntu.

cdanvergara commented 1 year ago

Loos like this process is documented now, I followed the guidance from: https://learn.microsoft.com/en-us/azure/azure-arc/servers/plan-evaluate-on-azure-virtual-machine

But I'm still getting this error: "Cannot install Connected Machine agent on an Azure virtual machine" for Windows Server 2016 and 2019. Anything else we can try?

lmhutch commented 7 months ago

you can try the scorched earth method - https://techcommunity.microsoft.com/t5/fasttrack-for-azure/the-case-of-the-rogue-azure-arc-connected-machine-agent/ba-p/4025092