Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename fails with "computer account could not be found" #18

Open
gurry opened this issue Feb 1, 2018 · 1 comment
Open

Rename fails with "computer account could not be found" #18

gurry opened this issue Feb 1, 2018 · 1 comment

Comments

@gurry
Copy link

gurry commented Feb 1, 2018

The rename step is failing for me with the following error:

Rename-Computer : Fail to rename computer 'vagrant-2016' to 'tchn-app-server' due to the following exception: The
specified computer account could not be found. Contact an administrator to verify the account is in the domain. If the
account has been deleted unjoin, reboot, and rejoin the domain.

although the preceding step to join the computer to the domain seems to have succeeded.

Full error text:

app: Running provisioner: windows_domain...
Connecting guest machine to domain 'acme.local' with computer name 'tchn-app-server'
==> app: "Running Windows Domain Provisioner"
VERBOSE: Performing the operation "Join in domain 'acme.local'" on target "vagrant-2016".HasSucceeded ComputerName ------------ ------------ True vagrant-2016 WARNING: The changes will take effect after you restart the computer vagrant-2016.VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".Rename failed, Retrying in 5 seconds...VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".Rename failed, Retrying in 5 seconds...VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".Rename failed, Retrying in 5 seconds...VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".Rename failed, Retrying in 5 seconds...VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".Rename failed, Retrying in 5 seconds...VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".Rename failed the maximum number of 5 times.
Rename-Computer : Fail to rename computer 'vagrant-2016' to 'tchn-app-server' due to the following exception: The
specified computer account could not be found. Contact an administrator to verify the account is in the domain. If the
account has been deleted unjoin, reboot, and rejoin the domain.
At C:\tmp\vagrant-windows-domain-runner.ps1:36 char:4

  •         Rename-Computer -NewName tchn-app-server -DomainCredentia ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (vagrant-2016:String) [Rename-Computer], InvalidOperationException
    • FullyQualifiedErrorId : FailToRenameComputer,Microsoft.PowerShell.Commands.RenameComputerCommandThe following WinRM command responded with a non-zero exit status.
      Vagrant assumes that this means the command failed!

powershell -ExecutionPolicy Bypass -OutputFormat Text -file c:/tmp/vagrant-windows-domain-runner.ps1

Stdout from the command:

VERBOSE: Performing the operation "Join in domain 'acme.local'" on target "vagrant-2016".

HasSucceeded ComputerName


True vagrant-2016
WARNING: The changes will take effect after you restart the computer vagrant-2016.
VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".
Rename failed, Retrying in 5 seconds...
VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".
Rename failed, Retrying in 5 seconds...
VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".
Rename failed, Retrying in 5 seconds...
VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".
Rename failed, Retrying in 5 seconds...
VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".
Rename failed, Retrying in 5 seconds...
VERBOSE: Performing the operation "Rename-Computer" on target "vagrant-2016".
Rename failed the maximum number of 5 times.

Stderr from the command:

Rename-Computer : Fail to rename computer 'vagrant-2016' to 'tchn-app-server' due to the following exception: The
specified computer account could not be found. Contact an administrator to verify the account is in the domain. If the
account has been deleted unjoin, reboot, and rejoin the domain.
At C:\tmp\vagrant-windows-domain-runner.ps1:36 char:4

  •         Rename-Computer -NewName tchn-app-server -DomainCredentia ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (vagrant-2016:String) [Rename-Computer], InvalidOperationException
    • FullyQualifiedErrorId : FailToRenameComputer,Microsoft.PowerShell.Commands.RenameComputerCommand
@mefellows
Copy link
Owner

Thanks @gurry. I won't have time to look at this any time soon I'm afraid, but PRs are welcome. I've flagged it for "help wanted" in case someone is interested and willing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants