-
Notifications
You must be signed in to change notification settings - Fork 0
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
Experiment with creating and configuring cloud dev VM #6
Comments
Observations about AzureStack VM (
|
Possible fix for exposing CPU virtualization to guest OS: Set-VMProcessor -VMName <Target VM's Name> -ExposeVirtualizationExtensions $true |
Linux VM is now also up and running and can communicate with Windows VM. Tested with following Docker container: docker run --name test-nginx -p 80:80 -d nginx And then connecting to |
Confirmed linux/windows VM can communicate over 443. This should let me test with Ansible with a linux control node and windows host. |
Steps to setup: # Linux control node
sudo apt update
sudo apt install software-properties-common
sudo apt-add-repository --yes --update ppa:ansible/ansible
sudo apt install ansible # Windows host
choco install python |
Created local Ansible playbook based on esdc-devx/dev-laptop. |
|
Commands to share windows folder on linux: # windows
New-SMBShare –Name "Development" –Path "C:\path\to\folder" –FullAccess domain\username
# linux
sudo apt-get install cifs-utils
sudo mount.cifs //WindowsPC/path ~/path/to/mount -o user=username |
Setting up windows host with SSH: Linux control node: # Create ssh keys
ssh-keygen -t rsa -b 4096
# Grant ownership to the default `local_tmp` and `remote_tmp` in ansible.cfg
# Alternative: change these directories
chown -R username:usergroup ~/.ansible Windows host: # Install and start server
choco install openssh --package-parameters='"/SSHServerFeature"'
# Copy control node `id_rsa.pub` contents into %userprofile%\.ssh\authorized_keys
# Update %programdata%\ssh\sshd_config:
PubkeyAuthentication yes
# Match Group administrators
# AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
# Restart sshd service
Restart-Service -Name sshd -Force
# Set default SSH shell to powershell (optional)
Set-Itemproperty -path 'HKLM:\SOFTWARE\OpenSSH' -Name 'DefaultShell' -value 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' Debug public key authentication not working: ssh -vvv windows-host |
Test command with plaintext auth and public key auth from linux control node: # plaintext
# can alternatively set `ansible_user` and `ansible_password` in encryped ansible.cfg file
ansible windows -m win_whoami -u username --ask-pass Test command with pubkey authentication: # pubkey
ansible windows -m win_whoami |
Uses experimental OpenSSH rather than WinRM for processing commands from control node. Relates to dto-btn/todo#6
Organized repo into ./ubuntu and ./windows directories. Related to dto-btn/todo#6
Organized repo into ./ubuntu and ./windows directories. Related to dto-btn/todo#6
Commands for installing Ubuntu desktop on a UbuntuServer image and enablding RDP from Windows: sudo apt install ubuntu-desktop
sudo apt install xrdp
sudo systemctl enable xrdp |
Allow xrdp to listen on 443: sudo setcap CAP_NET_BIND_SERVICE=+eip /usr/sbin/xrdp
sudo vi /etc/xrdp/xrdp.ini # change port=443 |
This removes the need for it in the setupssh.ps1 script. Related dto-btn/todo#6
This removes the need for it in the setupssh.ps1 script. Related dto-btn/todo#6
The text was updated successfully, but these errors were encountered: