osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

resize a vm to a flavor with pci-passthrough


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
>