Ask Your Question

How to launch a VM that use dev=vda and bus=virtio using nova??

asked 2018-02-14 08:22:31 -0500

vathanlal gravatar image

updated 2018-02-14 09:39:36 -0500


My OpenStack cluster(newton) is based on KVM virtualization. I found that all the instances Iam launching is using dev=sda and bus=scsi. How can I launch an Instance that using dev=vda and bus=virtio?? Or I want to make virtio as default for all VMs.

I tried to set the image-property as below

glance image-update --property hw_disk_bus=virtio 30393b62-c98e-4282-9fcc-0acc307f0c01

Then I tried to launch a new instance with this image but still it is using dev=sda and bus=scsi. I dont know how to change it. Is there any option exists for this?? Any help is really appreciated.

edit retag flag offensive close merge delete


If you enable debug logging, you will see in the nova-compute log how the libvirt xml file is built. I don’t know what debug messages are issued, but perhaps the reason for selecting the SCSI bus becomes clear as well.

Bernd Bausch gravatar imageBernd Bausch ( 2018-02-14 16:18:18 -0500 )edit

I enabled debug option and I found is responsible for creating the .xml file. But it doesn't give much information. I dont have any idea or any sufficient documents how to change nova libvirt to use virtio by default.

vathanlal gravatar imagevathanlal ( 2018-02-15 10:01:10 -0500 )edit

1 answer

Sort by » oldest newest most voted

answered 2018-02-14 09:09:55 -0500

eblock gravatar image

Hi, you can control that with the image's metadata:

control:~ # openstack image set --property hw_scsi_model=virtio-scsi --property hw_disk_bus=scsi --property hw_qemu_guest_agent=yes --property os_require_quiesce=yes 8a143d74-565f-47d8-b10d-0dd5842976aa

This will enable devices like /dev/sdX. Maybe this is the default in your environment, if I just remove these properties from the base image my instances get their /dev/vdX devices. You should take look into your configs, maybe you have defined some default image properties. You can disable these properties per image bye simply running:

control:~ # openstack image set --remove-property hw_scsi_model --remove-property hw_disk_bus --remove-property hw_qemu_guest_agent --remove-property os_require_quiesce 8a143d74-565f-47d8-b10d-0dd5842976aa

Hope this helps!

edit flag offensive delete link more


Thanks for the response. I tried this by first removing all the properties of the image and then adding a new property hw_disk_bus=virtio and launch a VM from this image. But still the same result. It is using scsi and sda not virtio. I updated the question please go through it. Thanks.

vathanlal gravatar imagevathanlal ( 2018-02-14 09:42:10 -0500 )edit

Besides debugging logs, could you check if your base image has the required modules? On your VM run

find /lib/modules/ -name *virt*
eblock gravatar imageeblock ( 2018-02-15 07:41:25 -0500 )edit

Something like this would be needed:

host:~ $ find /lib/modules/ -name *virt*
eblock gravatar imageeblock ( 2018-02-15 07:42:59 -0500 )edit

Maybe this article helps a little.

eblock gravatar imageeblock ( 2018-02-15 07:44:40 -0500 )edit

Thanks for the response. Actually I updated my compute node OS(ubuntu16.04) it was a regular security update. After that nova is using only scsi and all the VM's have ALERT! LABEL=cloudimg-rootfs does not exist. Dropping to a shell! error. Before that I can create instances fine. They use virtio.

vathanlal gravatar imagevathanlal ( 2018-02-15 10:45:32 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2018-02-14 08:22:31 -0500

Seen: 1,983 times

Last updated: Feb 14 '18