zarquan / ischnura Goto Github PK
View Code? Open in Web Editor NEWShell scripts to manage KVM
Shell scripts to manage KVM
If you have SELinux enabled on remote nodes, you will also want to install libselinux-python on them before using any copy/file/template related functions in Ansible.
https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
Select the target disc size, and re-size the image as required.
Add configurable default values to the machine and image selection.
An odd bug in libvirt returns multiple duplicates in the list of volumes.
Found a reference to similar behaviour in Redhat bugzilla entry 1176510, but this was from 2014/2015 and no follow up since .
We are now encountering the same issue on an up to date install of Debian 8.6.
Add a nonroot user for launching docker containers.
Add command line parameters to enable createvm to be used in shell scripts.
How can we integrate this with the Ansible tools ?
https://docs.ansible.com/ansible/latest/modules/virt_module.html
https://docs.ansible.com/ansible/latest/modules/virt_net_module.html
https://docs.ansible.com/ansible/latest/modules/virt_pool_module.html
Display the machine status (ACTIVE|INACTIVE|-) in the selection list.
Simple wrapper around the libvirt command to stop and delete an active VM
Add and enable Docker in the Fedora base image.
When used on trop02, one user account shows no warnings, the other account displays warnings about setlocale
every time the script envokes virsh
.
INFO : Base pool [base]
INFO : Live pool [live]
INFO : Connection [qemu:///system]
INFO : Data path [/var/local/projects/ischnura/github/src/dat]
INFO : Machines [/var/local/projects/ischnura/github/src/dat/tropo-machines.txt]
INFO : Template [/var/local/projects/ischnura/github/src/dat/tropo-template.xml]
[1] Araybwyn
[2] Lothigometh
[3] Ulov
[4] Dwiema
[5] Ibalehar
[6] Eterathiel
[7] Siamond
[8] Acilamwen
Select machine name (1) 3
setlocale: No such file or directory
[1] fedora-27-docker-base-20180129.qcow
[2] fedora-25-docker-16G-20170713.qcow
[3] alpha-28-docker-base-20180708.qcow
Select base image (1) 1
setlocale: No such file or directory
INFO : Node name [Ulov]
INFO : Base name [fedora-27-docker-base-20180129.qcow]
INFO : Base path [/var/lib/libvirt/images/base/fedora-27-docker-base-20180129.qcow]
INFO : Disc name [Ulov.qcow]
INFO : Disc size [16GiB]
INFO : MAC [52:54:00:02:02:0A]
INFO : IPv4 [192.168.202.10]
INFO : IPv6 []
Create virtual machine (Y/n)Y
Found existing virtual machine [Ulov]
Delete existing virtual machine (Y/n)Y
setlocale: No such file or directory
Stopping virtual machine [Ulov]
setlocale: No such file or directory
YDomain 7f7b31a3-9d35-4d30-8f18-f0a87f7fd5c3 destroyed
Delete associated storage (Y/n)Y
Deleting virtual machine [Ulov]
setlocale: No such file or directory
Domain 7f7b31a3-9d35-4d30-8f18-f0a87f7fd5c3 has been undefined
Found existing storage volume [Ulov.qcow]
Delete storage volume (Y/n)Y
Deleting storage volume [Ulov.qcow]
setlocale: No such file or directory
Vol Ulov.qcow deleted
Creating new volume [Ulov.qcow]
setlocale: No such file or directory
Vol Ulov.qcow created
setlocale: No such file or directory
Name: Ulov.qcow
Type: file
Capacity: 16.00 GiB
Allocation: 196.00 KiB
setlocale: No such file or directory
Vol Ulov.iso deleted
setlocale: No such file or directory
Vol Ulov.iso created
setlocale: No such file or directory
setlocale: No such file or directory
setlocale: No such file or directory
Creating new virtual machine [Ulov]
setlocale: No such file or directory
Domain Ulov defined from /tmp/tmp.5lvaU2CXfX
Starting new virtual machine [Ulov]
setlocale: No such file or directory
Domain Ulov started
Simple wrapper around the libvirt command to list active VMs
Select ssh keys to add to the VM.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.