Milestone 5.1 ‐ More Automation with pyvmomi - jacobwilliams100/sys-350 GitHub Wiki
Your task is to develop a total of six actions that can be taken against a filtered set of VMs. Usually these can be paired without too much difficulty. For example, the code for poweron and power off is quite similar.
Actions Omplmented:
- Power On a VM
- Power Off a VM
- Take a VM Snapshot
- Restore VM to most recent shapshot
- Clone a VM
- Delete a VM
Link to Code: project5point1.py
Reflection:
That kind of concludes the code explanation, so this part is my reflection: This assignment was pretty tough. I do not like programming and I do not consider myself a programmer. I hardly used python before this course and haven't done any programming like this in a while, so I had to learn most of this as I went. I got a lot of mileage out of both ChatGPT and somen of the pyvmomi community samples. I found that with these, as with most programming tasks, there are multiple ways to do something. I think my code probably could have been a lot shorter and more efficient, but I prioritized just getting it to work without errors over everything else. Testing this program ended up being really hazardous because if I accidentally applied an action like shutdown or delete to the wrong VM, it could be catastrphic. This actually happened to me when I tried turning all VMs off. It turned off my vcenter VM and for some reason it wasn't working right when it turned back on. I spent a while manually turning on processes and got it mostly working again, but my vcenter remained pretty unstable, disconnecting sometimes multiple times in one minute, so ordinary tasks like starting new VMS sometimes take half an hour or more now. I definitely learned a lot completing this project, but I am tired of troubleshooting vcenter and definitely looking forward to moving on to OpenStack.