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

Testing the hyperv box hangs with username/password prompt for shared folder #83

Closed
StefanScherer opened this issue Feb 1, 2018 · 1 comment

Comments

@StefanScherer
Copy link
Owner

In my Jenkins build agent I also try to test the newly built vagrant box. In Azure I can create the boxes with the hyperv-iso builder. A vagrant up hangs with the following problem using the shared folder

demo@pckrwin45e110 C:\Windows\workspace\packer-windows_my-PH7VQTN6RDUL23PJXSNDIGZXF5YME4XP2R3GVKXGJIWL7LIVCX5A\boxtest>vagrant up --provider=hyperv 
Bringing machine 'tst' up with 'hyperv' provider...
==> tst: Verifying Hyper-V is enabled...
==> tst: Configured Dynamic memory allocation, maxmemory is 2048
==> tst: Configured cpus number is 2
==> tst: Configured differencing disk instead of cloning
==> tst: Importing a Hyper-V instance
    tst: Cloning virtual hard drive...
    tst: Creating and registering the VM...
    tst: Setting VM Integration Services
    tst: Successfully imported a VM with name: windows_10
==> tst: Starting the machine...
==> tst: Waiting for the machine to report its IP address...
    tst: Timeout: 120 seconds
    tst: IP: 192.168.0.11
==> tst: Waiting for machine to boot. This may take a few minutes...
    tst: WinRM address: 192.168.0.11:5985
    tst: WinRM username: vagrant
    tst: WinRM execution_time_limit: PT2H
    tst: WinRM transport: negotiate
==> tst: Machine booted and ready!
==> tst: Preparing SMB shared folders...
    tst: You will be asked for the username and password to use for the SMB
    tst: folders shortly. Please use the proper username/password of your
    tst: Windows account.
    tst:  
    tst: Username:     tst: Password (will be hidden): 
Error! Your console doesn't support hiding input. We'll ask for
input again below, but we WILL NOT be able to hide input. If this
is a problem for you, ctrl-C to exit and fix your stdin.
     tst: Password (will be hidden): ==> tst: Mounting SMB shared folders...
    tst: C:/Windows/workspace/packer-windows_my-PH7VQTN6RDUL23PJXSNDIGZXF5YME4XP2R3GVKXGJIWL7LIVCX5A/boxtest => /vagrant
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!

cmdkey /add:10.0.0.7 /user: /pass:

Stdout from the command:



CMDKEY: This command requires either the /U switch and 

        a username or else the /smartcard switch with a smartcard.

@StefanScherer
Copy link
Owner Author

Ah, the Vagrant docs show some nice details https://www.vagrantup.com/docs/synced-folders/smb.html#options

smb_password and smb_username can be specified. This is ok for my Jenkins agents as Vagrant hosts.

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

1 participant