[Openstack] [OpenStack] [nova] How can I release PCI device resources without delete instance?

Jay Pipes jaypipes at gmail.com
Wed Jul 5 11:36:53 UTC 2017


On 07/05/2017 04:18 AM, Eddie Yen wrote:
> Hi everyone,
> 
> I'm using OpenStack Mitaka (which deployed from Fuel 9.2) and doing GPU 
> things.
> 
> I got a problem is I need to delete current instance which contains GPU 
> to release device if I want assign GPU to another new instance temperately.
> 
> I'll got "No valid host was found" if I creating new instance contains 
> GPU flavor without delete present instance, even the instance is shutdown.
> 
> Is there any way that I just shutdown the instance rather than delete it 
> to release GPU device?

As Dinesh mentioned you *can* use shelve for this, but frankly, I think 
the shelve API leads to more problems than it solves (see his response 
about needing to delete the new instance before unshelving).

I'd recommend redesigning your application to be more cloud-native. In 
other words, separate operating system state from application state, use 
volumes for all persistent application state, and do not rely on a 
persistent IP address. [1]

Once you've done that, you can just treat your VMs like cattle and 
terminate them.

Best,
-jay

[1] Please note I did not use the word "container" in this description 
of cloud-native application.



More information about the Openstack mailing list