Getting started with Juju 2.0 on AWS

This is a bit of a first timers guide to setting up Juju 2.0 to work with AWS.  To be honest, it’s been quite a while since I really messed with Juju and AWS (or anything outside of MAAS), and this is the first time I’ve really looked at Juju 2.0 anyway.  So this is me sharing the steps I had to take to get Juju 2 talking to my AWS Virtual Private Cloud (VPC) to spin up instances to prototype things.

First, let’s talk about the parts here.   You should already know what Amazon Web Services is, what a Virtual Private Cloud is, and have an account at Amazon to use them.  You should know a bit about what Juju is as well, but as this is a first timer guide, here’s all you really need to know to get started.  Juju is an amazing tool for modeling complex workload deployments.  It takes all the difficult bits of deploying any workload that has a “Charm” in minutes.  All the brain-share needed to install and configure these workloads is encapsulated in the “Charm”.  To configure, you can pass YAML files with full deployment configuration options, use Juju commands to set individual configuration options, or pass them via the juju gui.  Juju is very extensively documented at https://jujucharms.com, and I highly recommend you RTFM a bit to learn what Juju can do. Continue reading

Lets get dangerous…

Here I sit, spitting off this quick missive before I get into my car and drive possibly into the end. We shall see. There’s less than 2% chance that anything will go wrong, and even farther less than that that the thing going wrong will see me shuffle off this mortal coil.

(Hint: if I do kick off, some friends of mine are about to inherit some pretty awesome stuff).

My brother needs stem cells. I have those stem cells. It’s as simple as that. So some nice surgeons are going to DRILL, BABY, DRILL! into my rear parts, and literally suck out all the marrow of life, or at least a couple liters of the marrow of life. I guess I won’t be going to the woods to live deliberately for a while.

If successful, I wake up, get some killer pain meds, and a week at home resting up and healing from having so many holes drilled into my body while THEY. DRINK. MY. MILKSHAKE!. If successful, my brother gets a stem cell transplant tomorrow from me, and he inherits the moustache gene, gets better and goes home to his family.

I had a career at one time being a lifesaver, an ALS provider on both county and privately operated ambulances. This is just a natural extension of that, I guess. I, the guy who still carries a stocked trauma kit, who still stops to render aid to strangers. I, who have faced death and said “Not today.” Now I go forward once more so that others may live.

So here’s to hope. And here’s to being completely knocked the fuck out while my ass is being drilled.

Once more unto the breach, dear friends, once more.

Also, check out James’ blog:  thejameslane.rocks

 

So it’s time to say Goodbye, yet again…

Faith at the BeachIt started innocently enough.  Faith had had decreased appetite when we were at the beach and at the time we attributed that to her not wanting to stand on a slick, hardwood floor to eat (she is old, and weak, and so keeping her legs under her on a slick surface is a chore).  But when that continued after getting home, we took her in after realizing some of her back teeth had rotted to the point of being painful.  It seemed simple enough, she’d go on antibiotics and pain meds for a week to clear up any tooth infection and then we’d take her in to be sedated and have several teeth removed.

This morning, I dropped her off at the vet.  The vet called me back a lot faster than I expected.  As part of the pre-op routine, they ran bloodwork and found that her liver enzymes were out of spec by a significant amount.  So that led to a full liver panel and an ultrasound.

I just got the call with an update and the news is as I had feared.  She has definitive tumors all over her Liver and Spleen.  This is exactly the same diagnosis that Jazz got when Jazz stopped eating.  Funny coincidence, since Jazz was one of Faith’s puppies.  Mother and Daughter, dying from the same cancer, but this one much more definitive.

That means there is only one option, so with a very heavy heart, as I listened in on a work meeting with one ear, the phone with the vet pressed to the other, I made the decision that it’s time to let her go.  We’ve scheduled it for Monday afternoon, here at home.  We took Jazz to the Vet office to have it done and that was a mistake.  Faith mourned her disappearance for a long while, and the other dogs seemed off as well, noticing that I took Jazz away and never brought her home.  Now, not even two months removed from that loss, it’s time to suffer loss once more.  It’s time to say goodbye again.

On Monday, Faith will end her suffering, here at the only real home she’s ever known while being surrounded by the love of our diminished pack, hopefully with Jazz, Patches, and Jack ready to guide her to the bridge on the other side.

Jazz and Faith

Jazz and Faith on the last day they were together. They’ll soon be together again.

They had named her Jazz…

 

image

Our last evening together

The trees rushed by the window in a blur of browns and greens topped with the myriad shades of grey that make up an overcast sky.  We sat in the car, my arm around her, holding her tightly to me as we both watched the cascade of colors racing by.  She barely had the strength to keep her head lifted, but she did.  The ride passed in silence, each passing tree trunk a marker counting down the minutes and seconds of life. The past paraded by amidst the dancing colors outside the glass and that’s where we journeyed: back to the beginning, over twelve years ago.

Faith was a good dog.  An Alaskan Husky, she weighed no more than thirty-five pounds with a soft, thick coat.  She came to us out of nowhere, one of those random, stray mutts that just shows up one day and refuses to leave.  In fact, her persistence is how she got her name, but that’s a story for a different day.  For today, all that matters is that Faith was here, and she was about to get spayed.  Unfortunately, she managed to slip her collar and get herself knocked up by our resident rogue, known only as “Brown Dog”, just days before her appointment.  So instead of being spayed, she carried several wriggly puppies to term and gave birth in our home in January of 2004, and that’s where our story begins.

It was cold outside, I remember that much.  A frigid winter afternoon and Faith, fat with a litter of pups, started yelping and bleeding and to be quite honest, it was terrifying until the first puppy popped out and we realized what was happening.  We quickly moved her into the utility room on an old blanket and set up an electric space heater to keep her warm on a floor that was easily mopped.  Out they came, one at a time, a hodgepodge of little, wiggly furballs.  Two were brownish but the rest were almost pure black with the exception of some stark white markings.  This particular one was solid black save for the very tip of her tail which was pure white.  For the time she was with us, her name was “White-Tipped Girl” and she was my favorite of the litter.

As the weeks passed by, the puppies grew and began to explore and found their legs and strength until it was time to find them forever homes of their own.  One-by-one, each puppy was taken in by a family we had found, including my little white tip girl, and our home was quiet again.

puppies

Puppies!

It was several months later when the family that took her called us and took us up on our standing offer.  As each one was adopted out, I told the adoptive families, “If, for any reason, this doesn’t work out, call me any time and I’ll come take them back with us.”  To this day, only one family asked us to take a pup back, we can only speculate and hope that the rest of the pups had long and fulfilling lives.  I rode into town the next afternoon and remember feeling so bad that I was taking the puppy back.  The kids weren’t supposed to be home, yet there was the son, greeting me as I got out of my vehicle, wondering why I was there.  I left it to his mom to explain why I was taking his new puppy away, along with the dog house she had been living in.  It was up to them to explain that they had failed to mention getting a dog to the landlord, who made them give her up.  It was up to them to convince their kids that the dog was going to somewhere safe.  I still felt like crap for doing it in front of him, but once loaded, I turned for home and never looked back.  My White-Tip Girl was sitting in my lap, licking me and nuzzling. They had named her Jazz.

I will admit that this is where I really failed her.  Since she’d been an outdoor dog thus far, I didn’t feel too bad for putting her back in the kennel where the puppies had stayed until they had been adopted out, but later on in life I would regret this time, because it was really more a matter of convenience for us than a practicality.  We already had four dogs and three cats in the house and there was just not enough room in the inn.  So for the next two years, Jazz lived in her kennel, in a warm dog house with fresh water and food.  We’d play with her, walk her, socialize her with our other dogs, but at the end of the day, she’d go back to her kennel and the rest would go inside.  I do hate myself for that time in her life, but she was never neglected, and to be honest, I think she enjoyed being out in the fresh air, with birds, rabbits, squirrel and deer for company.

Two years later, we lost Jack, our Border Collie / Lab mix and moved Jazzy into the house for good.

