Closed lonniev closed 9 years ago
The root cause here is, I think, that the documentation is all written for an understandable Linux bias (go Linux!) but I find that my users keep dragging me to offer them Windows VMs and the documentation is not helpful enough for getting Windows VMs running on SL.
The SL boxes provide RDP connectivity with only the default Administrator account and password from the awkward SL portal interface. There's no ssh support, no winrm enabled, and no vagrant user.
To remedy all this:
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
choco install vagrant-winrm-config
choco install google-chrome-x64
choco install winsshd
This will give you a suitable foundation for vagrant and chef provisioning of SL Windows VMs.
@ju2wheels and @emyl why not provide a ju2wheels box that has just this little bit more added to it for Windows. (You would at least get rid of me asking WTF every few months when I forget all this prep work.)
0.4
with the addition of the transaction states (the same status as shown on the portal) being added to the debug output if you really want to see timely updates of where the build is at.softlayer_api
version 3.0.1
I added a lot of wrappers around all password related stuff in the API and that includes the Software passwords (such as the one used for the OS admin/root user). The vagrant-softlayer-credentials
tool I will add to contrib
over the next two weeks or so once I get time to finish it will provide an interface to it. Im hoping we can somehow use this to provide an option other than SSH keys to allow us to pull the password from the API and pass it on to the WinRM/SSH shim tools in vagrant but no promises as I dont know how technically feasible it is yet.I commiserate with (3) and (5). My wish would be that the SL boxes for Windows with typical vagrant ssh capabilities were just sitting out in cloud space to begin with. It’s a bear trying to move the multi-gigabyte box files off a local machine to a cloud storage site that (1) accepts the big ones and (2) doesn’t mess up the checksumming several days midway through the uploads.
I could do most of the SL-instance-to-vagrant-capable system with https://gist.github.com/lonniev/350a444c626119c31208 as an SL post_install script. However, it gets rejected at runtime because of the Set-ExecutionPolicy being restricted. When the elves inside the SL factory set up the instance, could they run Set-ExecutionPolicy unrestricted in the shell that launches the post_install URI?
Marking as closed, most of the stuff we can tackle has been answered and anything relating to the SL API side or build process would have to opened against SL through a ticket.
==> sl-oslc-alm: Rebuilding the SoftLayer instance...
==> sl-oslc-alm: Installing Chef cookbooks with Librarian-Chef...
==> sl-oslc-alm: Waiting for instance rebuilding. This may take a few minutes...
==> sl-oslc-alm: SoftLayer instance successfully rebuilt!
==> sl-oslc-alm: Waiting for machine to boot. This may take a few minutes...
==> sl-oslc-alm: Machine booted and ready!
==> sl-oslc-alm: Rsyncing folder: /Users/lonniev/Vagrants/softlayer-windows-windchillrlia/ => /vagrant
This is progress! It takes a ju2wheels LATEST Windows SL image, vagrants it up, and then runs a post_install that adds Chocolatey, OpenSSH, rsync, the vagrant user, and winrm.
Functionally, it makes ready the Windows SL VM for vagrant management; qualitatively, the SL behavior could be improved. It should run much more quickly (it takes about 20 minutes) and it should run reliably (it may abort for unknown reasons while being churned at the SL center).
Nevertheless, it is a great aid to getting vagrant-managed Windows VMs on SL.
The vagrantization work is done with
sl.post_install = "https://gist.githubusercontent.com/lonniev/7d967b09add6ca1f3a8a/raw/6aba37509e2c7d851bb004aeaa19ec5b438052e6/post_install.bat"
in the Vagrantfile
I've been away from vagrant softlayer for a few months and I've forgotten the proper care and feeding for a vagrant session for SoftLayer.
The confusion starts with the seemingly very long wait for "Waiting for the machine to boot." and this misleading remark that "This may take a few minutes...".
It would help to say, "Waiting for SoftLayer instance provisioning to complete and this typically takes 20 or more minutes to complete..."
The confusion is compounded with the next messaging that follows the instance provisioning and that is the "Warning: Connection refused. Retrying..." message.
The natural user reaction is WTF? I just waited 20 minutes for provisioning to complete and now I need to wait for SSH to become available?
It may be that I've once again overlooked a crucial Vagrantfile flag that either improves the responsiveness, tones down the retry frequency, or corrects incorrect credentialing. But, if so, I don't immediately spot it and the README guidance here doesn't address these too-likely-to-occur situations.