Wednesday, February 14, 2018

Migrate KVM Disk Access from IDE to Virtio

So in order to make the switch from from ide or Sata to virtio, the following steps need to be taken:
Run virsh edit <your_vm_name>. From there, edit the config file and adjust all lines of
<target dev='hda' bus='ide'/>
<target dev='sda' bus='sata'/>
so they look like this
<target dev='vda' bus='virtio'/>
Furthermore, remove all <address type .../> lines so that libvirt can regenerate them appropriately.
Inside the guest, edit /etc/fstab and replace all occurrences of /dev/sdX with /dev/vdX`.
That’s it, now shutdown the machine and start it with an virsh start <your_vm_name> (just a reboot inside the started VM won’t work).

No comments:

Post a Comment