Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/goffinet/virt-scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
goffinet committed Nov 17, 2020
2 parents a7d5a54 + 5a52eb3 commit c8d4034
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 4 additions & 3 deletions autoprep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ yum -y install epel-release
yum -y upgrade
echo "Virtualization host installation"
yum -y group install "Virtualization Host"
yum -y install virt-manager libvirt virt-install qemu-kvm xauth dejavu-lgc-sans-fonts virt-top libguestfs-tools virt-viewer virt-manager curl
yum -y install @virt
yum -y install virt-manager virt-install qemu-kvm xauth virt-top libguestfs-tools virt-viewer virt-manager curl
#echo "kcli libvirt wrapper installation"
yum -y install gcc libvirt-devel python-devel genisoimage qemu-kvm nmap-ncat python-pip
yum -y install gcc libvirt-devel python3-devel genisoimage qemu-kvm nmap-ncat python3-pip
#pip install kcli
echo "Enabling Nested Virtualization"
rmmod kvm-intel
Expand Down Expand Up @@ -84,7 +85,7 @@ fi
if [ "$EUID" -ne 0 ] ; then echo "Please run as root" ; exit ; fi
echo "This script will install all the necessary packages to use Libvirtd/KVM"
echo "Please reboot your host after this step"
validation
if [ "$1" != "--force" ] ; then validation ; fi
check_distribution
services_activation
check_apache
Expand Down
4 changes: 4 additions & 0 deletions define-guest-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ if [ $image = "centos7.qcow2" ]; then
sleep 1
virt-sysprep -a /var/lib/libvirt/images/$disk --hostname $name --selinux-relabel --quiet
fi
if [ $image = "centos8.qcow2" ]; then
sleep 1
virt-sysprep -a /var/lib/libvirt/images/$disk --hostname $name --selinux-relabel --quiet
fi

## Import and lauch the new guest ##
virt-install \
Expand Down
4 changes: 2 additions & 2 deletions download-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#imagename="debian7 debian8 centos7 centos8 ubuntu1604 bionic metasploitable kali arch"
which curl > /dev/null || ( echo "Please install curl" && exit )
imagename=($(curl -qks https://download.goffinet.org/kvm/imagename))
imagename=($(curl -qks http://download.goffinet.org/kvm/imagename))
image="$1"
url=http://download.goffinet.org/kvm/
destination=/var/lib/libvirt/images/
Expand Down Expand Up @@ -39,7 +39,7 @@ cd ${wd}
usage () {
echo "-------------------------------------------------------"
echo "This script download automatically KVM images"
echo "from https://download.goffinet.org/kvm."
echo "from http://download.goffinet.org/kvm."
echo ""
echo "Usage:"
echo " $0 image_name [--force]"
Expand Down

0 comments on commit c8d4034

Please sign in to comment.