Found 0 result in total
Content is empty
If you don't find the content you expect, please try another search term
Last updated:2021-07-16 11:18:19
You need to modify the disk information in /etc/fstab and grub configuration files to support virtio inside the image. To modify the information, change the part that contains /dev/sdaX to /dev/vdaX, where X refers to 1, 2, 3....
The following example shows how to configure Ubuntu 16.04:
Run "sudo vim /etc/fstab". It is found that in current system configuration, the root partition corresponds to "/dev/sdaX" (where X refers to 1, 2, 3...), which must also be changed to "/dev/vdaX" (where X refers to 1, 2, 3...).
Before the change:
After the change:
Run "sudo vim /boot/grub/grub.cfg". The file path varies depending on the system type and grub version. Generally, the file path is /boot/grub2/grub.cfg in CentOS 7 and /boot/grub/grub.conf in CentOS 6. In /boot/grub/grub.cfg configuration, the right value of "root=" is "/dev/sdaX", where X refers to 1, 2, 3.... The value "/dev/sdaX" may exist in multiple grub entries, and all of them need to be changed to "/dev/vdaX", where X refers to 1, 2, 3....
Before the change:
After the change:
Update the grub configuration. Run the command "grub-mkconfig -o /boot/grub/grub.cfg". Note: The command executed and the output file depend on the system type and grub version.
Pure Mode