HPE OneView
1748169 Members
4173 Online
108758 Solutions
New Discussion

Re: Please point me to an example -- how to export all Server data (OneView 2.0 / POSH 2.0) prior to

 
SOLVED
Go to solution
ronan_mc
Senior Member

Please point me to an example -- how to export all Server data (OneView 2.0 / POSH 2.0) prior to 3.0

Hello,

We have OneView 2.0 (2.00.07-0250853) Appliance on Hyper-V, and in our initial attempt to update to 2.00.07 from the version just below it, the update hung at 67%, then crashed, due to (my) lack of RTFM in the area of the host requirements.   Luckily, we were able to roll back, and thankfully with a team of skilled Hyper-V and OneView experts, we are now at 2.00.07-0250853 planning an upcoming update to 3.0.

Our plans are to upgrade to 3.0 as soon as possible.   To prepare for this I hope to find an example POSH 2.0 script I can use to export all of our monitored/managed Servers (some 400 or so -- 95% or more are DL380p Gen8's, with a few DL380 Gen9's) and any/all related things we cannot re-import into 3.0 we have saved from 2.0 using OneView "backup".

We have no Blades, no Chassis, no Networks, Storage/SANs -- nothing other than DL-Rack servers in our OneView 2.0 (aside some Racks we are manually adding for DCIM).   See attached image, we won't be monitoring/managing/adding the things I marked out with red lines.  I have made a few Server Profile Templates and Server Profiles, with various SPP baselines uploaded to test making full Updates to Gen8/Gen9 DL Rack servers, but in attempting to add SPP 2016.10.0 custom baseline OneView 2.0 is not recognizing the latest SPP baseline ISO after being uploaded; this increases our urgency to upgrade to 3.0.

In my first experiment (not with a lot of recent PowerShell experience (but "ramping up") -- I was able to make Get-HPOVServer cmdlet work easily however, the output is not like the online help (I have not figured out why yet) -- there are some fields missing in the output I'm getting compared to the OneView 2.0 POSH online help / example for Get-HPEOVServer.

Here is my real question:

Is there any example POSH OneView 2.0 script anyone can point me to I can use an example so that I can "export" all of our DL Rack-Server Hardware to disk (and associated Server Profiles and Server Profile Templates, baselines), and then if we lose anything during our upgrade from 2.0 to 3.0, we would have the option to re-create the same thing we had in OneView 2.0?

Basically, I want to be able to rebuild our 2.0 OneView configuration completely, in 3.0, IF/AS needed -- and avoid a situation where we may have to re-add all 400+ servers manually.

Most/many of the OV POSH examples are for Servers hosted in Blades, I'm not finding much specific to Rack servers.

Thank you!

Ronan

 

2 REPLIES 2
ChrisLynch
HPE Pro
Solution

Re: Please point me to an example -- how to export all Server data (OneView 2.0 / POSH 2.0) prior to

The Get-HPOVServer Cmdlet will return server objects that are either Monitored or Managed, regardless if DL or BL.  What is not returned and you'll never be able to get would be the username and/or password used to authenticate to the iLO from that output (or OneView in general).  If you were to export server objects, and then attempt to import them using the API (or PowerShell in your case), the new appliance will attempt to claim your servers.  Applying Server Profiles will then require the host to be powered off, especially if you have Gen8's, defined BIOS/UEFI settings, and/or local storage settings.  Offline firmware policy would also need the server to be powered off, unless you chose to use HPSUT for online remediation.

We advise customers to maintain a backup to it would be easier to restore OneView to an operational state, as it is easier to do.  Especially if you were to have complex Server Profiles with BladeSystem.  When you create a new resource on OneView, it keeps a unique identifier per appliance.  And, attempting to "import" a resource via the REST API is not as simple as passing the object via a create (HTTP POST verb) request.

I'm not stating that it could not be done.  But if your intent is for backup purposes, I would suggest you rely on the appliance backup as the primary means.  If you really want to export your resources, then look at the -Export parameter for the Get-HPOVServerProfile and Get-HPOVServerProfileTemplate Cmdlets.  The profile object will be saved in its raw JSON format without stripping out any of the appliance unique properties.  As for "exporting" your DL servers, you would want to use Get-HPOVServer | ConvertTo-Json > C:\MyDlServers.json


I am an HPE employee

Accept or Kudo

ronan_mc
Senior Member

Re: Please point me to an example -- how to export all Server data (OneView 2.0 / POSH 2.0) prior to

Thank you kindly!

R