{"id":483,"date":"2017-05-27T21:05:49","date_gmt":"2017-05-27T20:05:49","guid":{"rendered":"http:\/\/darkandscary.co.uk\/?p=483"},"modified":"2017-05-27T21:05:49","modified_gmt":"2017-05-27T20:05:49","slug":"installing-kvm-based-virtualisation-on-opensuse","status":"publish","type":"post","link":"https:\/\/darkandscary.co.uk\/?p=483","title":{"rendered":"Installing KVM-based virtualisation on openSuse"},"content":{"rendered":"<p>Recently I was speaking to a friend about Mikrotik routers and he mentioned that you could download a copy of their RouterOS software to experiment with. I hatched a plan to model a small network with such a router at its core and see what can be done with it in terms of monitoring using SNMP-based tools.<\/p>\n<p>First, I would need to set up a fresh virtualisation platform to play with. I plopped a spare hard drive in to my gaming rig and installed <a href=\"https:\/\/www.opensuse.org\/#Leap\">openSUSE LEAP 42.2<\/a> on to it. That&#8217;s the easy bit of course, but I thought it would be interesting to look in more detail at setting up virtualisation using KVM as the hypervisor and some of the issues I encountered.<\/p>\n<p>The &#8216;Yast &#8216; application has a very useful option for installing a hypervisor. Here&#8217;s what it looks like:<\/p>\n<figure id=\"attachment_477\" aria-describedby=\"caption-attachment-477\" style=\"width: 686px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/Yast-about-to-install-libvirt.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-477 size-full\" src=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/Yast-about-to-install-libvirt.png\" alt=\"\" width=\"686\" height=\"448\" srcset=\"https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/Yast-about-to-install-libvirt.png 686w, https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/Yast-about-to-install-libvirt-300x196.png 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/a><figcaption id=\"caption-attachment-477\" class=\"wp-caption-text\">Click here to begin configuring a hypervisor<\/figcaption><\/figure>\n<p>Clicking on this item then gave me an option to choose which hypervisor:<\/p>\n<figure id=\"attachment_475\" aria-describedby=\"caption-attachment-475\" style=\"width: 373px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/selecting-kvm-components.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-475 size-full\" src=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/selecting-kvm-components.png\" alt=\"\" width=\"373\" height=\"328\" srcset=\"https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/selecting-kvm-components.png 373w, https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/selecting-kvm-components-300x264.png 300w\" sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/a><figcaption id=\"caption-attachment-475\" class=\"wp-caption-text\">Make sure to tick both KVM related boxes<\/figcaption><\/figure>\n<p>Part of the installation process includes offering to set up a network &#8216;bridge&#8217;. My PC has one physical network device, &#8216;eth0&#8217; and it has a static IP address (192.168.1.101) on my house network. The bridge will appear as &#8216;br0&#8217; and will allow my\u00a0virtual machines to access the house network using IP addresses in the same range as my other computers (i.e. 192.168.1.x)<\/p>\n<figure id=\"attachment_473\" aria-describedby=\"caption-attachment-473\" style=\"width: 366px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/require-default-bridge.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-473 size-full\" src=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/require-default-bridge.png\" alt=\"\" width=\"366\" height=\"209\" srcset=\"https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/require-default-bridge.png 366w, https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/require-default-bridge-300x171.png 300w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><\/a><figcaption id=\"caption-attachment-473\" class=\"wp-caption-text\">Saying &#8216;yes&#8217; to this option creates the &#8216;default&#8217; virtual network attached to &#8216;br0&#8217;<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Let&#8217;s check that the network has been created by using the &#8216;ip&#8217; command line tool to see what the state of my network is&#8230;<\/p>\n<figure id=\"attachment_467\" aria-describedby=\"caption-attachment-467\" style=\"width: 741px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/confirming-bridge-setup.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-467 size-full\" src=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/confirming-bridge-setup.png\" alt=\"\" width=\"741\" height=\"560\" srcset=\"https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/confirming-bridge-setup.png 741w, https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/confirming-bridge-setup-300x227.png 300w\" sizes=\"auto, (max-width: 741px) 100vw, 741px\" \/><\/a><figcaption id=\"caption-attachment-467\" class=\"wp-caption-text\">The IP address has moved from &#8216;eth0&#8217; to &#8216;br0&#8217; as expected<\/figcaption><\/figure>\n<p>Ah, but there&#8217;s a problem&#8230; when I booted up the computer a little while later, I had no network connection. For some reason the routing table had become confused. The IP address was linked to the bridge &#8216;br0&#8217; but the default gateway was linked to the original ethernet adapter &#8216;eth0&#8217;. This is easy to fix in Yast under &#8216;System&#8217; -&gt; &#8216;Network Settings&#8217;. Find the entry on routing and change the device from &#8216;eth0&#8217; to &#8216;br0&#8217;. Fixed!<\/p>\n<figure id=\"attachment_463\" aria-describedby=\"caption-attachment-463\" style=\"width: 1350px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/failed-network-after.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-463 size-full\" src=\"http:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/failed-network-after.png\" alt=\"\" width=\"1350\" height=\"766\" srcset=\"https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/failed-network-after.png 1350w, https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/failed-network-after-300x170.png 300w, https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/failed-network-after-768x436.png 768w, https:\/\/darkandscary.co.uk\/wp-content\/uploads\/2017\/05\/failed-network-after-1024x581.png 1024w\" sizes=\"auto, (max-width: 1350px) 100vw, 1350px\" \/><\/a><figcaption id=\"caption-attachment-463\" class=\"wp-caption-text\">Use the dropdown to select the correct interface &#8211; br0<\/figcaption><\/figure>\n<p>In another post I will look at setting up &#8216;Virtual Machine manager&#8217; and install a copy of RouterOS to play with.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I was speaking to a friend about Mikrotik routers and he mentioned that you could download a copy of their RouterOS software to experiment with. I hatched a plan to model a small network with such a router at its core and see what can be done with it in terms of monitoring using &hellip; <a href=\"https:\/\/darkandscary.co.uk\/?p=483\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Installing KVM-based virtualisation on openSuse<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,21],"tags":[],"class_list":["post-483","post","type-post","status-publish","format-standard","hentry","category-linux","category-virtualisation"],"_links":{"self":[{"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/483","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=483"}],"version-history":[{"count":1,"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/483\/revisions"}],"predecessor-version":[{"id":485,"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/483\/revisions\/485"}],"wp:attachment":[{"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=483"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=483"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/darkandscary.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=483"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}