Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Laptop KVM Setup

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 3

ON LAPTOP

# virt-host-validate ----------> this should have all


columns reporting as PASS
# brctl show ----------> Note the virbrX number
# vi /etc/libvirt/qemu/networks/isolated.xml
<!--
WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE
OVERWRITTEN AND LOST. Changes to this xml configuration should be made using:
virsh net-edit isolated
or other application using the libvirt API.
-->

<network>
<name>isolated</name>
<uuid>1acc23fb-fc90-48d6-9b20-4f56947c2985</uuid>
<forward mode='nat'/>
<bridge name='virbr1' stp='on' delay='0'/> -------------------> # change
virbrX according to brctl show command i.e. append virbrX+1 here
<mac address='52:54:00:90:8b:cc'/>
<ip address='192.168.123.1' netmask='255.255.255.0'>
</ip>
</network>

# sudo systemctl restart libvirtd


# sudo virsh net-start isolated
# sudo virsh net-autostart isolated
# brctl show

Create a RHEL 7.2 VM with 4096 RAM and 120G HDD with isolated network
And network parameters should be of type virtio and HDD as well virtio

==========
Inside VM
=========
# cat > /etc/hosts << EOF
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.123.2 satellite.lab.example.com satellite
192.168.123.1 kvm.lab.example.com kvm
EOF
# hostnamectl set-hostname satellite.lab.example.com
# hostname satellite.lab.example.com
# # cat /etc/yum.repos.d/satellite.repo
[rhel-7-server-rpms]
name=RHEL 7 Server RPMs
baseurl=ftp://192.168.123.1/pub/satellite/rhel-7-server-rpms
gpgcheck=0
enabled=1

[rhel-7-server-satellite-6.2-rpms]
name=RHEL 7 Server Satellite 6.2 RPMs
baseurl=ftp://192.168.123.1/pub/satellite/rhel-7-server-satellite-6.2-rpms
gpgcheck=0
enabled=1

[rhel-server-rhscl-7-rpms]
name=RHEL 7 Server RHSCL RPMs
baseurl=ftp://192.168.123.1/pub/satellite/rhel-server-rhscl-7-rpms
gpgcheck=0
enabled=1

# yum install satellite -y

# satellite-installer --scenario satellite \


--foreman-admin-password "admin" \
--foreman-admin-password "redhat" \
--foreman-initial-location "India" \
--foreman-initial-organization "RedHat" \
--foreman-proxy-dns "true" \
--foreman-proxy-dns-forwarders "192.168.123.2" \
--foreman-proxy-dns-interface "eth0" \
--foreman-proxy-dns-zone "lab.example.com" \
--foreman-proxy-dns-reverse "123.168.192.in-addr.arpa" \
--foreman-proxy-dhcp "true" \
--foreman-proxy-dhcp-interface "eth0" \
--foreman-proxy-dhcp-range "192.168.123.25 192.168.123.254" \
--foreman-proxy-tftp "true" \
--capsule-puppet "true" \
--foreman-proxy-puppetca "true"

# mkdir ~/.hammer
cat > ~/.hammer/cli_config.yml <<EOF
:foreman:
:host: 'https://satellite.lab.example.com/'
:username: 'admin'
:password: 'redhat'
EOF

# systemctl start firewalld


# systemctl enable firewalld
# firewall-cmd --permanent --add-service=RH-Satellite-6 \
--add-service=dns \
--add-service=dhcp \
--add-service=tftp
# firewall-cmd --permanent --add-port=5674/tcp
# firewall-cmd --permanent --add-port=5910-5930/tcp
# firewall-cmd --reload

# ORG="RedHat"
# LOC="India"
# yum install wget -y
# wget http://dhcp9-239.gsslab.pnq.redhat.com/pub/satellite6.zip -P /tmp
# hammer subscription upload --organization "$ORG" --file /tmp/satellite6.zip
# hammer organization update --name "$ORG" --redhat-repository-url
"http://dell-per320-3.gsslab.pnq.redhat.com/pub/local-cdn/"

# hammer repository-set enable --organization "$ORG" --product "Red Hat


Enterprise Linux Server" --basearch "x86_64" --releasever "7Server" --name "Red Hat
Enterprise Linux 7 Server (RPMs)"
# hammer repository-set enable --organization "$ORG" --product "Red Hat
Enterprise Linux Server" --basearch "x86_64" --releasever "7.2" --name "Red Hat
Enterprise Linux 7 Server (Kickstart)"

# hammer repository synchronize --organization "$ORG" --product "Red Hat


Enterprise Linux Server" --name "Red Hat Enterprise Linux 7 Server RPMs x86_64
7Server"
# hammer repository synchronize --organization "$ORG" --product "Red Hat
Enterprise Linux Server" --name "Red Hat Enterprise Linux 7 Server Kickstart
x86_64 7.2"

# hammer organization update --name "$ORG" --redhat-repository-url


"https://cdn.redhat.com"
# hammer repository-set enable --organization "$ORG" --product "Red Hat
Enterprise Linux Server" --basearch "x86_64" --name "Red Hat Satellite Tools 6.2
(for RHEL 7 Server) (RPMs)"
# hammer repository synchronize --organization "$ORG" --product "Red Hat
Enterprise Linux Server" --name "Red Hat Enterprise Linux 7 Server RPMs x86_64
7Server"
# hammer repository synchronize --organization "$ORG" --product "Red Hat
Enterprise Linux Server" --name "Red Hat Satellite Tools 6.2 for RHEL 7 Server
RPMs x86_64"
# hammer repository synchronize --organization "$ORG" --product "Red Hat
Enterprise Linux Server" --name "Red Hat Enterprise Linux 7 Server Kickstart
x86_64 7.2"

# satellite-installer --scenario satellite \


--foreman-proxy-dns "true" \
--foreman-proxy-dns-forwarders "192.168.123.1" \
--foreman-proxy-dns-interface "eth0" \
--foreman-proxy-dns-reverse "123.168.192.in-addr.arpa" \
--foreman-proxy-dhcp "true" \
--foreman-proxy-dhcp-interface "eth0" \
--foreman-proxy-dhcp-range "192.168.123.25 192.168.123.254"

You might also like