00- Creating Host Machine

- Architecture:

We will have two virtualization layers:
KVM VM: "ceph-host" I am going to install VirtualBox inside it to host the following second Layers VMs:
"ceph-node1", "ceph-node2" and "ceph-node3"

- Host VM Specs from KVM side:

[root@base ~]# hostname
base.lab
[root@base ~]# virsh net-info Ceph-network
Name:           Ceph-network
UUID:           a9e874ca-539f-40db-a2f3-ad734e54eae8
Active:         yes
Persistent:     yes
Autostart:      yes
Bridge:         virbr1
[root@base ~]# virsh net-dumpxml Ceph-network
<network connections='1'>
  <name>Ceph-network</name>
  <uuid>a9e874ca-539f-40db-a2f3-ad734e54eae8</uuid>
  <forward mode='nat'>
    <nat>
      <port start='1024' end='65535'/>
    </nat>
  </forward>
  <bridge name='virbr1' stp='on' delay='0'/>
  <mac address='52:54:00:6b:fc:69'/>
  <domain name='Ceph-network'/>
  <ip address='192.168.100.1' netmask='255.255.255.0'>
    <dhcp>
      <range start='192.168.100.128' end='192.168.100.178'/>
    </dhcp>
  </ip>
</network>
[root@base ~]# virsh list --all
 Id    Name                           State
----------------------------------------------------
 6     ceph-host                      running


- I will install VirtualBox 5.1 on the above VM using the following HowTo, Then I installed "VirtualBox Extension Pack":

https://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel/

- VM OS info:

"Make sure to have GUI Installation for this VM in order to run VirtualBox"
[root@ceph-host ~]# ip a show
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:ed:87:48 brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.100/24 brd 192.168.100.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:feed:8748/64 scope link 
       valid_lft forever preferred_lft forever
3: virbr0:  mtu 1500 qdisc noqueue state DOWN qlen 1000
    link/ether 52:54:00:62:92:f2 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
       valid_lft forever preferred_lft forever
4: virbr0-nic:  mtu 1500 qdisc pfifo_fast master virbr0 state DOWN qlen 1000
    link/ether 52:54:00:62:92:f2 brd ff:ff:ff:ff:ff:ff
[root@ceph-host ~]# cat /etc/resolv.conf 
# Generated by NetworkManager
search lab
nameserver 192.168.100.1
nameserver 8.8.8.8
[root@ceph-host ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.100.1   0.0.0.0         UG    100    0        0 eth0
192.168.100.0   0.0.0.0         255.255.255.0   U     100    0        0 eth0
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
[root@ceph-host ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@ceph-host ~]# uname -a
Linux ceph-host.lab 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


- Install "epel" Repo, update OS and reboot:

[root@ceph-host ~]# yum -y install epel-release
[root@ceph-host ~]# yum -y update
[root@ceph-host ~]# reboot 
[root@ceph-host ~]# yum repolist 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: centos.bhs.mirrors.ovh.net
 * epel: fedora.mirrors.pair.com
 * extras: centos.bhs.mirrors.ovh.net
 * updates: centos.zswap.net
repo id                                                        repo name                                                                                        status
base/7/x86_64                                                  CentOS-7 - Base                                                                                   9,363
epel/x86_64                                                    Extra Packages for Enterprise Linux 7 - x86_64                                                   11,850
extras/7/x86_64                                                CentOS-7 - Extras                                                                                   451
updates/7/x86_64                                               CentOS-7 - Updates                                                                                2,146
virtualbox/7/x86_64                                            Oracle Linux / RHEL / CentOS-7 / x86_64 - VirtualBox                                                 41
repolist: 23,851


- Take Cold snapshot

virsh # snapshot-list ceph-host
 Name                 Creation Time             State
------------------------------------------------------------
 00_ready_to_deploy   2017-09-01 16:51:59 +0200 shutoff

No comments:

Post a Comment

01- Setting up a virtual infrastructure

- Make sure that 'ceph-Host' has enabled Nested KVM Virtualization: [root@base ~]# virsh dumpxml ceph-host | grep "cpu mod...