HOST PREPARATION:\\ Combine the requirements below with the ones listed in the "Preparing the CentOS Host to Install vMX" in [[https://www.juniper.net/documentation/en_US/vmx/topics/topic-map/vmx-installing-on-kvm.html#id-preparing-the-ubuntu-host-to-install-vmx]] \\ Verify that INTEL VT-d is enabled (note amd-v is not working for this!) cat /proc/cpuinfo | egrep -i vmx # we Want this cat /proc/cpuinfo | egrep -i svm # we Don't want this Disable KSM by setting KSM_ENABLED=0 in /etc/default/qemu-kvm: \\ systemctl disable ksm systemctl disable ksmtuned \\ HUGEPAGES (x2 1G size)\\ [[https://mycompany2-base.com/articles/linux/configuring-huge-pages-for-mycompany2-on-linux-64]] \\ * For hugepages: * determine whether our system is UEFI. If this exists, is uefi: "cat /sys/firmware/efi/" vim /etc/default/grub # add this (one line): default_hugepagesz=1G hugepagesz=1G hugepages=number-of-numa-sockets intel_iommu=on" default_hugepagesz=1G hugepagesz=1G hugepages=50 intel_iommu=on" grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg [root@networklab01.ash.oci.mycompany1.co.uk ~]# grep Hugepagesize /proc/meminfo Hugepagesize: 1048576 kB APIC and KSM: Apic [[https://access.redhat.com/solutions/58790|info]] cat /etc/qemu-kvm/target-x86_64.conf options kvm_intel nested=1 enable_apicv=0 KSM_ENABLED=0 Or vim /etc/default/grub # add this: ... noapic" grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg KVM INSTALL:\\ * [[https://www.cyberciti.biz/faq/how-to-install-kvm-on-centos-7-rhel-7-headless-server/]] yum update yum install -y qemu-kvm libvirt libvirt-python libguestfs-tools virt-install systemctl enable libvirtd systemctl start libvirtd lsmod | grep -i kvm * If we don't have root ssh access to the host, we need to add our user to the libvirt group so we can use virt-manager remotely: usermod -a -G libvirt jaime.santos.amandi \\ INSTALL VAGRANT (NOT with vbox5.1_)\\ [[https://www.tecmint.com/how-to-install-vagrant-on-centos-7/]] \\ yum -y install https://releases.hashicorp.com/vagrant/2.2.6/vagrant_2.2.6_x86_64.rpm vagrant version && vagrant plugin list # to check vagrant version yum install ./vagrant_2.2.5_x86_64.rpm # download the last version \\ **Using The Libvirt Provider With Vagrant**\\ [[https://github.com/vagrant-libvirt/vagrant-libvirt]] [[https://codingpackets.com/blog/using-the-libvirt-provider-with-vagrant]] yum install ruby-devel yum -y install qemu libvirt libvirt-devel ruby-devel gcc vagrant plugin install vagrant-libvirt # works Create virtual network for vagrant (for the management addresses): cat << EOF > /var/tmp/vagrant-libvirt-net.xml vagrant-libvirt EOF virsh net-define /var/tmp/vagrant-libvirt-net.xml virsh net-start vagrant-libvirt virsh net-autostart vagrant-libvirt \\ [[https://github.com/vagrant-libvirt/vagrant-libvirt/blob/master/README.md]] \\ Before virt-install , add vagrant-libvirt network from service libvirtd restart \\ For qemu permissions: [[https://github.com/jedi4ever/veewee/issues/996]] ssh-keygen # upload key to gitlab eval $(ssh-agent -s) ssh-add ~/.ssh/* git clone git@gitlab.mycompany2datacloud.com:jaime.santos.amandi/junos-vmx-vagrant-virtual-lab.git git clone git@gitlab.mycompany2datacloud.com:jaime.santos.amandi/junos-vqfx-vagrant-virtual-lab.gi