JazzThe rest of her life was fairly uneventful, and that’s good for a dog.  I finished fencing in an area out back for the dogs to run without risk of running off, so they could spend their days playing in the sun and chasing critters, barking at every noise and movement.  Then at night, we’d all huddle in our cave together, sheltering in the dark until the next morning.  Dana and I would work our jobs and on vacation, they would all head to the Doggy Day Camp where they’d spend a week socializing with several other vacationing dogs and we’d spend our week doing whatever it was we did on vacations back then.jazzy-yard

Jazzy grew into a beautiful dog.  Solid black and lean, she never weighed more than about 50 pounds.  Her father, the infamous “Brown Dog” looked like a German Shepherd mix of some sort, and she inherited that look from her dad.  As she grew, her white tip faded and she became a solid black GSD looking dog with a face shaped like a Husky.  She had the same soft, thick fur and twice a year like clockwork, her undercoat would fall out in giant clumps all over the house.  Her bark was fierce and her low, ominous growl at strangers was enough to give anyone pause as they approached our door, but the few who were invited in quickly realized that she was the classic case of all bark and no bite.  She was the sweetest, most gentle and tolerant dog I’d met.  She loved everyone and really wanted nothing more than to have that space behind her ears scratched, or her belly rubbed if she really liked you.

She was the only dog we’ve ever had that probably could have made a good guard dog, and she kept us safe from all threats, real or imagined.

I remember one night we took her for a walk out on Sunset beach.  We walked about half a mile or so along the shore and sat down in between dunes with Jazz and Patches.  We sat there in the dark enjoying the stars above and the sounds of waves crashing in the darkness ahead.  We drank daiquiris and joked while watching families walk up and down the waterline with flashlights and buckets trying to catch the crabs that would run around onshore feeding in the ebb and flow of the ocean.  At one point someone approached us a little too close, and Jazz let out a low, barely audible rumble.  At that point she was almost invisible from more than a few feet away as we were sequestered in the darkness on a moonless night.  The person approaching us let out a yelp and quickly went around us, despite our laughing and promising the strange shadow that Jazz was actually gentle and just startled by the movement.

When we’d take her to the big Flea Market out at the Raleigh Fairgrounds she was the delight of everyone who met her.  She was horrible on a leash, mind you, but eventually she’d settle in as best she could and was always ready for a scratch or a treat from some passing stranger and everyone wanted to feel her fur it seemed.  We didn’t do that too often though.  She was a solid black and thickly furred dog, so keeping her cool was not an easy job.

jazz-kitten

She was such a gentle soul, especially around our foster kittens

I like to think that she loved living with us.  We certainly loved her, soft and cuddly and easily the most huggable dog we’ve ever had.  She had a way of just laying her head on your knee and staring at you with her big brown eyes that just forced you to scratch her behind her ears, easily melting away any frustrations or anger or stress you had.  When she was excited, she’d wiggle and dance and hop around, even until just shortly before the end.  At the ripe old age of 12, she was still a bouncy, pouncy, roly-poly puppy.  She never really got into toys, and wasn’t even very food motivated.  She was stubborn but loyal, loving and kind.  She knew her pack and protected them the best way she knew how.

Just after her 12th birthday, in January of 2016, is when things started to fall apart.  She started vomiting after meals.  At first it was just every now and again, but soon became almost every meal.  Sometimes she could hold in the morning meal but would lose the evening meal, sometimes neither would stay down.  Thinking she was just making herself sick, she had a penchant for eating dirt in the garden, we altered her food amounts and she quickly started shedding weight.  When we took her to the vet, the inevitable happened.

After a consult and an ultrasound, we were told Jazzy had growths on her liver, her spleen and elsewhere in her abdomen and fluid was starting to collect there for some reason.  We came home with some nausea medicine and advice to consider taking her to N. C. State for a lengthy and expensive surgery that would simply biopsy whatever was in there.  We waited a week until the nausea pills ran out and then headed back for a follow-up and second opinion from the more seasoned vet at the practice, the one we’ve taken all our animals to for nearly 15 years.  After a second ultrasound, the second opinion was worse.  Things were bigger, there was more fluid.  She could have days, weeks or months.  We could still go to N. C. State, but even if we had the week before, there was really nothing that could be done beyond confirming what we were already 90% sure of.  She had cancer and was dying.

