On Azure Windows VM, temporary D drive has CollectGuestLogsTemp folder and VMAgentLogs.zip auto‑generated.

Manager One 0 Reputation points
2026-08-14T04:36:38.7466667+00:00

On Azure Windows VM, temporary D drive has CollectGuestLogsTemp folder and VMAgentLogs.zip auto‑generated. Questions:

  1. What triggers automatic CollectGuestLogs execution on Windows Azure VM agent?
  2. Why output logs go to ephemeral D temporary storage instead of C: OS disk?
  3. Is there any configuration to change log output path for CollectGuestLogs.exe? Environment: Windows Server Azure VM, D: is Temporary Storage(resource disk). Screenshot attached showing D:\CollectGuestLogsTemp and DATALOSS_WARNING_README.txt
Azure Virtual Machines
Azure Virtual Machines

An Azure service that is used to provision Windows and Linux virtual machines.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Jose Benjamin Solis Nolasco 12,026 Reputation points Volunteer Moderator
    2026-08-31T00:06:05.03+00:00

    Welcome to Microsoft Q&A!

    @Manager One I hope you are doing well,

    This a standard, built-in maintenance routine executed by the Azure Windows VM Agent (WaAppAgent / WindowsAzureGuestAgent).

     

    Here is what is happening under the hood for each of your questions:

     

    1. What triggers automatic CollectGuestLogs execution?

    The Azure VM Guest Agent triggers CollectGuestLogs.exe automatically under a few standard scenarios:

    • Agent Self-Diagnostics & Health Heartbeats: When the agent detects internal communication hiccups with the Azure Fabric Controller (168.63.129.16), high agent memory usage, or repeated heartbeat timeouts, it automatically captures diagnostic logs for self-triage.
    • Extension Failures or Timeouts: If a VM extension (like Custom Script Extension, Azure Monitor Agent, or Defender) fails to report a status or crashes, the agent packages logs to capture the state at that moment.
    • Host-Initiated Diagnostic Requests: Azure platform automated healing services or Azure Support automated health probes can trigger a silent log collection request to diagnose host-to-guest degradation.

    2. Why does it output to the ephemeral D: drive instead of C:?

    This is purely by design to protect your OS disk:

    • Collecting event logs, agent traces, and extension dumps can generate hundreds of megabytes of temporary data. Writing and zipping these files on the C: drive risks filling up system disk space, which could crash the OS or production applications.
    • The D: drive is dedicated scratch space backed by high-speed local host NVMe/SSD, making it the safest place to stage temporary dumps without consuming billable OS IOPS or disk capacity.

    3. Can you change the log output path for CollectGuestLogs.exe?

    No, the path is hardcoded into the Azure Guest Agent's diagnostic collection logic.

    • By default, the tool queries the system for the designated temporary scratch volume (the resource disk labeled with DATALOSS_WARNING_README.txt) and stages files under D:\CollectGuestLogsTemp.
    • It is safe to leave these files alone—the temporary disk is cleared whenever the VM is stopped/deallocated or moved to a new host during maintenance. You can also safely delete the .zip and temp folder manually if you need that scratch space.

    References:

     

    Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.