Is anyone calling z/VM’s SMAPI from Linux? I have tried using both smaclient from SineNomine and smcli from IBM with different results. I was just wondering if anyone has tried these.
Thanks.
-Mike MacIsaac
Is anyone calling z/VM’s SMAPI from Linux? I have tried using both smaclient from SineNomine and smcli from IBM with different results. I was just wondering if anyone has tried these.
Thanks.
-Mike MacIsaac
Mike, our (IBM’s) CMA code uses smcli, as did the older non-CMA xCAT/ZHCP code. We don’t compare against other implementations when doing that, unsurprisingly… we compare against human-expected results.
For anyone as yet unaware, smcli (along with the rest of ZHCP) is now available in open source smcli source on github. The IBM dev owner is anticipating possibly doing some work in there “soon”.
The current use of smcli requires the caller to scan the output looking for keywords such as error or failed. I am working on an enhancement to add a “header” first line that contains return and reason codes, etc. The caller can then examine the contents of this first line to determine if an error.
To enable this header, a new keyword would need to be supplied. This way existing callers would not be impacted. A GitHub issue has been started and will be filled in with more details later. https://github.com/zVMopenstack/zhcp/issues
Chuck,
Sounds good. Glad to hear smcli is still being actively maintained.
Rather than requiring a new flag on every call and returning the return and reason codes on the first line, why don’t you just always return them on the last line. I’m can’t imagine anyone saying “Including extra error messages broke my screen scraping code”. Just a thought …
-Mike
Hi Mike,
just a little story from Canonical on that - using smaclient with SMAPI today.
I was looking for my development team mates for a way to kick-off fully-automated-installations (FAIs) from their (Linux/Ubuntu) workstation.
So I had a look at several tools:
Based on the smaclient I created the following ‘hack’:
smaclient allows me to access z/VM - as usual via SMAPI.
I can now change the IPL line in the user direct, so I can IPL CMS instead of a Linux from disk, I can also add some IPL PARMs that allow me to specify a REXX script to call from CMS later.
The IPL PARMs are automatically handed over to the SYSPROF EXEC, I adjusted the SYSPROF EXEC (using localmod) to look for my special install PARMs, I handed over these again to the PROFILE EXEC and execute an Ubuntu installation exec there, based on the PARMs given, and finally a fully automated “preseed” installation is kicked-off.
All this is done in about 5 minutes, incl. all updated that exist on top of the install system and the post-install reboot.
And my development folks don’t need to touch a 3270 terminal …
(Once the zhmcclient supports the Load from Removable Media task I implement something similar for LPARs.)
A valid question could now be:
Why don’t we use Ubuntu KVM, Container/LXD or OpenStack for deploying systems?
Well, we do - of course
But from time to time we also have the need to test LPAR and VM installations or components that run directly in VM or LPAR rather than in KVM VMs or containers.
A distributor has quite diverse needs and requirements …
Hi Frank,
Do you have some feedback on how you had to adjust the makefile for Ubuntu? I can add that to the wiki page about how to compile it.
Thanks!
Frank,
Thanks for the feedback. I meant to reply to this earlier.
I can now change the IPL line in the user direct, so I can IPL CMS instead of a Linux
My first thought was “Why change it, why not always IPL CMS?” This is how I have always done it so as to call the SWAPGEN EXEC (a popular way of writing a swap signature to a ‘file’ in memory).
To access SMAPI from Linux, we have switched the default from smaclient to smcli as the latter seems to be better supported. We can change back to smaclient by setting a variable. FWIW…
-Mike