Mapping local SSD to virtual machine persistently
Hello community, I've got a question related to the raw device mapping to the OpenStack virtual machine. The situation is I have several SSDs along with my compute node and I would like to attach these SSDs to my virtual machine for enhancing the disk performance. My current solution is using command "virsh attach-disk <dom> <host-device> <guest-device>" but it not persistently and need to manual re-attach after hard-rebooting which lead to re-generate the xml vm structure. So, I wonder if there is an official solution for my problems. Thank you and welcome for every help in our community. Best regards, Sang Tran
On Tue, 2024-01-23 at 10:30 +0000, Sang Tran Quoc wrote:
Hello community,
I've got a question related to the raw device mapping to the OpenStack virtual machine. The situation is I have several SSDs along with my compute node and I would like to attach these SSDs to my virtual machine for enhancing the disk performance. My current solution is using command "virsh attach-disk <dom> <host-device> <guest-device>" but it not persistently and need to manual re-attach after hard-rebooting which lead to re-generate the xml vm structure. So, I wonder if there is an official solution for my problems. Thank you and welcome for every help in our community.
This is currenly not supported in openstack. we have discussed adding local storage functionality to nova in the past but its non triavial since we woudl need a new rest api to allow attaching/detaching them and schduelr intengration. unfortuntly that means that today you cannot achive your goal. if you need to attach addtional storage dynamically your only option is cinder volumes. you can provide addtional storage in the flavor but only statical
Best regards, Sang Tran
Hey guys, One suggestion which might help you as a work around: Libvirt regenerates the xml’s based on nova receiving events via the RabbitMQ event bus. One option (which will require a bit of programming on your part) is to listen to the events that might impact the libvirt generation and execute the commands on your behalf. This would necessitate knowing/storing that VM->Device mapping somewhere, i.e a database. Thanks, Karl. From: smooney@redhat.com <smooney@redhat.com> Date: Tuesday, 23 January 2024 at 10:04 pm To: Sang Tran Quoc <SangTQ8@fpt.com>, openstack-discuss@lists.openstack.org <openstack-discuss@lists.openstack.org> Subject: Re: Mapping local SSD to virtual machine persistently On Tue, 2024-01-23 at 10:30 +0000, Sang Tran Quoc wrote:
Hello community,
I've got a question related to the raw device mapping to the OpenStack virtual machine. The situation is I have several SSDs along with my compute node and I would like to attach these SSDs to my virtual machine for enhancing the disk performance. My current solution is using command "virsh attach-disk <dom> <host-device> <guest-device>" but it not persistently and need to manual re-attach after hard-rebooting which lead to re-generate the xml vm structure. So, I wonder if there is an official solution for my problems. Thank you and welcome for every help in our community.
This is currenly not supported in openstack. we have discussed adding local storage functionality to nova in the past but its non triavial since we woudl need a new rest api to allow attaching/detaching them and schduelr intengration. unfortuntly that means that today you cannot achive your goal. if you need to attach addtional storage dynamically your only option is cinder volumes. you can provide addtional storage in the flavor but only statical
Best regards, Sang Tran
Hi @smooney@redhat.com<mailto:smooney@redhat.com> , and @Karl Kloppenborg<mailto:kkloppenborg@resetdata.com.au> Thanks for your helps. I also have questions regarding to your suggestion as below: @smooney@redhat.com<mailto:smooney@redhat.com> Did you mention about cinder-volume with LVM driver? I tested it before, but the performance does not meet the requirement cause of the transportation of data via iSCSI protocol and it hard to compare with direct attach via libvirt. Your second idea are using flavor with ephemeral disk, right? @Karl Kloppenborg<mailto:kkloppenborg@resetdata.com.au> Your workaround suggestion looks good to me; I will search around for the accurate RabbitMQ event as you mentioned. Best Regards Sang. From: Karl Kloppenborg <kkloppenborg@resetdata.com.au> Sent: Wednesday, January 24, 2024 6:45 AM To: smooney@redhat.com; Sang Tran Quoc <SangTQ8@fpt.com>; openstack-discuss@lists.openstack.org Subject: Re: Mapping local SSD to virtual machine persistently Hey guys, One suggestion which might help you as a work around: Libvirt regenerates the xml's based on nova receiving events via the RabbitMQ event bus. One option (which will require a bit of programming on your part) is to listen to the events that might impact the libvirt generation and execute the commands on your behalf. This would necessitate knowing/storing that VM->Device mapping somewhere, i.e a database. Thanks, Karl. From: smooney@redhat.com<mailto:smooney@redhat.com> <smooney@redhat.com<mailto:smooney@redhat.com>> Date: Tuesday, 23 January 2024 at 10:04 pm To: Sang Tran Quoc <SangTQ8@fpt.com<mailto:SangTQ8@fpt.com>>, openstack-discuss@lists.openstack.org<mailto:openstack-discuss@lists.openstack.org> <openstack-discuss@lists.openstack.org<mailto:openstack-discuss@lists.openstack.org>> Subject: Re: Mapping local SSD to virtual machine persistently On Tue, 2024-01-23 at 10:30 +0000, Sang Tran Quoc wrote:
Hello community,
I've got a question related to the raw device mapping to the OpenStack virtual machine. The situation is I have several SSDs along with my compute node and I would like to attach these SSDs to my virtual machine for enhancing the disk performance. My current solution is using command "virsh attach-disk <dom> <host-device> <guest-device>" but it not persistently and need to manual re-attach after hard-rebooting which lead to re-generate the xml vm structure. So, I wonder if there is an official solution for my problems. Thank you and welcome for every help in our community.
This is currenly not supported in openstack. we have discussed adding local storage functionality to nova in the past but its non triavial since we woudl need a new rest api to allow attaching/detaching them and schduelr intengration. unfortuntly that means that today you cannot achive your goal. if you need to attach addtional storage dynamically your only option is cinder volumes. you can provide addtional storage in the flavor but only statical
Best regards, Sang Tran
participants (3)
-
Karl Kloppenborg
-
Sang Tran Quoc
-
smooney@redhat.com