Milestone 4 PowerCLI and Linked Clones - InaFricke/SEC-480 GitHub Wiki
Milestone 4 PowerCLI and Linked Clones
PowerShell & PowerCLI Installation
Ansible Dependencies
sudo apt install sshpass python3-paramiko git
sudo apt-add-repository ppa:ansible/ansible
sudo apt update
sudo apt install ansible
ansible --version
cat >> ~/.ansible.cfg << EOF
[defaults]
host_key_checking = false
EOF
PowerCLI Dependencies
logout an in if you've just installed snapd, so that is added to path for current user.
Powershell Snap
sudo snap install powershell --classic
pwsh
Write-Host $PSVersionTable
PowerCLI Libraries
Install-Module VMware.PowerCLI -Scope CurrentUser
Get-Module VMware.PowerCLI -ListAvailable
Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false
Connect with vcenter
Extracting base snapshots
The linked clone is now created.
Create base vm from the linked clone (independent versions)
Remove linked clone
Script Creation
-
New-Item cloner.ps1
-
Invoke-Item cloner.ps1
Vyos Base
Xubuntu Base
Org
- Create PROD and BASEVM folders
Xubuntu Base
- upload to the ISO folder
- Create a new VM in the Base folder > defaults until 6 >
- Power it on
- Create user, RoxiRules32
- Install openssh
-
Remove ISO and reboot
-
Login and run
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
- DNS
sudo netplan apply
-
sudo shutdown -h now -
I accidentally removed the CD drive completely. Then, take a snapshot named baseline
VYOS Base
-
power on
-
log in, vyos, RoxiBoxi
configure
set service ssh listen-address 0.0.0.0
set interfaces ethernet eth0 address dhcp
delete interfaces ethernet eth0 hw-id
delete interfaces ethernet eth1 hw-id
commit
save
exit
shutdown -h now
- Remove anything in CD (I did this a while ago), take baseline snapshot (also already has it, so I'm a little confused)
Linked Clones
- Made script
- ubuntu.linked
- gui.linked
- vyos.linked