Enabling KVM via VNC access on the Intel NUC and other hurdles

While setting up my new NUCs to use with MAAS as a development deployment tool, I got very, very frustrated with the initial experience so I thought I’d write up some key things here so that others may benefit — especially if you are using MAAS.

First hurdle — when you hit ctrl-P at the boot screen it is likely to not work. This is because you need to disable the num lock.

Second hurdle — when you go and enable the AMT features it asks for a new password, but doesn’t tell you that it needs to contain upper case, lower case, numbers AND punctuation.

Third hurdle — if you want to use it headless like me, it’s a good idea to enable the VNC server.  You can do that with this script:

AMT_PASSWORD=<fill me in>
VNC_PASSWORD=<fill me in>
IP=N.N.N.N
wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h ${IP} -P 16992 -u admin -p ${AMT_PASSWORD} -k RFBPassword=${VNC_PASSWORD} &&\
wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h ${IP} -P 16992 -u admin -p ${AMT_PASSWORD} -k Is5900PortEnabled=true &&\
wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h ${IP} -P 16992 -u admin -p ${AMT_PASSWORD} -k OptInPolicy=false &&\
wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h ${IP} -P 16992 -u admin -p ${AMT_PASSWORD} -k SessionTimeout=0 &&\
wsman invoke -a RequestStateChange http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_KVMRedirectionSAP -h ${IP} -P 16992 -u admin -p ${AMT_PASSWORD} -k RequestedState=2

(wsman comes from the wsmancli package)

But there is yet another gotcha!  The VNC_PASSWORD must be no more than 8 characters and still meet the same requirements as the AMT password.

Once this is all done you should be all set to use this very fast machine with MAAS.

About bigjools

Python hacker and chronic Lyme Disease sufferer.
This entry was posted in tech and tagged . Bookmark the permalink.

8 Responses to Enabling KVM via VNC access on the Intel NUC and other hurdles

  1. Thom says:

    The URL referenced in your post, http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData, returns a 404 causing the operation to fail. Is there a working location for that file?

    • bigjools says:

      Have you tried the command? I don’t think it needs to access the URL, it’s just a schema reference.

      • Thom says:

        Yeah, I tried. It gives a ‘400 Bad Request’ response. I had guessed it was the URL, because everything else is pretty basic.

        I can use amttool to dump info from my NUC, and I’ve used Windows RealVNC in the past to connect to the console. I’m trying to eliminate the Windows requirement by enabling plain old VNC..

      • bigjools says:

        You get a 400 if you don’t meet the vnc password requirements.

      • Thom says:

        You’re right, my password didn’t meet the complexity requirements.

        Also I had to add the “-v” flag to each wsman command to ignore host validation. I’m not sure if that’s unique to my setup, but the commands wouldn’t succeed without it. Once I improved my password and added the flag, the commands worked and I’m now able to use a standard VNC client to access the console. Thanks!

  2. bigjools says:

    Great! Glad to have been of help.

  3. marni lutes says:

    Um- They add KVM plug-and-play or a lot of people won’t buy at all. [I for instance want a transportable computer that i can plug into my full-size keyboard, display, and an external drive bay EASILY and CHEAPLY, or i won’t buy at all.]

  4. Bizarrely, I’ve found that the VNC password has to be complex, and *exactly* 8 characters long, otherwise I get a 400 error.

Leave a reply to bigjools Cancel reply