resize a vm to a flavor with pci-passthrough
Dear Openstack community, I have 1 physical node with x4 nvidia nv100 running 1 fat vm. Additionally I am adding a nvme drive into that host and I would like to attach the nvme drive to the vm. Ideally I prefer to avoid data migration and redeploy the software. My problem is that I don't have another host with gpus so I am guessing that the vm can't be migrated. Am I right assuming this? So far I thought about 2 possibilities but I don't know whether they would work: Option 1: crate a new flavor with the pci device pass-through and resize existing vm (I hope the new vm with the new flavor will have the nvme attached). Option 2: convert ephemeral virtual disk into a bootable volume. Destroy vm. Create new vm with the new volume as a boot device. Which option would be preferred? Is there any other think I can do? Thank you very much Manuel NOTICE Please consider the environment before printing this email. This message and any attachments are intended for the addressee named and may contain legally privileged/confidential/copyright information. If you are not the intended recipient, you should not read, use, disclose, copy or distribute this communication. If you have received this message in error please notify us at once by return email and then delete both messages. We accept no liability for the distribution of viruses or similar in electronic communications. This notice should not be removed.
W dniu 08.04.2019 o 07:45, Manuel Sopena Ballesteros pisze:
Dear Openstack community,
I have 1 physical node with x4 nvidia nv100 running 1 fat vm. Additionally I am adding a nvme drive into that host and I would like to attach the nvme drive to the vm. Ideally I prefer to avoid data migration and redeploy the software.
My problem is that I don't have another host with gpus so I am guessing that the vm can't be migrated. Am I right assuming this?
So far I thought about 2 possibilities but I don't know whether they would work:
Option 1: crate a new flavor with the pci device pass-through and resize existing vm (I hope the new vm with the new flavor will have the nvme attached).
Option 2: convert ephemeral virtual disk into a bootable volume. Destroy vm. Create new vm with the new volume as a boot device.
Which option would be preferred? Is there any other think I can do?
Attach NVME to VM and migrate system in VM?
On Mon, 2019-04-08 at 05:45 +0000, Manuel Sopena Ballesteros wrote:
Dear Openstack community,
I have 1 physical node with x4 nvidia nv100 running 1 fat vm. Additionally I am adding a nvme drive into that host and I would like to attach the nvme drive to the vm. Ideally I prefer to avoid data migration and redeploy the software.
My problem is that I don't have another host with gpus so I am guessing that the vm can't be migrated. Am I right assuming this? we do have a config option to allow same host resize however in your case it likely still wont work.
when we do a resize to a new flavor we need to temporaily claim both the existing resouce for the currnt flavor and the new resouces for the target flavor. so unless you have 8 gpus on that system it will fail. you could try shelving the vm. resizing and unshelving. but really there is no good option here.
So far I thought about 2 possibilities but I don't know whether they would work:
Option 1: crate a new flavor with the pci device pass-through and resize existing vm (I hope the new vm with the new flavor will have the nvme attached).
if you have enough space for the new flavor then yes that should work.
Option 2: convert ephemeral virtual disk into a bootable volume. Destroy vm. Create new vm with the new volume as a boot device. if all the data you want to keep is in the root disk then a snapshot will work but this would evffectivly be the same as the shelve resize unselve workflow i suggested above. if you have addtional ephemeral disk beyond the root disk then you should backup all the data to a cinder volume manually first. then recreate the vm and attach those volumes.
Which option would be preferred? Is there any other think I can do?
Thank you very much
Manuel
NOTICE Please consider the environment before printing this email. This message and any attachments are intended for the addressee named and may contain legally privileged/confidential/copyright information. If you are not the intended recipient, you should not read, use, disclose, copy or distribute this communication. If you have received this message in error please notify us at once by return email and then delete both messages. We accept no liability for the distribution of viruses or similar in electronic communications. This notice should not be removed.
On 04/08/2019 01:45 AM, Manuel Sopena Ballesteros wrote:
Dear Openstack community,
I have 1 physical node with x4 nvidia nv100 running 1 fat vm. Additionally I am adding a nvme drive into that host and I would like to attach the nvme drive to the vm. Ideally I prefer to avoid data migration and redeploy the software.
My problem is that I don’t have another host with gpus so I am guessing that the vm can’t be migrated. Am I right assuming this?
So far I thought about 2 possibilities but I don’t know whether they would work:
Option 1: crate a new flavor with the pci device pass-through and resize existing vm (I hope the new vm with the new flavor will have the nvme attached).
Option 2: convert ephemeral virtual disk into a bootable volume. Destroy vm. Create new vm with the new volume as a boot device.
Which option would be preferred? Is there any other think I can do?
Put your application data in a different location than your application configuration and operating system. Save that application state in a separate Cinder volume. You can then attach and detach the application state to a (much smaller) root disk image that just contains the operating system and installed application binaries. Once you've done the above, then you won't need to fret about "avoid(ing) migration and redeploy the software". Put the effort in up front to do this application state separation and your life will be much, much easier. Best, -jay
On Tue, 2019-04-09 at 07:16 -0400, Jay Pipes wrote:
On 04/08/2019 01:45 AM, Manuel Sopena Ballesteros wrote:
Dear Openstack community,
I have 1 physical node with x4 nvidia nv100 running 1 fat vm. Additionally I am adding a nvme drive into that host and I would like to attach the nvme drive to the vm. Ideally I prefer to avoid data migration and redeploy the software.
My problem is that I don’t have another host with gpus so I am guessing that the vm can’t be migrated. Am I right assuming this?
So far I thought about 2 possibilities but I don’t know whether they would work:
Option 1: crate a new flavor with the pci device pass-through and resize existing vm (I hope the new vm with the new flavor will have the nvme attached).
Option 2: convert ephemeral virtual disk into a bootable volume. Destroy vm. Create new vm with the new volume as a boot device.
Which option would be preferred? Is there any other think I can do?
Put your application data in a different location than your application configuration and operating system. Save that application state in a separate Cinder volume. You can then attach and detach the application state to a (much smaller) root disk image that just contains the operating system and installed application binaries.
Once you've done the above, then you won't need to fret about "avoid(ing) migration and redeploy the software".
Put the effort in up front to do this application state separation and your life will be much, much easier. +1 this should always be your first step i think when runing any applicaiton in a cloud env.
i used to even do this for my dev vms where i woudl put /opt/stack on a cinder voluems so that if i ever need to rebuild the vm i just remounted it and have my devstack env ready to go.
Best, -jay
participants (4)
-
Jay Pipes
-
Manuel Sopena Ballesteros
-
Marcin Juszkiewicz
-
Sean Mooney