2nd File To Students KVM - Host - Creation
2nd File To Students KVM - Host - Creation
2nd File To Students KVM - Host - Creation
Section K22DT
1. Type "Control panel" into the Search Bar and click on the Control Panel suggestion.
2. Click on Programs
Select Turn Windows features on or off
INT-362
Adding hosts
Set up VirtualBox nested virtualization
The system settings are divided into a series of tabs. Select the Processor tab, then the Enable Nested VT-x/AMD-V
checkbox and click OK. Now the VM is ready for nested virtualization
Step 3
INT-362
UUID=$(uuid)
Edit permission
Again run these in root mode by entering
su root and your password
INT362
Edit permission- Called libvirtd INT-362
file
You should make these settings in sudo nano /etc/libvirt/libvirtd.conf
uncomment the lines (very imp)
• listen_tls=0
• listen_tcp=0
• tcp_port = "16509"
• tls_port = "16514"
• listen_addr = "192.168.139.2“ # set as your gateway-------------
• mdns_adv = 0 # this line needs to be added separately
• auth_tcp = "none"
Edit permission
You should make these settings in sudo nano/etc/cloudstack/agent/agent.properties,
change these lines
• host=[give your management server ip here]@static
This should look like host=192.168.139.133@static
Uncomment the lines
• private.network.device=cloudbr0
• public.network.device=cloudbr0
• guest.network.device=cloudbr0
Edit permission
You should run these in root mode by entering
su root and your password
ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/
ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/
apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd
apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper
INT-362
Configure Networks
Bridging will be needed between management server and KVM
Configure Firewall
Your firewall needs information on working ports so run these
$ ufw allow proto tcp from any to any port 22
did you get permission denied.... who will give sudo in front?
$ ufw allow proto tcp from any to any port 1798
$ ufw allow proto tcp from any to any port 16514
$ ufw allow proto tcp from any to any port 5900:6100
$ ufw allow proto tcp from any to any port 49152:49216
or you could get rid of it using
sudo ufw disable
INT-362
1. Setting up a Zone
2. Setting up a Pod
3. Setting up a Cluster
4. Setting up a Host
Zones
A CloudStack Zone (often called Availability Zone) is the largest organisational unit
within a CloudStack deployment. Typically, a datacentre (DC) implementation will
contain a single Zone, but there are no hard and fast rules, and a DC can contain
multiple Zones. By structuring CloudStack into geographical Zones, virtual instances
and data storage can be placed in specific locations to comply with an organisation’s
data storage policies etc.
A Zone consists of at least one Pod, and Secondary Storage which is shared by all
Pods in the Zone.
Zones are visible to end users, who can then choose which Zone they wish to create
their virtual Instances in.
Pods
Typically, a Pod relates to a discrete rack in a datacentre so that from CloudStack a
whole rack/pod of hosts can be taken offline for maintenance as a group. Pods
contain one or more Clusters, and a Layer 2 switch architecture which is shared by
all Clusters in that Pod. End users are not aware of and have no visibility of Pods.
INT362
Clusters
A Cluster is a group of identical Hosts running a common Hypervisor. For example, a
Cluster could be a XenServer Pool, a group of KVM Servers or a VMware cluster pre-
configured in vCenter. Each Cluster has a dedicated Primary Storage array which is where
the virtual machine instances are hosted.
Primary Storage
Primary Storage is usually unique to each Cluster (although it could also be used Zone-
wide) and is used to host Instances. CloudStack is designed to work with all standards-
compliant iSCSI and NFS Servers supported by the underlying Hypervisor. Special storage
solutions are also supported (such as CEPH, ScaleIO, SolidFire, etc). Primary Storage is a
critical component and should be built on high-performance hardware with multiple high-
speed disks.
Secondary Storage
Secondary Storage is used to store Instance Templates, ISO images and Volume
Snapshots. The storage is available to all PODs in a Zone. Secondary Storage uses the
Network File System (NFS) as this ensures it can be accessed by any Host in the Zone.
Instances
An Instance is a virtual machine that can be created by the end-user of CloudStack.
Instances are based on Instance Templates and Service Offerings which specify the size
(vCPU & RAM).
INT362
Configuration: UI ACCESS
1.To get access to CloudStack’s web interface, point your browser to the IP address of your machine e.g.
http://192.168.11.159:8080/client
2.The default username is ‘admin’, and the default password is ‘password’. ——->>> Login
INT362
Setting up a Zone:
1.Go to Infrastructure ® Zone and click on “add
zone” button.
2.Select “Core”, click on ‘Next’
3.Select “Advanced zone” and provide the following
configuration (leaving all other defaults):
INT362
INT362
Name : Zone1
IPV4 : 8.8.8.8
Hypervisor : KVM
INT362
Setting up a Network:
1.On the next screen (Physical
network details), use the
defaults – we will use the
VLAN isolation method on a
single physical NIC (on the
host) that will carry all traffic
types (management, public,
guest) and
2.click “Next”.
INT362
Public traffic configuration:
Gateway - 192.168.11.2
(your VM gateway)
Netmask - 255.255.255.0
VLAN/VNI - leave blank
Start IP - 192.168.11.134
End IP - 192.168.11.164
Click on the “Add” button,
click on “Next”
INT362
Pod Configuration:
Click on “Next”
INT362
Guest traffic:
VLAN/VNI range:
700-900
Click on “Next”
INT362
Create a cluster with the following:
Name – e.g. Cluster1
Click on “Next”
INT362
Add your default/first host:
Hostname - 192.168.11.132
Username - root
user>
Click on “Next”
INT362
Add primary storage:
Click on “Next”
INT362
Add secondary storage:
Provider - NFS
Path - /export/secondary
Click on “Next”
INT362
INT362
INT362
Completed- Now
move towards next
file of adding instance
on Host INT362