Milestone 5 - The 480Utils Powershell/PowerCLI module
💡In a previous milestone, we installed powershell and powercli and accessed vsphere both interactively through commands such as Get-VM as well as through a .ps1 script of your own making. In this module we will make a powershell module that we will build upon over the course of the semester. Powershell/PowerCLI is the mechanism we use to deploy and configure the virtual machine and its hardware. We can also do some interesting things through the VMWare Tools guest integration.
Requirements​
Install vscode on xubuntu-wan as well as the powershell extension
Build a module skeleton
Implement or improve upon the functions demonstrated
Using what you know about PowerCLI now add functions to your 480Utils.psm1 module that allow you to do the following:
- Create a linked or full clone. Note, a full clone should be made from the "Base Snapshot" (which implies you create a temporary linked clone). This is ideal for "live systems" that have a base snapshot in them like Server 2019 or vyos.
- Create a linked clone from the "Base" snapshot.
- Gather other parameters either interactively (Read-Host) or via your configuration file.
- The esxi server on which this clone is to run
- The datastore where the clone should be stored
- It makes sense to ask the user the name of the new clone
- You should fail gracefully and let the user know if any parameters are in error.
- Optional Features:
- set the new vm's network adapters to a network of your choice.
- power the vm on