{"id":3119,"date":"2016-09-03T16:33:03","date_gmt":"2016-09-03T16:33:03","guid":{"rendered":"http:\/\/blog.shineservers.com\/?p=3114"},"modified":"2016-09-03T16:33:03","modified_gmt":"2016-09-03T16:33:03","slug":"setup-virtualisation-kvm-centos-solusvm-slave","status":"publish","type":"post","link":"https:\/\/www.shineservers.com\/2016\/09\/03\/setup-virtualisation-kvm-centos-solusvm-slave\/","title":{"rendered":"How To Setup Virtualisation With KVM On A CentOS (SolusVM Slave)"},"content":{"rendered":"<p><iframe title=\"How To Setup Virtualisation With KVM On A CentOS (SolusVM Slave)\" width=\"1200\" height=\"675\" src=\"https:\/\/www.youtube.com\/embed\/6wkEBzZLljo?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe><\/p>\n<p><strong>Steps To Setup:<\/strong><\/p>\n<p><strong>Part 1 &#8211; Disk Setup<\/strong><\/p>\n<p>Fdisk is the most commonly used command to check the partitions on a disk. The fdisk command can display the partitions and details like file system type. However it does not report the size of each partitions.<\/p>\n<p>$ sudo fdisk -l<\/p>\n<p>You cannot create a Linux partition larger than 2 TB using the fdisk command. The fdisk won\u2019t create partitions larger than 2 TB. This is fine for desktop and laptop users, but on server you need a large partition. For example, you cannot create 3TB or 4TB partition size (RAID based) using the fdisk command. It will not allow you to create a partition that is greater than 2TB.<\/p>\n<p>Creating 4 TB Partition Size<\/p>\n<p>To create a partition start GNU parted as follows:<\/p>\n<p>$ parted \/dev\/sdb<\/p>\n<p>Creates a new Partition Table:<\/p>\n<p>$ (parted) mklabel gpt<\/p>\n<p>Next, set the default unit to TB, enter:<\/p>\n<p>$ (parted) unit TB<\/p>\n<p>To create a 4 TB partition size, enter:<\/p>\n<p>$ (parted) mkpart primary 0.00TB 4.00TB<\/p>\n<p>To print the current partitions, enter:<\/p>\n<p>$ (parted) print<\/p>\n<p>Quit and save the changes, enter:<\/p>\n<p>$ (parted) quit<br \/>\nUse the mkfs.ext4 command to format the file system: (Optionally You can use mkfs.ext3 if needed)<\/p>\n<p>$ mkfs.ext4 \/dev\/sdb1<br \/>\nCreate the PV through following command:<\/p>\n<p>$ pvcreate \/dev\/sdb1<\/p>\n<p>You can check that new PV through this command:<\/p>\n<p>$ pvscan<\/p>\n<p>Create the Volume Group:<\/p>\n<p>$ vgcreate -s 32M vg1 \/dev\/sdb1<\/p>\n<p>You can check that new volume group through this command:<\/p>\n<p>$ vgdisplay<br \/>\n<strong>Part 2 &#8211; Network Setup<\/strong><\/p>\n<p>Bridging requires the bridge-utils package to be installed on the server. To check if it&#8217;s installed, do the following:<\/p>\n<p>$ rpm -q bridge-utils<\/p>\n<p>If you get an output &#8211; it&#8217;s installed, if not, it needs installing:<\/p>\n<p>$ yum install bridge-utils<\/p>\n<p>Before setting up your bridge, the contents of \/etc\/sysconfig\/network-scripts\/ifcfg-eth0 will look like the following:<\/p>\n<p>DEVICE=eth0<br \/>\nBOOTPROTO=static<br \/>\nBROADCAST=102.100.152.255<br \/>\nHWADDR=00:27:0E:09:0C:B2<br \/>\nIPADDR=102.100.152.2<br \/>\nIPV6INIT=yes<br \/>\nIPV6_AUTOCONF=yes<br \/>\nNETMASK=255.255.255.0<br \/>\nNETWORK=102.100.152.0<br \/>\nONBOOT=yes<\/p>\n<p>To back up your current ifcfg-eth0 before modification:<\/p>\n<p>1. Run the following command:<\/p>\n<p>$ cp \/etc\/sysconfig\/network-scripts\/ifcfg-eth0 \/etc\/sysconfig\/network-scripts\/backup-ifcfg-eth0<\/p>\n<p>2.Create the bridge file:<\/p>\n<p>$ nano -w \/etc\/sysconfig\/network-scripts\/ifcfg-br0<\/p>\n<p>3. Copy parts of ifcfg-eth0 to it:<\/p>\n<p>DEVICE=br0<br \/>\nTYPE=Bridge<br \/>\nBOOTPROTO=static<br \/>\nBROADCAST=102.100.152.255<br \/>\nIPADDR=102.100.152.2<br \/>\nNETMASK=255.255.255.0<br \/>\nNETWORK=102.100.152.0<br \/>\nONBOOT=yes<\/p>\n<p>4. Save that file and edit ifcfg-eth0:<\/p>\n<p>$ nano -w \/etc\/sysconfig\/network-scripts\/ifcfg-eth0<\/p>\n<p>5. Remove the networking parts and specify the bridge:<\/p>\n<p>DEVICE=eth0<br \/>\nHWADDR=00:27:0E:09:0C:B2<br \/>\nIPV6INIT=yes<br \/>\nIPV6_AUTOCONF=yes<br \/>\nONBOOT=yes<br \/>\nBRIDGE=br0<\/p>\n<p>6. Bridge is \u00a0set\u00a0up. Make sure that the changes are correct and restart the networking:<\/p>\n<p>$ \/etc\/init.d\/network restart<\/p>\n<p>7. Once it&#8217;s restarted you see the new bridge using the ifconfig command:<\/p>\n<p>[root@bharat ~]# ifconfig<br \/>\nbr0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Link encap:Ethernet\u00a0 HWaddr 00:27:0E:09:0C:B2<br \/>\ninet addr:102.100.152.2\u00a0 Bcast:102.100.152.255\u00a0 Mask:255.255.255.0<br \/>\ninet6 addr: fe80::227:eff:fe09:cb2\/64 Scope:Link<br \/>\nUP BROADCAST RUNNING MULTICAST\u00a0 MTU:1500\u00a0 Metric:1<br \/>\nRX packets:48 errors:0 dropped:0 overruns:0 frame:0<br \/>\nTX packets:67 errors:0 dropped:0 overruns:0 carrier:0<br \/>\ncollisions:0 txqueuelen:0<br \/>\nRX bytes:2984 (2.9 KiB)\u00a0 TX bytes:13154 (12.8 KiB)<\/p>\n<p>eth0\u00a0\u00a0\u00a0\u00a0\u00a0 Link encap:Ethernet\u00a0 HWaddr 00:27:0E:09:0C:B2<br \/>\ninet6 addr: fe80::227:eff:fe09:cb2\/64 Scope:Link<br \/>\nUP BROADCAST RUNNING MULTICAST\u00a0 MTU:1500\u00a0 Metric:1<br \/>\nRX packets:31613 errors:0 dropped:0 overruns:0 frame:0<br \/>\nTX packets:9564 errors:0 dropped:0 overruns:0 carrier:0<br \/>\ncollisions:0 txqueuelen:100<br \/>\nRX bytes:2981335 (2.8 MiB)\u00a0 TX bytes:2880868 (2.7 MiB)<br \/>\nMemory:d0700000-d0720000<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Part 3 &#8211; Installing a SolusVM KVM Slave:<\/strong><\/p>\n<p>In SSH as root do the following:<\/p>\n<p>$ wget http:\/\/soluslabs.com\/installers\/solusvm\/install<\/p>\n<p>$ chmod 755 install<\/p>\n<p>$ .\/install<\/p>\n<p>Now, follow the steps as shown in Video.<\/p>\n<p>The install will now do it&#8217;s work.You will get next output (output text may vary)<\/p>\n<p>Once the installer is complete you will be presented with the slave keys and any further instructions for your install type.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Steps To Setup: Part 1 &#8211; Disk Setup Fdisk is the most commonly used command to check the partitions on a disk. The fdisk command can display the partitions and details like file system type. However it does not report the size of each partitions. $ sudo fdisk -l You cannot create a Linux partition [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[60],"tags":[237,242,243,244,245,246,247,248,249,250,251,252,253],"class_list":["post-3119","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos","tag-disk","tag-disksetup","tag-kvm-setup","tag-kvm-virtualization","tag-mkfs-ext","tag-network","tag-parted","tag-pvcreate","tag-pvdisplay","tag-solusvm","tag-vgcreate","tag-vgdisplay"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/comments?post=3119"}],"version-history":[{"count":0,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/posts\/3119\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/media?parent=3119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/categories?post=3119"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shineservers.com\/wp-json\/wp\/v2\/tags?post=3119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}