From ec6d9cb6b6234f3de8761f6b5caf8383bb26906f Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Fri, 13 Jan 2023 00:16:04 +0100 Subject: [PATCH 1/5] fix typo in readme --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 40593c2..1a8c2fe 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # RHCE 8 Automated Practice Deployment -_Powered by Ansible and Vagrant_ +_Powered by Ansible and Vagrant_ ## Installation options below: ## macOS @@ -27,11 +27,11 @@ _NOTE - If it's been awhile since you've run yum update, do that first. Reboot i _NOTE2 - If you receive an error for an ansible guest vagrant plugin, DO NOT worry, as there are two different plugins related to Ansible and only one needs to be installed._ ##### For CentoOS/RHEL7/Manjaro/Arch (Continue below for RHEL 8 specific script) ``` -systemctl stop packagekit; yum install -y epel-release && yum install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.6_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.rpm && yum install -y vagrant_2.2.6_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; vagrant plugin install vagrant-guest-ansible ; wget -O /etc/yum.repos.d/virtualbox.repo wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; yum install -y VirtualBox-6.0 && systemctl start packagekit +systemctl stop packagekit; yum install -y epel-release && yum install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.6_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.rpm && yum install -y vagrant_2.2.6_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; vagrant plugin install vagrant-guest-ansible ; wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; yum install -y VirtualBox-6.0 && systemctl start packagekit ``` ##### If you're using RHEL 8, use the script below: ``` -systemctl stop packagekit; dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ; dnf install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.19_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.rpm && dnf install -y vagrant_2.2.19_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; wget -O /etc/yum.repos.d/virtualbox.repo wget http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; dnf install -y VirtualBox-6.1 && /usr/lib/virtualbox/vboxdrv.sh setup ; usermod -a -G vboxusers root ; systemctl start packagekit +systemctl stop packagekit; dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ; dnf install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.19_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.rpm && dnf install -y vagrant_2.2.19_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; dnf install -y VirtualBox-6.1 && /usr/lib/virtualbox/vboxdrv.sh setup ; usermod -a -G vboxusers root ; systemctl start packagekit ``` ##### Also, install the Virtualbox extension pack below - [Install the Virtual Box Extension Pack](https://www.virtualbox.org/wiki/Downloads) @@ -46,7 +46,7 @@ systemctl stop packagekit; dnf -y install https://dl.fedoraproject.org/pub/epel/ - If using Windows: - [Install the Latest Version of Vagrant](https://www.vagrantup.com/downloads.html) - [Install the Latest Version of Virtualbox and Virtual Box Extension Pack](https://www.virtualbox.org/wiki/Downloads) -- Then install the following vagrant plugin via PowerShell as Administrator `vagrant plugin install vagrant-guest_ansible` +- Then install the following vagrant plugin via PowerShell as Administrator `vagrant plugin install vagrant-guest_ansible` - If using Fedora, run `dnf update -y` to update your system, then run the script below as root to install everything at once: ``` dnf -y install wget git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel ; wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo ; mv virtualbox.repo /etc/yum.repos.d/virtualbox.repo ; dnf install -y VirtualBox-6.0 ; usermod -a -G vboxusers ${USER} ; /usr/lib/virtualbox/vboxdrv.sh setup ; dnf -y install vagrant ; dnf remove -y rubygem-fog-core ; vagrant plugin install vagrant-guest_ansible @@ -87,7 +87,7 @@ _NOTE this requires a free Github account_ 4. You are also able to easily pull changes when they're made available. ## Notable Vagrant Commands to control the environment: -- `ansible-playbook playbooks/reset.yml` - Used for resetting the environment after attempting the practice exam in the Red Hat Certs Slack workspace practice exam channel. +- `ansible-playbook playbooks/reset.yml` - Used for resetting the environment after attempting the practice exam in the Red Hat Certs Slack workspace practice exam channel. - `vagrant up` - Boots and provisions the environment - `vagrant destroy -f` - Shuts down and destroys the environment - `vagrant halt` - Only shuts down the environment VMs (can be booted up with `vagrant up`) From 155c8c4d29b0ec567dd21e3c0609c417186b5d6c Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Sun, 14 May 2023 09:19:40 +0200 Subject: [PATCH 2/5] upgrade to compatable versions --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a8c2fe..566985d 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ _NOTE - If it's been awhile since you've run yum update, do that first. Reboot i _NOTE2 - If you receive an error for an ansible guest vagrant plugin, DO NOT worry, as there are two different plugins related to Ansible and only one needs to be installed._ ##### For CentoOS/RHEL7/Manjaro/Arch (Continue below for RHEL 8 specific script) ``` -systemctl stop packagekit; yum install -y epel-release && yum install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.6_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.rpm && yum install -y vagrant_2.2.6_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; vagrant plugin install vagrant-guest-ansible ; wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; yum install -y VirtualBox-6.0 && systemctl start packagekit +systemctl stop packagekit; yum install -y epel-release && yum install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.10_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.10/vagrant_2.2.19_x86_64.rpm && yum install -y vagrant_2.2.19_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; vagrant plugin install vagrant-guest-ansible ; wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; yum install -y VirtualBox-6.1 && systemctl start packagekit ``` ##### If you're using RHEL 8, use the script below: ``` From 3b8443872525e4bed2f58809cd81afb69f7b3d7d Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Sun, 14 May 2023 11:11:48 +0200 Subject: [PATCH 3/5] make commands human readable, fix typos --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 566985d..fa2d08d 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,15 @@ _Powered by Ansible and Vagrant_ ## macOS _Gatekeeper will block virtualbox from installing. All you have to do is go into Security & Privacy of System Preferences and click Allow under the General tab and rerun installation._ ##### Install all at once with the command below: -``` -/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" && xcode-select --install &&brew install ansible ; brew install python ; brew cask install vagrant ; brew cask install VirtualBox ; brew cask install virtualbox-extension-pack ; vagrant plugin install vagrant-guest_ansible +```shell +/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" && \ + xcode-select --install && \ + brew install ansible ; \ + brew install python ; \ + brew cask install vagrant ; \ + brew cask install VirtualBox ; \ + brew cask install virtualbox-extension-pack ; \ + vagrant plugin install vagrant-guest_ansible ``` ##### Alternatively, you can install everything individually below. @@ -26,12 +33,36 @@ _NOTE - If it's been awhile since you've run yum update, do that first. Reboot i _NOTE2 - If you receive an error for an ansible guest vagrant plugin, DO NOT worry, as there are two different plugins related to Ansible and only one needs to be installed._ ##### For CentoOS/RHEL7/Manjaro/Arch (Continue below for RHEL 8 specific script) -``` -systemctl stop packagekit; yum install -y epel-release && yum install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.10_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.10/vagrant_2.2.19_x86_64.rpm && yum install -y vagrant_2.2.19_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; vagrant plugin install vagrant-guest-ansible ; wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; yum install -y VirtualBox-6.1 && systemctl start packagekit +```shell +VAGRANT_VERS="2.2.19" && \ + systemctl stop packagekit; \ + yum install -y epel-release && \ + yum install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; \ + mkdir ~/Vagrant ; \ + cd ~/Vagrant ; \ + curl -o vagrant_${VAGRANT_VERS}_x86_64.rpm https://releases.hashicorp.com/vagrant/${VAGRANT_VERS}/vagrant_${VAGRANT_VERS}_x86_64.rpm && \ + yum install -y vagrant_${VAGRANT_VERS}_x86_64.rpm && \ + vagrant plugin install vagrant-guest_ansible ; \ + vagrant plugin install vagrant-guest-ansible ; \ + wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; \ + yum install -y VirtualBox-6.1 && \ + systemctl start packagekit ``` ##### If you're using RHEL 8, use the script below: -``` -systemctl stop packagekit; dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ; dnf install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; mkdir ~/Vagrant ; cd ~/Vagrant ; curl -o vagrant_2.2.19_x86_64.rpm https://releases.hashicorp.com/vagrant/2.2.19/vagrant_2.2.19_x86_64.rpm && dnf install -y vagrant_2.2.19_x86_64.rpm && vagrant plugin install vagrant-guest_ansible ; wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; dnf install -y VirtualBox-6.1 && /usr/lib/virtualbox/vboxdrv.sh setup ; usermod -a -G vboxusers root ; systemctl start packagekit +```shell +VAGRANT_VERS="2.2.19" && \ + systemctl stop packagekit; \ + dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm ; \ + dnf install -y git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel libguestfs-tools-c ; \ + mkdir ~/Vagrant ; cd ~/Vagrant ; \ + curl -o vagrant_${VAGRANT_VERS}_x86_64.rpm https://releases.hashicorp.com/vagrant/${VAGRANT_VERS}/vagrant_${VAGRANT_VERS}_x86_64.rpm && \ + dnf install -y vagrant_${VAGRANT_VERS}_x86_64.rpm && \ + vagrant plugin install vagrant-guest_ansible ; \ + wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; \ + dnf install -y VirtualBox-6.1 && \ + /usr/lib/virtualbox/vboxdrv.sh setup ; \ + usermod -a -G vboxusers root ; \ + systemctl start packagekit ``` ##### Also, install the Virtualbox extension pack below - [Install the Virtual Box Extension Pack](https://www.virtualbox.org/wiki/Downloads) @@ -48,8 +79,16 @@ systemctl stop packagekit; dnf -y install https://dl.fedoraproject.org/pub/epel/ - [Install the Latest Version of Virtualbox and Virtual Box Extension Pack](https://www.virtualbox.org/wiki/Downloads) - Then install the following vagrant plugin via PowerShell as Administrator `vagrant plugin install vagrant-guest_ansible` - If using Fedora, run `dnf update -y` to update your system, then run the script below as root to install everything at once: -``` -dnf -y install wget git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel ; wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo ; mv virtualbox.repo /etc/yum.repos.d/virtualbox.repo ; dnf install -y VirtualBox-6.0 ; usermod -a -G vboxusers ${USER} ; /usr/lib/virtualbox/vboxdrv.sh setup ; dnf -y install vagrant ; dnf remove -y rubygem-fog-core ; vagrant plugin install vagrant-guest_ansible +```shell +dnf -y install wget git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel ; \ + wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo ; \ + mv virtualbox.repo /etc/yum.repos.d/virtualbox.repo ; \ + dnf install -y VirtualBox-6.1 ; \ + usermod -a -G vboxusers ${USER} ; \ + /usr/lib/virtualbox/vboxdrv.sh setup ; \ + dnf -y install vagrant ; \ + dnf remove -y rubygem-fog-core ; \ + vagrant plugin install vagrant-guest_ansible ``` ##### Once the above software is installed. Do the following if you're running the environment on Windows: @@ -63,8 +102,18 @@ dnf -y install wget git binutils gcc make patch libgomp glibc-headers glibc-deve _NOTE - If it's been awhile since you've run apt update, do that first. Reboot if the kernel was updated._ ##### Install all at once by Copy/Pasting the below command into your terminal as root. -``` -sudo snap install ruby ; sudo apt install ruby-bundler git -y; wget -c https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.deb ; sudo dpkg -i vagrant_2.2.6_x86_64.deb ; wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - ; wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - ; sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"; sudo apt update; sudo apt install -y virtualbox-6.0 ; vagrant plugin install vagrant-guest_ansible +```shell +VAGRANT_VERS="2.2.19" && \ + sudo snap install ruby ; \ + sudo apt install ruby-bundler git -y; \ + wget -c https://releases.hashicorp.com/vagrant/${VAGRANT_VERS}/vagrant_${VAGRANT_VERS}_x86_64.deb ; \ + sudo dpkg -i vagrant_${VAGRANT_VERS}_x86_64.deb ; \ + wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add - ; \ + wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add - ; \ + sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"; \ + sudo apt update; \ + sudo apt install -y virtualbox-6.0 ; \ + vagrant plugin install vagrant-guest_ansible ``` ##### Also, install the Virtualbox extension pack below - [Virtual Box Extension Pack](https://www.virtualbox.org/wiki/Downloads) From 9efeb6f0b2d83fbc11f24349b6815b79ee9236ac Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Sun, 14 May 2023 11:30:01 +0200 Subject: [PATCH 4/5] add /etc/vbox/networks.conf for vbox6.1 and update known issues --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fa2d08d..7cf9f80 100644 --- a/README.md +++ b/README.md @@ -46,6 +46,7 @@ VAGRANT_VERS="2.2.19" && \ vagrant plugin install vagrant-guest-ansible ; \ wget -O /etc/yum.repos.d/virtualbox.repo http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo ; \ yum install -y VirtualBox-6.1 && \ + echo "* 0.0.0.0/0" >> "/etc/vbox/networks.conf" && \ systemctl start packagekit ``` ##### If you're using RHEL 8, use the script below: @@ -62,6 +63,7 @@ VAGRANT_VERS="2.2.19" && \ dnf install -y VirtualBox-6.1 && \ /usr/lib/virtualbox/vboxdrv.sh setup ; \ usermod -a -G vboxusers root ; \ + echo "* 0.0.0.0/0" >> "/etc/vbox/networks.conf" && \ systemctl start packagekit ``` ##### Also, install the Virtualbox extension pack below @@ -74,11 +76,13 @@ VAGRANT_VERS="2.2.19" && \ 4. Run `vagrant up` to deploy the environment (If the environment has a designated repo VM it will take the longest to deploy the first time only, this is because the repo system has all the packages available to the base release but will be quicker on subsequent deployments.) ## Windows/Fedora -- If using Windows: +### If using Windows: - [Install the Latest Version of Vagrant](https://www.vagrantup.com/downloads.html) - [Install the Latest Version of Virtualbox and Virtual Box Extension Pack](https://www.virtualbox.org/wiki/Downloads) - Then install the following vagrant plugin via PowerShell as Administrator `vagrant plugin install vagrant-guest_ansible` -- If using Fedora, run `dnf update -y` to update your system, then run the script below as root to install everything at once: + +### If using Fedora, +- run `dnf update -y` to update your system, then run the script below as root to install everything at once: ```shell dnf -y install wget git binutils gcc make patch libgomp glibc-headers glibc-devel kernel-headers kernel-devel dkms libvirt libvirt-devel ruby-devel libxslt-devel libxml2-devel ; \ wget http://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo ; \ @@ -88,6 +92,7 @@ dnf -y install wget git binutils gcc make patch libgomp glibc-headers glibc-deve /usr/lib/virtualbox/vboxdrv.sh setup ; \ dnf -y install vagrant ; \ dnf remove -y rubygem-fog-core ; \ + echo "* 0.0.0.0/0" >> "/etc/vbox/networks.conf" && \ vagrant plugin install vagrant-guest_ansible ``` @@ -113,6 +118,7 @@ VAGRANT_VERS="2.2.19" && \ sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian bionic contrib"; \ sudo apt update; \ sudo apt install -y virtualbox-6.0 ; \ + echo "* 0.0.0.0/0" >> "/etc/vbox/networks.conf" && \ vagrant plugin install vagrant-guest_ansible ``` ##### Also, install the Virtualbox extension pack below @@ -196,3 +202,6 @@ Error is usually "VT-x is not available. (VERR_VMX_NO_VMX)" or similar, when the Resolution seems to be either remove HyperV, or preventing its hypervisor from starting with the command: bcdedit /set hypervisorlaunchtype off, followed by a reboot. + +On AMD processors, the VMs can hung during reboots with the error: +`watchdog : BUG : soft lockup - CPU stuck for 22-23 secs` From a0f956b1a2914c986721a87adc3f5859e2665dd4 Mon Sep 17 00:00:00 2001 From: Maksim Kramarenko Date: Sun, 14 May 2023 14:03:54 +0200 Subject: [PATCH 5/5] exclude vdi from rsync --- Vagrantfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index c996dbb..328dc9d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -13,21 +13,21 @@ config.vm.box_check_update = false # Repo config.vm.define "repo" do |repo| - repo.vm.box = "rdbreak/rhel8repo" + repo.vm.box = "rdbreak/rhel8repo" repo.vm.provider "virtualbox" do |repo| repo.memory = "1024" unless File.exist?(file_to_disk5) repo.customize ['createhd', '--filename', file_to_disk5, '--variant', 'Standard', '--size', 2 * 1024] repo.customize ['storagectl', :id, '--name', 'SATA Controller', '--add', 'sata', '--portcount', 1] - repo.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk5] - end + repo.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk5] + end end - repo.vm.provision :shell, :inline => "pvs | grep '/dev/sdb' && echo 'The disk was already expanded!' || (pvcreate /dev/sdb; vgextend rhel_rhel8 /dev/sdb; lvextend -l +100%FREE /dev/rhel_rhel8/root; xfs_growfs /dev/rhel_rhel8/root)" + repo.vm.provision :shell, :inline => "pvs | grep '/dev/sdb' && echo 'The disk was already expanded!' || (pvcreate /dev/sdb; vgextend rhel_rhel8 /dev/sdb; lvextend -l +100%FREE /dev/rhel_rhel8/root; xfs_growfs /dev/rhel_rhel8/root ; dracut --regenerate-all --force)" repo.vm.provision :shell, :inline => "sudo sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config; sudo systemctl restart sshd;", run: "always" repo.vm.provision :shell, :inline => "yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm -y; sudo yum install -y sshpass python3-pip python3-devel httpd sshpass vsftpd createrepo", run: "always" repo.vm.provision :shell, :inline => " python3 -m pip install -U pip ; python3 -m pip install pexpect; python3 -m pip install ansible", run: "always" - repo.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: ".git/" + repo.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: [".git/", "*.vdi"] repo.vm.network "private_network", ip: "192.168.55.199" end @@ -46,7 +46,7 @@ config.vm.define "node1" do |node1| node1.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk1] end end - + node1.vm.provision "shell", inline: <<-SHELL yes| sudo mkfs.ext4 /dev/sdb SHELL @@ -68,7 +68,7 @@ config.vm.define "node2" do |node2| node2.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk2] end end - + node2.vm.provision "shell", inline: <<-SHELL yes| sudo mkfs.ext4 /dev/sdb SHELL @@ -90,7 +90,7 @@ config.vm.define "node3" do |node3| node3.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk3] end end - + node3.vm.provision "shell", inline: <<-SHELL yes| sudo mkfs.ext4 /dev/sdb SHELL @@ -112,7 +112,7 @@ config.vm.define "node4" do |node4| node4.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk4] end end - + node4.vm.provision "shell", inline: <<-SHELL yes| sudo mkfs.ext4 /dev/sdb SHELL