(SEC480) Milestone 4 - ConnorEast/Tech-Journal GitHub Wiki
- sudo apt install sshpass python3-paramiko git
- sudo apt-add-repository ppa:ansible/ansible
- sudo apt update
- sudo apt install ansible
- ansible --version
- sudo snap install powershell --classic
- pwsh
- Install-Module VMware.PowerCLI -Scope CurrentUser
- Get-Module VMware.PowerCLI -ListAvailable
- Set-PowerCLIConfiguration -InvalidCertificateAction Ignore
- Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false
- sudo apt install remmina onboard
- Connect-VIServer -Server 192.168.3.206
- Get-VM
- exit
$vserver="vcenter.east.local"
Connect-VIServer($vserver)
#Source VM
$vm=Get-VM -Name ad01-base
$snapshot = Get-Snapshot -VM $vm -Name "Base"
$vmhost = Get-VMHost -Name "192.168.3.206"
$ds=Get-DataStore -Name datastore2
$linkedname = "{0}.linked" -f $vm.name
#Create the tempory VM
$linkedvm = New-VM -LinkedClone -Name $linkedName -VM $vm -ReferenceSnapshot $s>
#Create the Full VM
$newvm = New-VM -Name "server.2019.base.v2" -VM $linkedvm -VMHost $vmhost -Data>
#A new Snap Shot
$newvm | new-snapshot -Name "Base"
#Cleanup the temporary linked clone
$linkedvm | Remove-VM
Commands:
install image 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