That week simply painful.  I knew what was coming, and I knew what I had to do no matter how much I didn’t want to do it.  We had more medicine for her and that helped to keep her food down until she finally decided she’d had enough.  The day she stopped eating was the day I made the call.

our-packI admit, I’m selfish.  I wanted nothing more than another month.  Another week.  Another weekend.  I just wanted to recreate that scene from Star Trek: Insurrection where Picard is shown how to take a moment in time and slow it down so it lasts forever.  I wanted nothing more than to wrap my arms around her and make that day last forever.  But wishes and wants are seldom really fulfilled.  I made the appointment for Monday, giving us one last weekend together.  But by Friday, it was evident that Jazzy was ready to go.  It broke my heart to make that call, asking them if the vet could come to the house Friday evening or Saturday morning to send her on her way.  But no, even that couldn’t happen.  The only thing we could do was take her to the vet’s office.  No house calls on that Saturday.

And this is where I felt the worst.  For Patches and Jack, we were able to have the vet come out to us so they could die at home, surrounded by familiar smells and faces, basking in the warm sunlight, lying in the soft green grass.  For Jazz, we’d have to drive her into town so they could do the job in a cold, clinical setting.  jazzy-bed

Her last full day was fairly uneventful.  She wanted to be outside more than in so I let her stay outside most of the day.  She’d lay in the sun snoring, or sit at attention, ears alert for sounds only a dog can hear.  She neither barked nor growled.  She just sat there mostly, taking it all in as though she knew the end was near and she wanted to see, smell, hear and feel as much of her world as possible in these last few hours of life.  At dinner time she ate a few bites of boiled chicken but the rest went to the other three dogs, seemingly oblivious to what was going on around them.  I wanted that day to last for a month, but it had to come to a close.  Jazz laid down at the foot of our bed one last time, where she had guarded us for so long, protecting us from the bogeyman and shadows and cats.  I lay with her, across the foot of the bed, curled up so I could reach down to intertwine my fingers in her thick fur, to feel her warmth on my skin and her chest rise and fall in slumber.  And we slept like that the night through.

At 6am I awoke and she shot up, eyes bright, ears perked, alert and ready for whatever was to come.  Seeing it was just me stirring, she huffed a bit and laid back down until I got up and padded out into the kitchen.  She followed me out, passing me by and heading straight for the door.  I opened the door to the morning rays and crisp, moist air and she took up her place on the ramp leading off the deck, sitting at attention, listening to the birds sing their morning songs while the wind gently bent branches and rustled leaves.  I fixed a cup of coffee for myself and came out to sit with her on the deck and we sat there together in silence as the air warmed around us, listening to the cacophony of nature in all her beauty and glory.jazzy-hug

 

I sipped my coffee and Jazz just observed the world around her.  I got up and took some pictures and she watched the clouds move overhead.  I got dressed and the time passed by more quickly than before and she sat, alert to every buzz and bump and screech and chitter.  At 8:00 am I began feeding her valium hidden in lumps of peanut butter.  She greedily licked the gobs of peanut butter from my finger, never realizing that each one contained another dose of sedative. With each pill I felt as though I was betraying her anew, drugging her against her will.  With each pill it became harder and harder as my eyes filled with tears and the sobs started to come over me.  With the final pill delivered, I sat back down with my White Tipped Girl and whispered in her ear what a good dog she was.  I put my arm around her and hugged her tightly, crying into her soft warm fur, listening to her breathe.

jazzy-jeffThe drugs started to kick in.  She became dizzy.  Her head drooped now and again and she became weak.  It became harder and harder for her to stay upright.  Her strength waned and her feet slipped.  I leaned into her, propping her up with my weight, resting her head on my shoulder.  I held her tight and told her I’d hold her up.  I’d be her legs and I’d be her strength.  I told her I’d carry her the last mile, I’d be with her until the end.  I cried and I cried as she trusted me to keep her from falling and then it was time.

I picked my Jazzy girl up in my arms and carried her back into the house.  She was weak, but still alert, still observant.  The other dog still didn’t know what was happening as I carried her through the door and out to the car.  Dana had arranged a bed in the back of the car for her, but at the last minute I knew she needed to be next to me so I had Dana reset the rear seats and I gently sat into the back of the car with my girl and I held her close the whole way.

The trees rushed by the window in a blur of browns and greens topped with the myriad shades of grey that make up an overcast sky.  We sat in the car, my arm around her, holding her tightly to me as we both watched the cascade of colors racing by.  She barely had the strength to keep her head lifted, but she did.  The ride passed in silence, each passing tree trunk a marker counting down the minutes and seconds of life.  The trees gave way to light posts and buildings as country became town.  The smooth Rrrrrrrrr of tires on pavement became the crunch of gravel as we pulled into the parking lot.  The three of us sat there in the car watching the clock tick closer and closer to 9:00.  The appointed hour was on us and Dana went in to announce our arrival.

The vet techs had cleared a room for us and laid out a ratty old blanket for Jazz to lay on.  At least the floor would not be so hard and cold.  She stretched out weakly, the valium having put her into a stupor at this point, and we laid down with her on this blanket, tears in our eyes while just on the other side of the wall were the sounds of a busy vet practice, barks, growls, meows and howls.  People conducting business.  Laughter.  Life.  It made me angry, to be honest.  She deserved peace when she died.  She deserved a warm breeze and soft grass and close friends and family.  Instead she got a room in a clinic, cold, medicinal and methodical.

The staff was great, don’t mistake my anger at the situation for anger at them.  As always, they treated us with care and compassion.  It was just the part of me that rebelled against bringing her here that was lashing out.  The part that wanted her to have the perfect ending to a not always perfect life.  Jazz rallied her strength and fought through the druggy fog to turn her head to look first at Dana and then at me.  Her strength gone, she laid there using her reserves to be what she always was.  Alert.  Aware.  My Jazzy died staring into my eyes and I cried again.

It wasn’t until today, a perfect pre-spring afternoon, as I rode my motorcycle into town to collect her ashes from the vet’s office that it finally occurred to me.  I HAD given her the perfect ending.  She was with the two people who loved her most in this world, and the very last thing she saw was the love and pain in my eyes.

image

Jazzy is home…

 

And just like that, over a cup of coffee and an english muffin, I scheduled her death…

Jazz It’s funny how things happen.  One day you’re squatting next to your wife in a cramped laundry room doting over a neurotic Alaskan Husky who is in the process of squirting out wriggly little husky mutt puppies and the next day, it’s over 12 years later and you’ve just gotten off the phone with the vet, setting up the date and time of one puppy’s death.

“That’s not a puppy, thats an old dog,”

is what they say.  To me she’s still that same wriggly little puppy, solid black with the white tip on her tail differentiating her from several other squirming black balls of fur.

puppies

Of course, she’s not solid black these days.  Her muzzle long since turned grey with the white of age creeping in around her eyes.  Her chest covered in long wisps of silken white and even her tail trailing bits as well, though her signature white tip, once disappeared, has come back to mark her as that one pup I favored more than the others in that litter.  The one that I had the hardest time parting with when we initially found them homes.

She’s been the most gentle, sweetest dog I’ve known.  Hard headed, for sure, but smart and alert.  She’s been our protector, our cuddler and a big, soft, fuzzy presence her entire life, save the few months early on when we thought we had found a Forever Home for her.  Turns out, her Forever Home was actually here, so ignoring that brief interlude, I’ve raised her from the day she came into this world and seen her grow into a beautiful black husky mix with a low growl that makes her sound like a dog twice her size and infinitely more fierce, though she’s a lover at heart.

Soon she’ll no longer shed clumps of black undercoat all over the house during the biannual Husky Shedding.  She’ll no longer adorn the recliner, taking it for her own.  Soon she’ll no longer whine at the door or at the fence, alert and so unhappy that all those rabbits and squirrels dare taunt her from the outside world.  No more trips to K9 Kindercare to run and play with so many other dogs while we travel somewhere for a weekend or a week.  No more having to put up with Milo, all twelve pounds of him, jumping and nipping at her in a vain attempt to get her into the right place for “Dinner Time”.  No more bounding past everyone to get to her bowl, where she’d woof down her food and then start sniffing at other bowls, just in case.

These days, she’s not that interested in food and what she does eat, she has trouble keeping down.  She feels bad, and it’s getting worse.  She’s tired.  I can tell.  She finally looked at me and said, “It’s time to go, Dad.”

So I made the call after my spate of morning meetings.  Work.  Work always gets in the way of life.  There’s always meetings to be had.  I’ll have no meetings on Monday.  I’ve already cancelled my afternoon.  No work, nothing.  And this weekend I’ll do my best to give her the best weekend of her life.  Just as I was able to do for Patches… One Last Hurrah before we have to part ways.  One last hike together before she has to take that hike alone, across the bridge.

Jazzy

This morning I woke up and made a large cup of pour-over coffee.  I had a toasted english muffin with apple butter.  I had two meetings, and a phone call.  And just like that, I scheduled her death.

How do you decide when the choice is not obvious?

jazz-reclinerShe came into my life 12 years ago, a sticky wet mess of black fir along with her siblings.  She was part of a litter that never should have been, just days before we were going to have her mom spayed, mom got caught on her run by a bad boy who had been living in our woods.  So some months later, we had a litter of mostly black Husky mix puppies.

We found homes for each and every one, and for each we firmly insisted that should the adoptive family not be able to keep the pup for any reason, at any time, all they had to do was call.  One family, after a few months, were not able to keep this one, my little White Tip Girl, because of their landlord.  I can only assume they didn’t actually run it buy him first.  In any case, we took her back and she never left.

She was my White Tipped Girl because she was solid black except for a stark white bit at the end of her tail.  As she grew, that slowly disappeared too until she was solid black. Before long, she was a big, black Husky/Shepherd looking dog with a deep, rumbling growl and a loud bark, and she was about as timid as it gets when it really comes down to it.

puppiesShe’s hard headed, but listens well, loves to lay her head in my lap for scratches and just stares at me.  At night she gets huffy if you aren’t in bed on time (just like her mother did until she decided she’d rather sleep in the den).  At 12 she still bounces around like a puppy, chases squirrels and rabbits and barks at birds and noises that only she seems to be able to hear.

For all intents and purposes, she’s a healthy, happy, energetic dog who acts half her age.

But she’s not.  She started vomiting up dinner.  This would happen occasionally and we’d just chalk it up to her eating too fast, or maybe eating grass or other stuff out in the yard.  Occasionally became slightly more frequent, and she started vomiting at night or just before the evening meal time.  We took her to the vet and the ultrasound came back with a “mass” in her abdomen.  We opted to not go to a specialist to have it biopsied at a huge expense (northward of $2000 just for confirmation of what we were starting to suspect). Instead, we got her some anti-nausea meds and decided to wait a week or so.

So the meds helped.  No vomiting that I know of at all (except for a little bit of bile this morning on the way to her follow-up) until the meds ran out.  And since she was able to keep her food down, her weight increased by 2 pounds in a week, which is a good gain, all things considered.  However, her blood work hasn’t improved, and today a more experienced vet did the ultrasound and saw masses on her liver, pancreas and fluid building up where there shouldn’t be any.

Today’s visit was hard.  Even if we went the specialist route, there’s really nothing that can be done, other than re-confirming the inevitable.  So that is why today really sucks.  Now we have to make The Decision.  A decision that we’ve made before, only then it was not so hard.  For Patches and Jack, we knew, and they knew that they were ready to go.  Jazzy is not ready.  She’s still full of energy, bright, soft, loving.  She hasn’t slowed down a bit, even though she’s got a timebomb inside her.  The Vet says that when she crashes, it’ll be fast, and sudden.

So there’s the choice to make.  Do we end her life now, while she’s still vibrant, aware, not hurting, or do we wait, hoping that when the time comes it’s not on a weekend when the vet’s closed, or worse, that it doesn’t happen while we’re gone somewhere, coming home to find that she’d died alone while we were away.  Or do we wait, putting off what ultimately must happen, because we’re not ready.  It’s a gamble.  I am pretty sure that when the time comes, she won’t be tired.  She won’t look at me with that look that says “Daddy, it’s time for me to go.  I’m tired, and I don’t want to hurt anymore”.  She’ll look at me unsuspecting, not understanding why I’m in tears.  She’ll just drift off to sleep dreaming of whatever it is she dreams of until she’s no more.

jazz-kittenI’m not ready to let go.  But I need to be.  How do you make that choice when the choice is NOT obvious?

Setting up Intel AMT to act as a remote KVM in Linux

I’ve been running MAAS for some time now on an Intel NUC, specifically the DC53427HYE model from a few years ago.  There are very few NUC models that offer vPRO support which is why I chose this one to begin with.  It had been running well for quite  a while with Ubuntu 14.04 and MAAS up to version 1.9 from the MAAS stable PPA.  And then tragedy struck…

It all started when I decided I was going to try to upgrade my server to Xenial, the coming Ubuntu 16.04 LTS Alpha.  I realize the perils of running Alpha level stuff, but this box is as much a development box as it is a production server at home, so I chose the risk, and paid the price.  My upgrade, using do-release-upgrade, left me with a half-configured, semi-functional machine and no easy way to recover.  Thus, I decided it was time to just reinstall from scratch.

Truth be told, this was coming anyway.  I’m working on a set of training slides involving my team’s custom MAAS setup for Ubuntu Server Certification so I wanted to get some good screen shots from various stages of building the server and using it.  Thus, I chose to really put AMT to the test on my NUC and see if it could deliver.  Keep in mind, this is a pretty quick run-through, and if it fails, I’ll likely result to something more manual, like the iPhone screen shot method.

First, I needed to reset AMT/MEBx as I had long forgotten the password I originally set.  This is fairly easy on this board (and most NUCs).  You unplug the NUC, crack the case, find the BIOS/MEBx reset pins near the RAM sockets, and jumper pins 1 and 2 for 5 seconds.  Put it all back together, and when the NUC boots, hit CTRL+P to get the MEBx login and you’re back to the original password of “admin”.  You’ll need to change the password on first entry, as before.  You may also need to check the BIOS settings as well to make sure nothing has changed.  Mine did register a CMOS battery failure alert that I cleared from the System Event Log.  Beyond that, at this point AMT is available remotely once you have set the network settings in the MEBx console and enabled Remote Management.

AMT Web Interface

AMT Web Interface

Note, if you have trouble finding the reset pins I mentioned earlier or are not sure which pins are 1 and 2 (there are three pins) refer to the technical manual for your NUC board.  For this particular board, you’re looking for this guide.

Now that MEBx is reconfigured, I wanted to set up remote KVM via the AMT engine.  This proved to be a little more obscure.  There are ways to easily enable this in Windows.  You simply download a Management Console binary, install that along with RealVNC and then do some config and off you go.  Doing this on Linux proved to be a bit more difficult.  To do this, you’ll need to start with wsmancli.  Thankfully, the painful parts (deciphering WSMAN) were already done, and I learned the process by following from this post at serverfault.com.

First, you need to install wsmancli which is available from the Ubuntu repos.

bladernr@sulaco:~$ sudo apt-get install wsmancli

Next, it helps to set up a few shell variables for important things:

bladernr@sulaco:~$ AMT_IP=192.168.0.20
bladernr@sulaco:~$ AMT_PASSWORD=1Nsecure!
bladernr@sulaco:~$ VNC_PASSWORD="1N\$ecure"

Note that for the VNC Password, it must be EXACTLY 8 characters, consisting of at least one of each of these: Lower Case, Upper Case, Number, Special Character. Additionally, I had to escape the ‘$’ since that, itself, is a shell variable.  We’ll see if that way leads to madness.  Remember that you need to escape the ‘$’ here, but when you reference it outside the shell, the exape character ‘\’ shouldn’t be necessary.  Also, it’s probably a better idea to not use ‘$’ as part of the password anyway.  Just sayin’.

Now, we need to configure things using wsmancli:

bladernr@sulaco:~$ # Enable KVM
bladernr@sulaco:~$ wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h $AMT_IP -P 16992 -u admin -p ${AMT_PASSWORD} -k RFBPassword=${VNC_PASSWORD}

bladernr@sulaco:~$ # Enable KVM redirection to port 5900
bladernr@sulaco:~$ wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h $AMT_IP -P 16992 -u admin -p ${AMT_PASSWORD} -k Is5900PortEnabled=true

bladernr@sulaco:~$ # Disable opt-in policy
bladernr@sulaco:~$ wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h $AMT_IP -P 16992 -u admin -p ${AMT_PASSWORD} -k OptInPolicy=false

Now, on that third line, I ran into trouble.  I’m not sure why that one kept failing with this error:

Connection failed. response code = 0
Couldn't resolve host name

When the others worked fine.  So since this is just disabling the default requirement for Opt-In on KVM connections, I went back into MEBx itself.  You can find the setting under User Consent.  Set Opt-In from KVM to None, so that no opt-in is required for remote connections.

bladernr@sulaco:~$ # Disable session timeout
bladernr@sulaco:~$ wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h $AMT_IP -P 16992 -u admin -p ${AMT_PASSWORD} -k SessionTimeout=0

bladernr@sulaco:~$ # Enable KVM
bladernr@sulaco:~$ wsman invoke -a RequestStateChange http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_KVMRedirectionSAP -h ${AMT_IP} -P 16992 -u admin -p ${AMT_PASSWORD} -k RequestedState=2

These last two first set the session timeout to 0, so that you are never disconnected, and then finally turn KVM on.

I use Remmina for VNC, RDP and similar connections, so I configured a new connection in Remmina and gave it a go.  It failed.  Looking at the debug log, the connection was quickly terminated.  So first I changed the VNC password.

bladernr@sulaco:~$ wsman put http://intel.com/wbem/wscim/1/ips-schema/1/IPS_KVMRedirectionSettingData -h $AMT_IP -P 16992 -u admin -p ${AMT_PASSWORD} -k RFBPassword=Vnc-p@55

The new password was accepted (that was my third attempt at a memorable password that meets all of Intel’s ridiculous requirements.  All things considered, however, I don’t believe the issue was the password.  See the end for the root cause of my issues connecting initially.  Once I had set a new password, I re-configured Remmina and tried again.  And again, failure:

[VNC]VNC server supports protocol version 4.0 (viewer 3.8)
[VNC]We have 2 security types to read
[VNC]0) Received security type 2
[VNC]Selecting security type 2 (0/2 in the list)
[VNC]1) Received security type 128
[VNC]Selected Security Scheme 2
[VNC]VNC authentication succeeded
[VNC]Desktop name "Intel(r) AMT KVM"
[VNC]Connected to VNC server, using protocol version 3.8
[VNC]VNC server default format:
[VNC] 16 bits per pixel.
[VNC] Least significant byte first in each pixel.
[VNC] TRUE colour: max red 31 green 63 blue 31, shift red 11 green 5 blue 0
[VNC]read (104: Connection reset by peer)

But it looks like the password is accepted, so we’re good there.  We’re just missing one piece.

It turns out it was one more bit of annoyance from Intel.  I finally was able to dig up the KVM settings info from Intel after some Googling.  Right there on that page is the following:

If the Intel AMT platform is currently displaying the MEBx, it is not possible to open a KVM session.

I still had MEBx open on the NUC so I could manually change settings if I needed to.  I still don’t know why I was unable to set the Opt-In policy remotely.  That should have worked, but in the end, the result was what I wanted.  I now have KVM control via AMT on my NUC.

Remote KVM via AMT