Week 4 Assignment
Description:
I have started a script for you that you will have to modify. The script will create a vm for you on the vm farm. Your script could be run from wherever you choose. If you choose to run it on desdemona, you won’t have to ssh. Here is the script.
The script should be run like ./make_machine_student.sh <machine name>
.
In the end, the script should ask the user for the requisite values to create a new vm. You should prompt the user for:
- How much ram it should use (validate this)
- How big of a disk (validate this)
- What vlan should I put it in? (show them an option here) (or in other words, show them what vlans they are allowed to choose from.) (HINT:
citv getip <course>
will show you what ips and vlans they have checked out for the course.)
If they don’t provide a valid option above, you should continue to prompt them until it is valid. If everything seems valid, create the machine.
You MUST utilize the following functions:
- get_ram
- get_disk_size
- get_vlan (already written)
- a
usage
function that shows the user how to appropriately use the script. This should be called if the user omits the command line argument.
Check off procedure:
Pass off in class. This should create a new vm for you when called.
Last Updated 02/07/2025