{"id":881,"date":"2016-09-06T12:03:39","date_gmt":"2016-09-06T10:03:39","guid":{"rendered":"http:\/\/ndk.sytes.net\/wordpress\/?p=881"},"modified":"2016-09-06T12:03:39","modified_gmt":"2016-09-06T10:03:39","slug":"change-ide-to-virtio-disk-in-kvm","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=881","title":{"rendered":"Change IDE to VirtIO Disk in KVM"},"content":{"rendered":"<p>\n\tI want to show you how to change an IDE disk to a VirtIO disk in an already done guest. In my example it is a FreeBSD 10.3 guest:\n<\/p>\n<p>\n\tFirst open your guest&#39;s \/etc\/fstab and change:\n<\/p>\n<pre>\nall \/dev\/ada0pX to \/dev\/vtbd0pX (FreeBSD only)\nall \/dev\/sdaX to \/dev\/vdaX (Linux only)<\/pre>\n<p>\n\tNow shutdown the guest and connect to your KVM host&#39;s shell. Then type:\n<\/p>\n<pre>\n# virsh edit &lt;SERVER_DOMAIN&gt;<\/pre>\n<p>\n\tfind following line:\n<\/p>\n<pre>\n&lt;disk type=&#39;file&#39; device=&#39;disk&#39;&gt;\n    ...\n    &lt;target dev=&#39;hda&#39; bus=&#39;ide&#39;\/&gt;\n    ...\n&lt;\/disk&gt;<\/pre>\n<p>\n\tand change it to\n<\/p>\n<pre>\n&lt;target dev=&#39;vda&#39; bus=&#39;virtio&#39;\/&gt;<\/pre>\n<p>\n\talso remove all occurance of &quot;&lt;address type=&#8230;&quot; within the same disk section. On save KVM will regenerate the line for you. Note that this part is needed for correct disk values wihtin the guest!\n<\/p>\n<p>\n\tNow restart your guest and everything should be running.\n<\/p>\n<pre>\n# virsh start &gt;SERVER_DOMAIN&gt;<\/pre>\n<p>\n\t<strong>PLEASE NOTE: This method has worked for me on any Linux\/FreeBSD guest but apparently there were some windows installations were this method broke the MBR, so please do a backup first!<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I want to show you how to change an IDE disk to a VirtIO disk in an already done guest. In my example it is a FreeBSD 10.3 guest: First open your guest&#39;s \/etc\/fstab and change: all \/dev\/ada0pX to \/dev\/vtbd0pX (FreeBSD only) all \/dev\/sdaX to \/dev\/vdaX (Linux only) Now shutdown the guest and connect to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=881"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/881\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}