This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| network_stuff:juniper:host-preparation [2019/12/05 13:17] – created jotasandoku | network_stuff:juniper:host-preparation [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| HOST PREPARATION: | HOST PREPARATION: | ||
| - | [[https:// | + | Combine the requirements below with the ones listed in the " |
| \\ | \\ | ||
| + | Verify that INTEL VT-d is enabled (note amd-v is not working for this!) | ||
| + | cat / | ||
| + | cat / | ||
| Disable KSM by setting KSM_ENABLED=0 in / | Disable KSM by setting KSM_ENABLED=0 in / | ||
| systemctl disable ksm | systemctl disable ksm | ||
| Line 7: | Line 10: | ||
| \\ | \\ | ||
| HUGEPAGES (x2 1G size)\\ | HUGEPAGES (x2 1G size)\\ | ||
| - | [[https://oracle-base.com/ | + | [[https://mycompany2-base.com/ |
| \\ | \\ | ||
| + | * For hugepages: | ||
| + | * determine whether our system is UEFI. If this exists, is uefi: "cat / | ||
| + | |||
| + | vim / | ||
| + | # 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 / | ||
| + | [root@networklab01.ash.oci.mycompany1.co.uk ~]# grep Hugepagesize / | ||
| + | Hugepagesize: | ||
| + | | ||
| + | APIC and KSM: | ||
| + | Apic [[https:// | ||
| + | |||
| + | |||
| + | cat / | ||
| + | options kvm_intel nested=1 enable_apicv=0 | ||
| + | KSM_ENABLED=0 | ||
| + | |||
| + | Or | ||
| + | vim / | ||
| + | # add this: | ||
| + | ... noapic" | ||
| + | grub2-mkconfig -o / | ||
| + | | ||
| + | | ||
| KVM INSTALL:\\ | KVM INSTALL:\\ | ||
| - | [[https:// | + | * [[https:// |
| + | |||
| + | 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 | ||
| \\ | \\ | ||
| Line 16: | Line 57: | ||
| [[https:// | [[https:// | ||
| \\ | \\ | ||
| + | yum -y install https:// | ||
| vagrant version && vagrant plugin list # to check vagrant version | vagrant version && vagrant plugin list # to check vagrant version | ||
| yum install ./ | yum install ./ | ||
| Line 24: | Line 66: | ||
| yum install ruby-devel | yum install ruby-devel | ||
| - | yum -y install qemu libvirt libvirt-devel ruby-devel gcc | ||
| yum -y install qemu libvirt libvirt-devel ruby-devel gcc | yum -y install qemu libvirt libvirt-devel ruby-devel gcc | ||
| vagrant plugin install vagrant-libvirt | vagrant plugin install vagrant-libvirt | ||
| + | |||
| + | |||
| + | Create virtual network for vagrant (for the management addresses): | ||
| + | |||
| + | cat << EOF > / | ||
| + | <network connections=' | ||
| + | < | ||
| + | <forward mode=' | ||
| + | <nat> | ||
| + | <port start=' | ||
| + | </ | ||
| + | </ | ||
| + | <bridge name=' | ||
| + | <ip address=' | ||
| + | < | ||
| + | <range start=' | ||
| + | </ | ||
| + | </ip> | ||
| + | </ | ||
| + | | ||
| + | EOF | ||
| + | |||
| + | virsh net-define / | ||
| + | virsh net-start vagrant-libvirt | ||
| + | virsh net-autostart vagrant-libvirt | ||
| + | |||
| + | \\ | ||
| [[https:// | [[https:// | ||
| Line 32: | Line 100: | ||
| \\ | \\ | ||
| Before virt-install , add vagrant-libvirt network from | Before virt-install , add vagrant-libvirt network from | ||
| - | | + | |
| \\ | \\ | ||
| For qemu permissions: | For qemu permissions: | ||
| + | |||
| + | |||
| + | |||
| + | ssh-keygen # upload key to gitlab | ||
| + | eval $(ssh-agent -s) | ||
| + | ssh-add ~/.ssh/* | ||
| + | git clone git@gitlab.mycompany2datacloud.com: | ||
| + | git clone git@gitlab.mycompany2datacloud.com: | ||
| + | |||