KVM Provisioning Script

Hello everyone!

I’ve worked with KVM for a while. My evolution of using it has gone from virt-manager, to sudo virt-install to now using a script to run those commands for me. The script went from hard coding everything to passing arguments. The video below demonstrates the current form of the script, 3.0

My reasons for sticking with KVM and the various hypervisors I’ve used will likely be the main topic of episode two in a couple of days.

3 Likes

So why don’t you make a “default” argument that would load the default setup instead of having it hard coded ?

1 Like

I would still need a name to be passed through. I like to keep the HD and VM names the same or at least similar.

make another argument in case

d) and for it input the hard coded things ?

This way when you do -d should take them right ?

Hm, yeah, I could try that. I’ll play with it and see what happens. My only concern is I’d be editing the script every time I want to add a new VM, whereas now I just edit the kickstart file and run the script.

Yeah I have no idea of Bash scripting so don’t mind me. Share the code btw I might try to “improve it”.

I went to KVM and stayed because simple is easier to debug and the scriptability as you are showing.

Proxmox was whizz and/or bang but hurt my head for my meager needs. Esxi works great if it supports your hardware and within its licensing limits. Patching its drivers is obtuse and painful as hell.

Dont tell anyone but I use the gui to clone then edit. :wink:

Clone, virsh dumpxml to export and virsh define are the limits of my automation and migration.

1 Like

I’d like to dive into RHEV after I get my RHCE for RHEL7…

I should build something at home :joy:

2 Likes

Where is the git?

1 Like

Good call! My bad.

1 Like