Friday, April 6, 2018

Creation of the VirtualMachines on the KVM Host for the overcloud nodes of OpenStack Pike TripleO Overcloud


Creation of the KVM Guests on the KVM Host for the overcloud installation




Please note that all these commands are executed on the KVM Host.



Create the virtual disks for the overcloud servers on the KVM Host 


cd /var/lib/libvirt/images

for i in {1..9}; do qemu-img create -f qcow2 -o preallocation=metadata overcloud-node$i.qcow2 60G; done

--

Create the virtual machines for the overcloud on the KVM Host using the QCOW2 format disks in the previous step 


for i in {1..9}; do virt-install --ram 16384 --vcpus 2 --os-variant rhel7 --disk path=/var/lib/libvirt/images/overcloud-node$i.qcow2,device=disk,bus=virtio,format=qcow2 --noautoconsole --vnc --network network:nat --name overcloud-node$i --cpu Haswell-noTSX,+vmx --dry-run --print-xml > /tmp/overcloud-node$i.xml; virsh define --file /tmp/overcloud-node$i.xml; done


Please note 'Haswell-noTSX' is the hardware model of the Intel CPU on my KVM host. In your case this varies as per the CPUs on the KVM server.

if you want to exactly know what the CPU model as the Libvirtd sees, you can run the command virsh capabilities to see through.

virsh capabilities | grep model 


virsh capabilities | grep model

    <model>Haswell-noTSX</model>
    <secmodel>
      <model>selinux</model>
    </secmodel>
    <secmodel>
      <model>dac</model>
    </secmodel>


You can see here, this is Haswell-noTSX for me.    

--

Once these machines are created on the KVM host, for the machine overcloud-node{4..9} add 2 more 60 GB disks by logging into the virt-manager console.

Please note the the following:

overcloud-node{1..3} will be the overcloud Controller nodes 
overcloud-node{4..6} will be the compute nodes in the overcloud
and
overcloud-node{7..9} will be the ceph-storage nodes for the overcloud

--

Get the information of the Network cards from the VMs 

Please note that this MAC information is to be used in the instackenv.json


As the root user on the KVM Host, run this command to get the MAC addresses of the overcloud-node{1..9} KVM guests.

for i in {1..9}; do virsh domiflist overcloud-node$i | awk '$3 == "nat" {print $5};'; done > /tmp/nodes.txt


52:54:00:3e:58:cf
52:54:00:d5:12:5b
52:54:00:8d:ee:03
52:54:00:2d:3d:94
52:54:00:8d:74:19
52:54:00:df:b3:56
52:54:00:71:5a:71
52:54:00:cc:5c:f7
52:54:00:35:5b:af



[stack@osa ~]$

Please note that the Virtual Machine overcloud-node{4..9} are going to work as compute and ceph-storage nodes.

Specially for the ceph-storage nodes, I had added 2* 60 GB IDE Disk more to the Virtual Machine by accessing the virt-manager GUI.



Go to the Main page of the OpenStack Tripleo on KVM : Openstack Pike TripleO undercloud deployment with overcloud controller HA on KVM (libvirt)


No comments:

Post a Comment