Cannot move logs file in windows server 2012 R2

Chethiya Amarasinghe 106 Reputation points
2021-01-19T04:53:06.42+00:00

Environment details:

I recently migrated on premise Windows 2012 R2 server to Azure cloud. Once migrated I enabled Azure update management and backup for the migrated virtual machine. NLA (Network level authentication) is disabled for this machine.

Problem:

I am trying to move logs files (C:\Windows\System32\winevt\Logs) in the virtual machine to another location to mitigate disk capacity. But when I move it gives me this error "the action cannot be completed because the file is open in dhcp client". But I can copy those files in to another location while I cannot move or delete.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,021 questions
Windows for business | Windows Server | User experience | Other
{count} votes

Accepted answer
  1. Chethiya Amarasinghe 106 Reputation points
    2021-01-20T08:19:52.347+00:00

    I found the way to do it. I disabled the Windows event log service. Then I could move the log files in to another location.

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. SUNOJ KUMAR YELURU 15,256 Reputation points MVP Volunteer Moderator
    2021-01-19T07:04:20.277+00:00

    @Chethiya Amarasinghe

    I released the lock this way:

    Start -> Services
    Locate Windows Event Log
    Right click -> Restart

    Solution: close Event Viewer

    Please don’t forget to Accept the answer and up-vote wherever the information provided helps you, this can be beneficial to other community members.

    3 people found this answer helpful.

  2. Anonymous
    2021-01-19T13:50:01.447+00:00

    Are you just trying to copy the files? or move the log location? Assuming the latter you'll need to edit the Reg_Expand_Sz string named File to the new location for each of the event logs.

    58108-image.png

    --please don't forget to Accept as answer if the reply is helpful--


Your answer

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