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
[BUG] Windows CRC pre-create error primary domain failed #771
Comments
|
Hi, I have the same problem. Looking at hashicorp/packer#5216, it appears that if one would use I tried it on my machine and it works ok: When calling the below powershell command, instead of an error I get a proper "True" response: |
|
I think we don't use 'Hyper-V Administrators' directly as it might need to be translated on some Windows versions, see crc-org/machine@f748ac13 |
|
The fix would be to not rely on type variance, as this seems to fail (PowerShell assums it is a string?), but use |
|
Hi, I think I'm facing similar issue when doing CRC version info: |
can you provide the username and group membership information? Please see if #742 might be the reason? Please add |
I hope below is the correct command to fetch the requested info:
|
Can you explain more about the setup? Would have to recreate somethimh similar. At the moment there is a now workaround for this, as it fails inside the libmachine code (no skips are possible). |
It's a Windows box provided by the IT team at my organization. I have to use some app called "Make Me Admin" to let me have administrator privileges for some time. I'm not sure what other piece of information might help you but I could try to answer any questions you might have. 🙂 |
|
Hi, as I mentioned above in #771 (comment), I'm also getting exactly the same problem (and the debug output also matches exactly the one from @dharmit). The current version of Windows 10 running on my laptop is 10.0.18362.418. The laptop is joined to a Windows domain, and I am a local administrator on it. @gbraad: Let me know if there is any other information that I can provide to you in order to recreate / troubleshoot the issue. By the way, from reading various articles on this, it seems that the solution that you mention in your #771 (comment) is what is needed to fix this (i.e. use a temporary variable to store the security identifier). |
|
Dharmit is trying this out at the moment.
I will also setup a local environment with a domain joined machine. But
have to wait until additional hardware arrives for this... and sinc eit was
11.11 the express services will be delayed here in China.
|
|
Pardon my naive question but where am I supposed to execute the command mentioned in #771 (comment)? I opened "Run" and executed the command but the Powershell closed immediately. Next when I opened Powershell by going to Start menu and I'm really not comfortable using Windows. So bear with my silly questions, please! UPDATE: I also start cmd as Administrator and executed the |
|
Hi @dharmit, you just need to open a simple cmd prompt (no need to start it as Administrator) and run the Powershell command exactly as listed. |
|
Thanks @anagna. Among other things, I did try what you suggested. I did it again and then did |
|
The check is failing in the driver's |
|
Yes, @anjannath, that's exactly right. And the change that is needed is described in #771 (comment). |
|
@anjannath can you verify machine-drivers/machine#24 ? |
|
crc-org/machine#30 and machine-drivers/machine#24 are merged, and we have the fix in crc 1.3.0 |

General information
crc setupbefore starting it (Yes)?CRC version
CRC status
CRC config
Host Operating System
# Put the output of `systeminfo` in case of Windows OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.16299 N/A Build 16299Steps to reproduce
Expected
Everything ok
Actual
Error about "primary domain failed"
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("S-1-5-32-578")
(crc) DBG | [stderr =====>] : Exception calling "IsInRole" with "1" argument(s): "The trust relationship between this workstation and the primary domain failed."
My user is in the correct group to access Hyper-V,
My computer is in an AD domain, and the user in the HyperV group is my AD user. I can run hyperv commands.
I think it's a problem with the powershell command as this works :
Same problem as this issue with minishift :
minishift/minishift#2047
Logs
You can start crc with
crc start --log-level debugto collect logs.Please consider posting this on http://gist.github.com/ and post the link in the issue.
The text was updated successfully, but these errors were encountered: