Follow the steps shown below if you want to be able to run nested virtual machines on RHEL 7 via KVM.
In this particular situation I have a physical Supermicro server that I want to use to host OpenStack.
Note that my home server has Intel Xeon processors, so I first enable nested virtualization via the KVM intel module. AMD procs use a different module.
Also, in order to communicate with your nested VMs you will need to disable reverse path filtering, otherwise RHEL will discard any network packets in order to prevent asymmetric routing. See below.
I was looking for a simple example of how to iterate through an array in a Puppet module. I basically needed an example of a “for loop” inside a Puppet module that I could, as someone who is not exactly fluent in Ruby, could modify to fit my needs.
I settled on the format that you see below.
The “define” code block is basically the work that we want the Puppet module to do. In this case, it’s create a file in /tmp. Think of this line as pretty much just a placeholder for more complex code.
The “class” code block is where we setup our array of items for the module to “loop” through.
The “Legend of Zelda – Outlands” is a hack of the original 8-bit “Legend of Zelda” game for the NES. The ROM can be downloaded here. The game is also available in cartridge format on Ebay and the like, however the price is prohibitive.
Note that this re-work of the original LOZ game is notoriously difficult. I was, however, able to dig up walkthrough in word doc format. I am posting it below for posterity, and am adding some formatting to make it easy to read.
Story
The Thunderbird, a horrible guardian encountered by Link in the Great Palace of Zelda 2, has somehow survived and is out for revenge. Having lost the Triforce of Courage at the hands of its adversary, it has stolen the Triforce of Power and flown to the vast neighbor of Hyrule, the Outlands.
In a world similar to yet completely different from Zelda 1, Link must track down the captured Tetrarch Fairies and, with their help, break open Ganon’s secret golden vault where the creature now resides. Link will face dangers and traps unlike anything Ganon had ever devised. His adventure will span 18 new dungeons hidden within a completely unfamiliar terrain.
Zelda herself will make appearances to help the hero, providing items and sage advice crucial to the new journey. Link has become very skilled in his familiar world of Hyrule, but skill alone is his only advantage — the land of the Outlands is a beautiful yet deadly world bearing no resemblance to his own cherished kingdom.
Map Of Overworld – Click for Full Size
Walkthough
Overworld
Your start location is on the west end of the map, (at A6) and you dont have any weapon with you. From here, go right three screens, down once, and right once. you will arrive at screen E7 and enter Level 1 here.
Level 1 : Amicus Palace
Item to get : Sword Heart Container : #1 Tetrach Fairy:1
As soon as you enter, go right 2 screens and you will get your sword from Zelda. Head back left and kill the easy blue Peahats for 5 rupees and go up. Here, Kill all Gibdos to get the key and unlock the door there. Go up, right, up, and right 4 screens. Kill all the Peahats and then push the far left block to open the doors.
Go right again and kill the Peahats, then grab the key and head up to next room. Here, you will get a compass from Zelda. from here, Go down 2 screens and you’ll face Boomerang Moblins that will attack you with boomerang, and they are deadly. Kill them for the map. From here, go up, left, left, down, and left 5 screens.
Here, go left and up 2 screens. Kill all the Deelers here and head up again. Destroy the Cages and note the one difference in details in this room. There’s a block on the right side where a gap is on the left. Push this block down and go right once. Kill the Moblins for another key and go right again. Note the Wizzrobe Quartet in here, focused on a ball in their center. This will be important later.
Make your way back to the room that had the Deelers and go left by unlocking the door. Kill or just avoid the Blue Moblins and go left. Ready for tough battle, Basilisk triplets!
To defeat them, feed them with a bomb and quickly place a second to kill it. You can slash it after stun it with bomb to get four extra bombs. Once you’re done head down and kill the Peahats, then push one of the block to get the Heart Container #1.
Then, go up 2 screens and grab the Tetrach Fairy #1. Before leaving this dungeon, check your map and you’ll notice a few rooms that you haven’t explored yet. We’ll be come back here later… So leave this dungeon.
This is going to be a very simple example of how to convert a variable to all lowercase inside a Puppet module.
If you look, which I am sure that you have already…there seems to be a lot of documentation around how to use the Ruby “downcase” function, but not much of it is easy to read if you are not very familiar with Ruby.
In this example, I create a very simple Puppet module and show how to use the downcase function.
class test-module (
$myname = "TEST",
){
$myname_downcase = downcase($myname)
file { "/var/tmp/$myname_downcase":
ensure => present,
content => "This is a Test File for $myname_downcase",
}
}
In this example I have a Variable called $myname. I am setting $myname to TEST inside the init.pp.
Note however you would probably never do this. More than likely you would do one of the following:
Set $myname so that it is an external environmental variable
Set $myname to NULL and override in Foreman.
The meat in this potato is this line here, where we take the $myname variable and munge it into a new variable called $myname_downcase.
In this instance we are trying to run Red Hat Cloudforms, also known as Manage IQ, and Puppet together on the same RHEL 6 host.
Our goal here is to push out some configuration to the Cloudforms appliances via Puppet. However we ran into issues as the version of Ruby/Ruby Gems used by Cloudforms is different than the version used by Puppet and they are stepping on each other a bit.
Here is the error we see when attempting to run Puppet
Interesting read for those who want to integrate Foreman into their RHEV environment. I’m still working on figuring out the exact benefits of doing so, but this this seems like its the go-to guide to reference.