tag:blogger.com,1999:blog-22672841871436279702024-03-13T16:42:33.747-05:00RAT NestStuff I'm interested in.RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.comBlogger89125tag:blogger.com,1999:blog-2267284187143627970.post-66255670386153501392019-12-05T08:27:00.000-06:002019-12-05T08:27:17.690-06:00Linux Kernel 5.4 and VirtualBox PuzzleI've been puzzling over WHY my VirtualBox doesn't work under Linux kernel 5.4 ever since 5.4-RC1 came out. Last week, Slackware -current made 5.4 the default kernel so I hoped all was well - NOPE! So I compiled it myself adding in the modules that have always allowed everything to work up until 5.3.x. That didn't work either. Bummer.<br />
<br />
So I did a bit of research (5 seconds of googling) and it seems there was a lot going on with VirtualBox and Linux kernel 5.4. First there was <a href="https://www.virtualbox.org/ticket/18945" target="_blank">this</a>:<br />
<br />
<blockquote class="tr_bq">
Linux 5.4 kernel will no longer make interfaces available so that
arbitrary kernel modules may modify page attributes to turn the
executable bit on/off. Virtualbox currently is one of such kernel
modules doing that.
</blockquote>
<br />
Then, it seems, in 5.4-RC7 they added a special<a href="https://www.phoronix.com/scan.php?page=news_item&px=Linux-5.4-rc7-Released" target="_blank"> "shared folder"</a> area for Virtualbox which was later <a href="https://www.phoronix.com/scan.php?page=news_item&px=VirtualBox-SF-Ejected-Linux-5.4" target="_blank">removed</a>. <br />
<br />
So, at this time, it seems VirtualBox and Linux kernel 5.4 are not going to play well together until a <a href="https://news.softpedia.com/news/virtualbox-6-1-enters-development-with-linux-kernel-5-4-support-ui-improvements-528288.shtml" target="_blank">special new VirtualBox 6.1 candidate</a> is released (designed specifically to work with VirtualBox). So far, I cannot find this release candidate (<a href="https://www.virtualbox.org/wiki/Testbuilds" target="_blank">5 seconds of googling</a>).<br />
<br />
That's ok, I have my box set to always my special vanilla 5.3.x (5.3.15 at the time of this writing). I just hope this continues to get updates so I don't have to drop back to the<a href="https://www.kernel.org/" target="_blank"> 4.19.x LTS kernel</a>.<br />
<br />
If you see a release candidate for VirtualBox 6.1 post a response. I'll do the same (so we're racing).RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com4tag:blogger.com,1999:blog-2267284187143627970.post-4728575139055779022019-10-14T16:12:00.003-05:002019-10-14T16:12:27.466-05:00Slackware 14.2 Under XenServer 7.1<span style="font-family: Arial, Helvetica, sans-serif;">I've always had a networking problem with <a href="http://www.slackware.com/" target="_blank">Slackware</a> as a guest VM under <a href="https://www.citrix.com/products/citrix-hypervisor/" target="_blank">Citrix XenServer</a> (or Citrix Hypervisor, I guess is what they call it these days). I still prefer Slackware as a desktop and so I set about solving this again recently - this time I would not be thwarted!</span><br />
<span style="font-family: inherit;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">I ran across this article: <a href="https://serverfault.com/questions/480217/how-do-i-disable-8139too-network-driver-in-favor-of-the-8139cp-network-driver-in" target="_blank">How do I disable 8139too network driver...</a> because lsmod lead me to search for 8139too networking module. This was an Ubuntu article, so, I'll transmorgify it a bit for Slackware users. The first thing it suggested was to blacklist 8139 in the modules. Like the author of this I did not have any luck with that. It was suggested you use the 8139cp instead (cool! I didn't even know of its existence before this article).</span><br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"># lsmod | grep 8139</span><br />
<br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">This revealed 8139too in use and bound with mii, so...</span><br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"># rmmod 8139too</span><br />
<span style="font-family: "Courier New", Courier, monospace;"># rmmod mii</span><br />
<span style="font-family: "Courier New", Courier, monospace;"># modprobe 8139cp</span><br />
<span style="font-family: "Courier New", Courier, monospace;"># modprobe mii</span><br />
<span style="font-family: "Courier New", Courier, monospace;"># /etc/rc.d/rc.inet1 restart</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"><br /></span>
<span style="font-family: Arial, Helvetica, sans-serif;">At this point, I had, for the first time ever as a Slackware XenServer guest, a working eth0!</span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">In order to keep it (and use less resources) I created a smaller kernel /boot/initrd.gz by running mkinitrd.</span><br />
<span style="font-family: Times, "Times New Roman", serif;"><br /></span>
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"># /usr/share/mkinitrd/mkinird_command_generator.sh</span></span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">I appended :8130cp to the suggested mkinitrd script:</span><br />
<br />
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"># mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m jbd2:mbcache:ext4:8139cp -u -o /boot/initrd.gz</span></span></span></span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">This seemed to work nicely so I doctored up the boot area a bit:</span><br />
<br />
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"># cd /boot</span></span></span></span></span></span><br />
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"># rm System.map</span></span></span></span></span></span><br />
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"># ln -s System.map-generic-4.4.14 System.map</span></span></span></span></span></span><br />
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"># rm config</span></span></span></span></span></span><br />
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"># ln -s config-generic-4.4.14 config</span></span></span></span></span></span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">Then I added a section to the /etc/lilo.conf:</span><br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"> image = /boot/vmlinuz-generic</span><br />
<span style="font-family: "Courier New", Courier, monospace;"> label = Slackware</span><br />
<span style="font-family: "Courier New", Courier, monospace;"> initrd = /boot/initrd.gz</span><br />
<span style="font-family: "Courier New", Courier, monospace;"> root = /dev/sda2</span><br />
<span style="font-family: "Courier New", Courier, monospace;"> read-only</span><br />
<span style="font-family: "Courier New", Courier, monospace;"><br /></span>
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: Arial, Helvetica, sans-serif;">And I always add</span> <span style="font-family: "Courier New", Courier, monospace;">default = Slackware <span style="font-family: Arial, Helvetica, sans-serif;">before running lilo -v.</span></span></span></span><br />
<br />
<span style="font-family: Arial, Helvetica, sans-serif;">After that, I rebooted and had a Slackware install with a nice lean kernel with a eth0 running as a guest VM under Citrix XenServer (or Hypervisor - I can't get used to that!).</span><br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Arial, Helvetica, sans-serif;"> </span></span><br />
<br />
<span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"><span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: Times, "Times New Roman", serif;"> </span> </span></span></span></span></span></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><br /></span>
<span style="font-family: "Courier New", Courier, monospace;"> </span>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-37366310888420975992018-12-10T11:20:00.003-06:002018-12-10T11:20:59.485-06:00Ansible is so useful - Even for someone who doesn't know how to use it!I love Ansible! It is so useful even though my skills with it are very minimal, it is so powerful and useful. I have about 80 or 90 playbooks that I use over and over. They're all pretty simple but they get things done. I forget when and where I can use ad-hoc ansible commands. I love it when those work though. I thought I could use ad-hoc to view /etc/resolv.conf and goofed around with -shell and had no success. Then I found this I had written 13 months ago:<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;">- hosts: all<br /> sudo: yes<br /> tasks: <br /> - name: Display /etc/resolv.conf<br /> shell: cat /etc/resolv.conf<br /> register: resolv<br /><br /> - name: Debug resolv<br /> debug: var=resolv<br /><br /> - name: Debug resolv.stdout as part of a string<br /> debug: msg=`{{ resolv.stdout }}`</span><br />
<span style="font-family: "Courier New", Courier, monospace;"></span><br />
<span style="font-family: "Courier New", Courier, monospace;"></span><br />
<span style="font-family: "Courier New", Courier, monospace;"><br /></span>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-58481474560469022772018-11-28T13:27:00.002-06:002018-11-28T13:56:19.351-06:00Codename: Ubuntu Rusty<span style="font-family: "verdana" , sans-serif;">Just call me Rusty - with regards to Ubuntu anyway. Man! I can't remember how to set the IP in the old Ubuntu. Now, 18.04 has changed yet again. I'm a RHELish* user when I'm not using Slackware for my own personal desktop. Don't get me wrong - Ubuntu is a fine desktop. I used it from '04 to '09 parting ways when the Unity desktop came into play. I did enjoy Xubuntu and then later Lubuntu but found my 5+ years of 'buntu had weakened my RHELish skills much in the way the last (nearly 10) years has mu 'buntu skills SO I switched back. Actually, I always load Ubuntu for other people (non-Unix folks) who want to salvage an old laptop or old desktop that ran Windows 7 or something. I've had some success stories there. But I digress. </span><br />
<br />
<span style="font-family: "verdana" , sans-serif;">This is just a place to save these commands so I don't have to hunt them up YET AGAIN. </span><br />
<br />
<span style="font-family: "verdana" , sans-serif;"></span>
<br />
<h3>
<span style="font-family: "verdana" , sans-serif;">Changing an Ubuntu 18.04 LTS server's name</span></h3>
<span style="font-family: "verdana" , sans-serif;">This is pretty easy. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><b>$ sudo hostnamectl set-hostname linuxconfig</b></span><br />
<br />
<span style="font-family: "verdana" , sans-serif;">This note is not (currently) for me: Check for the existence of /etc/cloud/cloud.cfg and change preserve_hostname: false to preserve_hostname: true</span><br />
<br />
<h3>
<span style="font-family: "verdana" , sans-serif;">Changing the static IP of an Ubuntu 18.04 LTS server</span></h3>
<span style="font-family: "verdana" , sans-serif;">This is no longer in the /etc/network/interfaces. Instead look in /etc/netplan (sudo -s first or it will not auto-complete leading me to believe it didn't exist). The file is 50-cloud-init.yaml.<br /><br />That is all I have to say since this note is mainly for me. Hopefully I'll know what else to do when I need this information again. </span><br />
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;"><br /></span>
<span style="font-family: "verdana" , sans-serif;">---</span><br />
<span style="font-family: "verdana" , sans-serif;">*RHELish (pronounced "relish") is the term I coined for Red Hat -like based systems such as (of course) Red Hat Enterprise Linux, CentOS, Scientific Linux and Oracle Linux. </span>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-70662241090189097182017-11-28T09:49:00.001-06:002017-11-28T11:31:34.826-06:00Slackware14.2-current, VirtualBox and new kernelsI keep blowing up my Slackbuild VirtualBox setup with every new kernel update. Usually, I can just re-run the <a href="http://slackbuilds.org/repository/14.2/" target="_blank">Slackbuilds</a> for <a href="http://slackbuilds.org/repository/14.2/system/virtualbox-kernel/" target="_blank">virtualbox-kernel</a> and <a href="http://slackbuilds.org/repository/14.2/system/virtualbox/" target="_blank">virtualbox</a> (with a re-boot in between) and I'm fine. Not today. Tried all kinds of things. Then got weird. I was running the Slackbuild for VirtualBox 5.0.40. I decided to just skip package management and go straight to the source (hey, I'm a Slacker). So, I went to the <a href="https://www.virtualbox.org/wiki/Linux_Downloads" target="_blank">Oracle Virtualbox site</a> and found this link and then, from the command line ran the following:<br />
<br />
<br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">curl -O http://download.virtualbox.org/virtualbox/5.2.2/VirtualBox-5.2.2-119230-Linux_amd64.run</span></span><br />
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">sh VirtualBox-5.2.2-119230-Linux_amd64.run</span></span><br />
<br />
<style type="text/css">
p, li { white-space: pre-wrap; }
</style>Lots of things works, lots of things complained about symbolic links already existing (step 1 of this script attempted to remove my Slackbuild VirtualBox with, I'd say, partial success), and then it ended on "unable to start kernel drivers". Not a good sign I thought. Just for luck, another reboot. And then, I re-ran "rc.vboxdrv start" AND IT WORKED! So now I'm running 5.2.2!!<br />
<br />
So, I fire up an ALL NEW Oracle VirtualBox with lotsa Oracle branding (hmmm... didn't remember all of that). I attempt to start my Windoze VM - no go. It complains about USB 2.0 support not being there and suggests I try installing extensions.<br />
<br />
<div style="margin: 12px 0px; text-indent: 0px;">
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">Implementation of the USB 2.0 controller not found!</span></span></div>
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">
</span></span>
<br />
<div style="margin: 12px 0px; text-indent: 0px;">
<span style="font-size: xx-small;"><span style="font-family: "courier new" , "courier" , monospace;">Because the USB 2.0 controller state is part of the saved VM state, the VM cannot be started. To fix this problem, either install the <span style="font-weight: 600;">'<a href="http://slackbuilds.org/repository/14.2/system/virtualbox-extension-pack/" target="_blank">Oracle VM VirtualBox Extension Pack</a>'</span> or disable USB 2.0 support in the VM settings</span></span></div>
<br />
I re-run extensions. Still no go. So, I retro my VM's USB support from 2.0 to 1.1 (trying to think how often I use USB with a VM anyways?) AND IT WORKED!
<br />
<br />
<br />
Ok, not the slickest solution in the world. The installer did something with Python bindings, from what I could tell, installed some things, fixed some things, possibly broke my USB 2.0 support but otherwise bailed me out.<br />
<br />
So, if you're desperate - you're welcome.<br />
<br />
RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-57910476748613501872017-02-21T10:29:00.000-06:002017-02-21T10:29:05.007-06:00The Rare un-iSCSI CommandsI often add iSCSI volumes to Linux servers but, until now, rarely take them away. That strikes me as odd too. But, I guess when I get to the point of not using storage, the server is usually going away too. -Not in this case. <br />
<br />
So, here's the steps for removing all traces of an iSCSI volume. <br />
<br />
<h4>
Step 1: Find the iSCSI Session</h4>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[root@localhost]# iscsiadm -m session<br />tcp: [1] 192.168.0.100:3260,1 iqn.2001-05.com.emc:0-af1ff6-c57ac0bd5-712a2878fd0<br />533c6-backuppc (non-flash)</span></span><br />
<h4>
Step 2: Disable (logout) current iSCSI session</h4>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[root@localhost]# iscsiadm --m node -T iqn.2001-05.com.emc:0-af1ff6-c57ac0bd5-71<br />2a2878fd0533c6-backuppc --portal 192.168.0.100:3260 -u<br />Logging out of session [sid: 1, target: iqn.2001-05.com.emc:0-af1ff6-c57ac0bd5-7<br />12a2878fd0533c6-backuppc, portal: 192.168.0.100,3260]<br />Logout of [sid: 1, target: iqn.2001-05.com.emc:0-af1ff6-c57ac0bd5-712a2878fd0533<br />c6-backuppc, portal: 192.168.0.100,3260] successful.</span></span><br />
<br />
<h4>
Step 3: Double check that session is logged out</h4>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[root@localhost]# iscsiadm -m session iscsiadm<br />: No active sessions.</span></span><br />
<h4>
Step 4: Permanently delete iSCSI session</h4>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[root@localhost]# iscsiadm -m node -o delete -T iqn.2001-05.com.emc:0-af1ff6-c57<br />ac0bd5-712a2878fd0533c6-backuppc --portal 192.168.0.100:3260</span></span><br />
<br />
<h4>
Step 5: Stop iSCSI from running (since targets are gone)</h4>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[root@localhost]# service iscsi stop<br />Stopping iscsi: [ OK ] <br />[root@localhost]# chkconfig iscsi off</span></span><br />
<h4>
Step 6: Remove references to iSCSI in /etc/fstab</h4>
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[root@localhost]# vi /etc/fstab ...</span></span><br />RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-51005945555756730132016-08-05T10:04:00.002-05:002017-02-02T13:01:39.433-06:00Slackware and LXCI have a fresh Slackware 14.2 I've been enjoying since it came out this month. I needed a hyper-visor and was getting ready to add Xen (the hyper-visor of choice on Slackware). I like Xen, but I knew the compile times for the Slackbuilds and it's dependencies would probably take more time than I had at the moment. Then I remembered LXC. It comes with.<br />
<br />
I didn't know much about LXC so did some quick reading. They say "it's similar to Docker but easier" - I like the sound of that. So I check it out. It's EXACTLY like Solaris containers! Which I've been using for over 10 years - but, again, easier! It's pretty slick! And it installs by default on Slackware 14.2 but there's a few things you need to change.<br />
<h4>
</h4>
<h3>
ON THE HOST</h3>
<h4>
Edit the /etc/rc.d/rc.inet1.conf </h4>
Slackware does not have a bridged network device by default BUT it does have it defined and commented out. I found this works nicely except I was expecting my host interface to use eth0 and lxc guest to use br0. It was not what I expected but it works fine!<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace; font-size: x-small;"># Example of how to configure a bridge:<br /># Note the added "BRNICS" variable which contains a space-separated list<br /># of the physical network interfaces you want to add to the bridge.<br />IFNAME[0]="<span style="font-family: "courier new" , "courier" , monospace;">eth0</span>"<br />BRNICS[0]="br0"<br />#IPADDR[0]=""<br />#NETMASK[0]=""<br />USE_DHCP[0]="yes"<br />#DHCP_HOSTNAME[0]=""</span><br />
<h4>
Routing = Yes </h4>
You will, of course, need your host to route packets so<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"># chmod 755 /etc/rc.d/rc.ip_forward</span></span><br />
<br />
And then start it or restart. I like to restart to make sure everything is the way it needs to be before relying on it. You could also just<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"># echo 0 ></span></span><code><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"> </span></span>/proc/sys/net/ipv4/ip_forward</code><br />
<h4>
<br /><span style="font-size: small;">LXC Config</span></h4>
<span style="font-size: small;">Really the only other thing you need to do is add a bit to /etc/lxc/default.conf. This worked for me:</span><br />
<br />
<span style="font-size: small;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">root@slacks:~# cat /etc/lxc/default.conf <br />lxc.network.type=veth<br />lxc.network.link=br0<br />lxc.network.flags=up</span></span></span><br />
<h3>
<span style="font-size: small;"><span style="font-family: inherit;">O<span style="font-family: inherit;">N THE LXC GUEST</span></span></span></h3>
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Just run netcon<span style="font-family: inherit;">fig and set a static address or DHCP<span style="font-family: inherit;"> and then restart <span style="font-family: inherit;">rc.inet1</span></span></span></span>. </span></span></span><br />
<br />
<h3>
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">WHAT LXC GUEST?!!</span></span></span></span></h3>
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Oh, I skipped that bit, eh? Super simple. Try this:</span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"> </span></span> </span></span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"># lxc-create -n lxcguest -t /usr/share/lxc/templates/lxc-slackware</span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"># lxc-start -n lxcguest -d</span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"># lxc-console -n lxcguest (it'll tell you how to login) </span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Now, run netconfig. </span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">What?! You<span style="font-family: inherit;">'re already running Slackware on the host and you'd like to try <span style="font-family: inherit;">som<span style="font-family: inherit;">ething different? Just run list <span style="font-family: inherit;">the contents of </span></span></span></span></span></span></span></span><span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"> /usr/share/lxc/templates<span style="font-family: inherit;"> and then <span style="font-family: inherit;">try on<span style="font-family: inherit;">e or a dozen of the other 1<span style="font-family: inherit;">8</span> pre-installed templates. Like:</span></span></span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;">root@slacks:~# ls /usr/share/lxc/templates<br />lxc-alpine* lxc-cirros* lxc-openmandriva* lxc-sparclinux*<br />lxc-altlinux* lxc-debian* lxc-opensuse* lxc-sshd*<br />lxc-archlinux* lxc-download* lxc-oracle* lxc-ubuntu*<br />lxc-busybox* lxc-fedora* lxc-plamo* lxc-ubuntu-cloud*<br />lxc-centos* lxc-gentoo* lxc-slackware*</span></span></span></span></span></span></span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><br /></span></span></span> </span></span></span><br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">I<span style="font-family: inherit;">f you down like any of th<span style="font-family: inherit;">ose, try something else with this <span style="font-family: inherit;">command:</span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"># lxc-create -t /usr/share/lxc/templates/lxc-download -n newguest</span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">You will be given<span style="font-family: inherit;"> a<span style="font-family: inherit;">n even bigger choice. Knowing<span style="font-family: inherit;"> Slackware and <span style="font-family: inherit;">how stable it is, I would stay<span style="font-family: inherit;"> with the <span style="font-family: inherit;">l<span style="font-family: inherit;">ocal choices to ensure that legendary <span style="font-family: inherit;">stability stays as is<span style="font-family: inherit;"> (but that's just me).</span> </span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-size: x-small;"><span style="font-family: "courier new" , "courier" , monospace;"><br /></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br />
<br />
<h3>
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">THE EN<span style="font-family: inherit;">D</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></h3>
<span style="font-size: small;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Well, that's all of my notes. <span style="font-family: inherit;">Postive c</span>omments and any kind of experiences with LXC are always welcome below. </span> </span></span> </span></span></span></span></span></span></span></span></span><br /> </span></span></span></span></span></span></span> </span></span></span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-25806949912453738702015-12-22T17:14:00.002-06:002015-12-23T09:15:56.927-06:00It's a good time to be a Linux sysadmin!Linux is everywhere now. It's on <a href="https://products.sel.sony.com/opensource/" target="_blank">my TV</a>, on my <a href="https://www.roku.com/" target="_blank">Roku</a>, it's the firmware running my SAN hardware, it's the OS behind all of our virtualization platforms. If you know me, you know my technology passions are for <a href="http://www.slackware.com/" target="_blank">Linux</a>, <a href="http://www.silug.org/~robert/perl/" target="_blank">Perl</a> and pretty much anything running open source. I started using Linux about 1993/94 when I downloaded <a href="https://en.wikipedia.org/wiki/Softlanding_Linux_System" target="_blank">SLS</a> from <a href="https://en.wikipedia.org/wiki/GEnie" target="_blank">GEnie</a> over my 2400 baud modem. It was kernel 0.99p11. It booted Linux and ran off of floppy. Later, I got a larger copy from GEnie using work's 9600 baud connection. I had to dialup Indy to get a speed that fast!<br />
<br />
Later, when Windows 95 came out, I started running Linux as my desktop and I've stuck with it. I remember that the guys in my office would always reboot their Windows 95 systems at lunch as a preventative measure to prevent accidental lockups. One time, just prior to lunch, I distinctly remember Ken yelling "Oh no! It locked up and I've been working on that spreadsheet for an hour!" I typed "w" to get my uptime:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[rat@localhost Desktop]$ w</span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> 16:39:19 up 99 days, 8:14, 4 users, load average: 0.25, 0.25, 0.27</span></span><br />
<span style="font-family: "Courier New",Courier,monospace;"></span><br />
<br />
Ha! They can't keep their desktop up half a day - mine's been up for 99 days and still going. I think to myself: "Linux - I think I'll keep it."<br />
<br />
It's been over 20 years. I can remember telling someone I worked on Unix and Linux systems. "Ah, a niche OS, eh?" "Niche?" Not really. Unix/Linux was running the Internet before these guys knew there was an Internet. It's always been the one to run <a href="https://en.wikipedia.org/wiki/Domain_Name_System" target="_blank">DNS</a>, <a href="http://news.netcraft.com/archives/2015/05/19/may-2015-web-server-survey.html" target="_blank">web servers</a>, <a href="https://www.isc.org/downloads/dhcp/" target="_blank">DCHP</a> servers, <a href="http://www.ntp.org/" target="_blank">NTP</a> (time protocol), etc. It ran all the <a href="https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol" target="_blank">SMTP</a> (mail) and <a href="https://en.wikipedia.org/wiki/Simple_Network_Management_Protocol" target="_blank">SNMP</a> (network and hardware monitoring). Linux WAS the back office of any decent sized IT shop. <br />
<br />
Later, Apple forked BSD Unix into its operating system <a href="https://en.wikipedia.org/wiki/OS_X" target="_blank">OSX</a>. Now Apple was Unix! I was very much at home on the Apple OSX command line. Everything was there: <a href="https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29" target="_blank">Bash shell</a>, Perl, and all the <a href="https://en.wikipedia.org/wiki/List_of_Unix_commands" target="_blank">core Unix commands</a>. Pretty cool. <br />
<br />
Next came <a href="https://en.wikipedia.org/wiki/Windows_PowerShell" target="_blank">Windows PowerShell</a>. So many of the commands were aliased to bash commands that I was once again at home. I really like <a href="http://myratnest.blogspot.com/2014/12/even-more-fun-with-server-core-2012-r2.html" target="_blank">Windows 2012 R2 Core and PowerShell</a>. Each new version of PowerShell adds more and more <a href="http://cecs.wright.edu/~pmateti/Courses/233/Labs/Scripting/bashVsPowerShellTable.html" target="_blank">bash-like aliases</a>.<br />
<br />
And now, <a href="http://www.pcworld.com/article/2836412/microsoft-hearts-linux-for-azures-sake.html" target="_blank">Microsoft Azure Cloud Services</a> has dozens of versions of Linux you can deploy in their cloud service. One estimate was that over <u>75% of the virtual machines in Microsoft Azure Cloud Service were Linux.</u> Even better - <b><a href="http://www.wired.com/2015/09/microsoft-using-linux-run-cloud/" target="_blank">Microsoft runs AZURE on Linux!!</a></b> What's more, the Azure services SDK client also runs on Linux! It was pretty freaky seeing bash scripts with a Microsoft license boiler plate on them. And now the Office 360 is coming to Linux!<br />
<br />
It's not a niche! It's not going away. I'd say that, without fan fare, Linus' OS has finally won. I saw the future 20 years ago. <b>It is Linux!!</b><br />
<br />
Merry Christmas everyone!<br />
<br />
P.S. Don't forget - Linux is the OS running <a href="http://www.cnet.com/news/linux-and-android-together-at-last/#!" target="_blank">Android phones</a> and the <a href="https://www.raspberrypi.org/" target="_blank">Raspberry Pi.</a> <br />
<br />
References:<br />
<a href="http://www.wired.com/2015/09/microsoft-using-linux-run-cloud/">http://www.wired.com/2015/09/microsoft-using-linux-run-cloud/</a>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com2tag:blogger.com,1999:blog-2267284187143627970.post-61502857217668607672015-12-17T16:09:00.001-06:002015-12-17T16:11:32.815-06:00The Joy of Modern Computing<ol>
<li>Solaris Zones & Containers </li>
<li>Oracle VirtualBox </li>
<li>Xen </li>
<li>VMware </li>
<li>KVM </li>
<li>Heroku</li>
<li>Hyper-V </li>
<li>Citrix XenServer </li>
<li>Oracle VM Manager (OVM) </li>
<li>Amazon Web Services (AWS) </li>
<li>Microsoft Azure Cloud Services</li>
</ol>
These are a few of my favorite virtualization platforms that I've been using since 2006. I love virtualization! I work mainly out of a virtualized desktop running ssh into virtualized systems. Lately, I've been working a lot with Microsoft Azure Cloud Services.<br />
<br />
It's funny how this is perceived by some people unfamiliar with it. Today in a meeting, some people thought that moving systems to the "cloud" would cause a loss of IT positions. I never thought so. My least favorite part of the job is the part that takes .001% of your time - mounting the physical hardware in a rack and wiring it. If that goes away, I will not miss it at all.<br />
<br />
I love that I can clone, copy and snapshot VMs. Using physical hardware now seems to me like working without a net. I would not want to go back. Even better is having the services in the cloud. No messy wires, no failing hard drives (I have an open ticket for one now). Even backups are a breeze.<br />
<br />
I have a 32 bit Windows 7 desktop VM that I migrated from a PC running CentOS 5 under Xen to a PC running Red Hat Linux 6 running KVM (that was a tough migration - but it worked!) and then I moved it again to a PC running Oracle Linux 7 under KVM (much easier move). So, my Windows 7 has been with me through 3 PCs. All of my stuff is there - all my files and software. Virtualized PC's are really cool!<br />
<br />
I also run additional VMs on my PC. If a new distro comes out and I want to see what it looks like - I just load it from the ISO! I don't have to have spare hardware. It's great! I have been running my desktop like this about 6 years and can't imagine doing it any other way. (I started virtualizing my servers almost 10 years ago).<br />
<br />
Lately, as I have built about a dozen various VMs in Azure. I've been testing the cloning of VMs & filesystems and securing endpoints. (It took some time to figure out how to reserve static addresses.)<br />
<br />
Now, I love Linux and my technology passion is learning pretty much anything OpenSource - BUT, even though I could do quite a bit with the cross platform kit for Azure under Linux - most of the work was easier in Powershell. No problem - because I really like Powershell - BUT, my 32 bit Windows 7 system didn't seem to want to finish the install and hung twice. I figured it was because it was 32 bit. Again, thanks to virtualization - No problem - I just loaded up 64 bit Windows 10. (I tried to like Windows 8 and 8.1 but eventually gave up. Skipping that one.) Windows 10 is a nice mix and seems more intuitive then its predecessor and ran the Azure Powershell environment which made cloning much easier.<br />
<br />
The cool thing is, I can still run my old Windows 7 for as long as it gets patches (and then I could just remove the network and keep it for nostalgia) BUT I also get to run Windows 10 and use the Azure Powershell features I need.<br />
<br />
Anyway, Linux and KVM gives you a lot of possibilities and it's free (your VMs, may not be). <br />
<br />
<br />RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-5859652537011511732015-11-17T14:40:00.002-06:002015-11-17T14:44:09.953-06:00Azure and Oracle Linux 6Typical of my luck - the VERY FIRST Azure VM I install is the Oracle Linux 6.4. Of course, the first thing I do after a new install is "yum upgrade". For the first time ever, I get a weird error and cannot complete this:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">...</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Running rpm_check_debug<br />ERROR with rpm_check_debug vs depsolve:<br />kernel-headers is needed by glibc-headers-2.12-1.166.el6_7.3.x86_64<br />kernel-headers >= 2.2.1 is needed by glibc-headers-2.12-1.166.el6_7.3.x86_64<br />kernel-uek is needed by oracle-rdbms-server-11gR2-preinstall-1.0-12.el6.x86_64<br />kernel-uek is needed by oracle-rdbms-server-12cR1-preinstall-1.0-14.el6.x86_64<br />** Found 4 pre-existing rpmdb problem(s), 'yum check' output follows:<br />glibc-headers-2.12-1.107.el6_4.4.x86_64 has missing requires of kernel-headers<br />glibc-headers-2.12-1.107.el6_4.4.x86_64 has missing requires of kernel-headers >= ('0', '2.2.1', None)<br />oracle-rdbms-server-11gR2-preinstall-1.0-7.el6.x86_64 has missing requires of kernel-uek<br />oracle-rdbms-server-12cR1-preinstall-1.0-8.el6.x86_64 has missing requires of kernel-uek<br />Your transaction was saved, rerun it with: yum load-transaction /tmp/yum_save_tx-2015-11-17-08-39DucKzd.yumtx</span><br />
...</blockquote>
<br />
<br />
Very strange. I have never needed to install kernel headers to complete this task before. So, I install kernel headers and still it insists on installing the UEK kernel - so I do. Now it allows me to fully patch the system.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">Installing : kernel-uek-firmware2.6.32-400.37.12.el6uek.noarch </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Installing : kernel-uek-2.6.32-400.37.12.el6uek.x86_64 <br />Installing : kernel-headers-2.6.32-573.8.1.el6.x86_64 </span><br />
<br />
I reboot and now my Azure appears to hang. There is nothing I can do - with no console to see what's going on or choose a different kernel or single user mode. I'm stuck. Of course, there is always the procedure of detaching the drive, adding it to a rescue VM, editing, chroot'ing, re-running grub - yeah, fun.<br />
<br />
<br />
<br />
I suspect it is trying unsuccessfully to boot the <i>Unbreakable</i> Linux Kernel (um, yeah, I've seen that <i>break</i> things before). So, I scrap this new install and start again. This time, taking it slow. I remove the item requiring UEK:<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">yum remove oracle-rdbms-server-11gR2-preinstall oracle-rdbms-server-12cR1-preinstall</span><br />
<br />
I do not need to run Oracle on this system (luckily - because this is really handy if you do) so now I can just install kernel-headers and re-run<span style="font-family: "courier new" , "courier" , monospace;"> yum upgrade</span>. I do this - then reboot and it works. (Strangely enough - I try Oracle Linux 7 and do not have this issue. I need to review and see why [updated post later].)<br />
<br />
Meanwhile, I run across this <a href="https://azure.microsoft.com/en-us/documentation/articles/virtual-machines-linux-create-upload-vhd-oracle/" target="_blank">blog post from last month</a> stating<i> "UEK2 is not supported on Hyper-V and Azure as it does not include the required drivers"</i>. yup - found that out the hard way.<br />
<br />
I also noticed my favorite volume manager LVM is not installed by default. I needed to add more disk space and would probably need to grow the data area in the future so I add a VG (volume group) for data and create a PV and LV (Physical and Logical Volume) for the data and logging areas. Seem to work ok. But the above blog post (from last month) says: <i>"it is recommended that you use standard partitions rather than LVM"</i>. It complains mainly of issues with LVM name conflicts with cloned VMs. I really think that was more of an issue with RHEL 5 (they named everything the same). Anyway, my LVM group is, so far, unique, so I'm not worried (but I'll have to remember this).<br />
<br />
That's all from me. The documentation above covers a lot of Oracle Linux 6 issues and work-around. Be sure to click on it.<br />
<br />
<br />
<br />
<br />RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-12894480263318363492015-04-13T15:29:00.001-05:002015-04-13T15:29:06.422-05:00Getting old browser history for new PCI just got a new PC. I have a pretty complicated setup. I run Linux and use KVM to run Windows 7 for Outlook and Powershell. I run a lot of VMs. And, whenever I get a new PC, I migrate the VMs from the old system to the new. Before I do, I'm in a transition period where I just use virt-manager to run the old VMs off the old system and display on my new desktop (cuts down on monitors & keyboards.<br />
<br />
So, I have my shiny new PC and I want to check on my BackupPC servers (I have 3 of them). I usually just click on them in my quick-launch but the browser history is missing. I decided to just look at the old history instead of launching the remote (old) version of FireFox for some reason. And, besides, I need to move that info anyway.<br />
<br />
My boss thinks my setup is nuts but he generously donated an extra 1TB drive for my VMs. I create a VG for this disk and start carving off space.<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"># lvcreate -L 165G -n lv_oldol6 vg_tank<br /># mkfs.ext4 /dev/mapper/vg_tank-lv_oldol6</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># mkdir /oldol6</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># vi /etc/fstab (add new file system)</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># mount /oldol6</span><br />
<br />
Now I have a place to store my data from my old system. So I mount the old system via SSH.<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"># yum install sshfs</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># mkdir /ssh</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># cd /ssh </span><br />
<span style="font-family: "Courier New",Courier,monospace;"># sshfs me@old.system.ip:/ /ssh/</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># tar -cf - . | (cd /oldol6/ && tar -xf - )</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># sync (old sysadmin good luck command)</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># updatdb</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># locate places.sqlite (I look for the one in the old place)</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># sqlite3 /oldol6/.mozilla/firefox/umw8efgh.default/places.sqlite</span><br />
<span style="font-family: "Courier New",Courier,monospace;">SQLite version 3.7.17 2013-05-20 00:56:22<br />Enter ".help" for instructions<br />Enter SQL statements terminated with a ";"</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sqlite> .mode column</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sqlite> .header on</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sqlite> .schema</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sqlite> select url FROM moz_places where title LIKE '%backuppc%';</span><br />
<br />
Ta-dahhh! That worked nicely. I find the URL I'm looking for. <br />
<br />
<br />
RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-91316688765207530292015-01-05T11:45:00.001-06:002015-01-05T11:45:32.199-06:00Booting Headless M3000 with XSCF and Wyse 55The nice thing about Sun/Oracle Solaris Sparc systems is THEY JUST RUN! It had been a while since I had rebooted the M3000 from a cold powered-off state. We had some weird power issues over the holidays and lost some equipment and crashed others (despite UPS protection and generator backups).<br />
<br />
The system was powered off - nothing but XSCF was on. I couldn't remember the XSCF password. I was trying root. As it turns out, you are forbidden from creating an account called "root" on XSCF (it is one of the many reserved words). I had to create a new user <a href="http://bikashkumar2.blogspot.com/2013/03/step-by-step-configuration-of-xscf.html" target="_blank">using the following procedure</a> (thank you, Bikash!):<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> login: default</span><br />
<span style="font-family: "Courier New",Courier,monospace;">Change the panel mode switch to Locked and press return…<br />
Leave it in that position for at least 5 seconds. Change the panel mode switch to Service, and press return…</span><br />
<br />
I did as directed...<br />
<br />
Create a user andrew<br />
<br />
<blockquote>
<span style="font-family: "Courier New",Courier,monospace;">XSCF> adduser andrew</span></blockquote>
Change the password for andrew<br />
<br />
<blockquote>
<span style="font-family: "Courier New",Courier,monospace;">XSCF> password andrew<br />
New XSCF password:<br />
Retype new XSCF password:</span></blockquote>
Grant andrew the following privileges, useradm, platadm, aplatop.<br />
<br />
<blockquote>
<span style="font-family: "Courier New",Courier,monospace;">
XSCF> setprivileges andrew useradm platadm platop</span></blockquote>
After that, I was able to log in as my new user and view the errors. There were none.<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">XSCF> showlogs error </span><br />
<br />
Other options here: showlogs event, showlogs power, showlogs monitor, showlogs console and fmdump.<br />
<br />
What I needed to do was boot. Again, I struggled to remember the procedure for getting to the boot prompt. I tried the T2 commands to start a console - no luck. I tried simply console which got me close. I needed a domain_id that I did not know. Then I vaguely remembered something and tried this:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"> XSCF> console -d 0</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<br />
I answered Y to "Do you really want to start console" and then it did nothing. You need an extra ENTER here before the boot prompt showed up. Then I typed "boot" and was finished.<br />
<br />
It all seems so straight-forward and mnemonic now. I don't know what my problem was this morning. :-)RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-52075433432442166042014-12-18T15:51:00.002-06:002014-12-18T16:05:57.297-06:00EVEN MORE Fun with Server Core 2012 R2And finally, to finish off my Windows Server Core 2012 R2, I install Cygwin! Advice from the web says preemptively open port 22 for OpenSSHd.<br />
<span style="font-size: x-small;"><br /></span>
<br />
<blockquote class="tr_bq">
<div class="line" id="file-wincore-cygwin-LC2">
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">netsh advfirewall firewall add rule name="SSHd" dir=in action=allow protocol=TCP localport=22
</span></span></div>
</blockquote>
<br />
Now, download the Cygwin installer: <br />
<br />
<blockquote class="tr_bq">
<div class="line" id="file-wincore-cygwin-LC4">
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$client = new-object System.Net.WebClient
</span></span></div>
<div class="line" id="file-wincore-cygwin-LC5">
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">$client.DownloadFile( "http://www.cygwin.com/setup-x86_64.exe",</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">"c:\windows\temp\setup-x86_64.exe" )</span></span></div>
</blockquote>
<br />
Now, run the installer: <br />
<br />
<blockquote class="tr_bq">
<div class="line" id="file-wincore-cygwin-LC5">
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">c:\windows\temp\setup-x86_64.exe </span></span></div>
</blockquote>
<br />
<br />
Don't forget to configure OpenSShd (in Cygwin Bash):<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">$ ssh-host-config -y</span><br />
<span style="font-family: "Courier New",Courier,monospace;">$ cygrunsrv -S sshd</span><br />
<span style="font-family: "Courier New",Courier,monospace;">$ ssh-keygen -t rsa</span></blockquote>
<br />
Assuming you added lots of nice Cygwin utilities, you now have a very useful server. ;-) <br />
<br />
<br />
<pre class="line-pre"><div class="line" id="file-wincore-cygwin-LC5">
<pre class="line-pre"><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span></pre>
</div>
</pre>
RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-74152407360377609482014-12-18T14:56:00.001-06:002014-12-18T15:00:33.938-06:00More Fun with Windows Server Core 2012 R2<h2>
SCONFIG Follow-Up</h2>
In my earlier post on <a href="http://myratnest.blogspot.com/2014/06/fun-with-windows-server-core-2012-r2.html">using SCONFIG</a>, I mentioned needing to be able to do a few other things from the command line before I could stay immersed in Windows Server Core 2012 R2. Namely, adding disks and formatting them. I recently covered that <a href="http://myratnest.blogspot.com/2014/12/iscsi-with-powershell-and-hyper-v-on.html">here</a> and <a href="http://myratnest.blogspot.com/2014/12/hard-disks-with-powershell.html">here</a>. There's a couple of other things: Firewall Rules (viewing and setting), mapping network drives (turns out the old <span style="font-family: "Courier New",Courier,monospace;">"net use"</span> is by far the easiest way for that) and turning off IPv6.<br />
<br />
Firewall rules definitely rates its own post. Mapping drives is trivial as long as they allow you to use the old <span style="font-family: "Courier New",Courier,monospace;">"net use"</span>command. Slightly less trivial with Powershell. Honestly, I would only use the PS way if i was programming something (or it MS took away <span style="font-family: "Courier New",Courier,monospace;">"net use"</span>command in a future release). So that leaves IPv6 for this post. Here's how to disable that: First you have to find the name (alias) of your Ethernet card. After that, you can display it's settings.<br />
<br />
<div class="container">
<div class="line number1 index0 alt2">
<code class="powershell functions"></code><code class="powershell plain"></code></div>
<blockquote class="tr_bq">
<div class="line number1 index0 alt2">
</div>
<div class="line number1 index0 alt2">
<span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="powershell plain">PS C:\Windows\system32> Get-NetAdapter<br /><br />Name InterfaceDescription ifIndex Status MacAddress LinkSpeed<br />---- -------------------- ------- ------ ---------- ---------<br />Ethernet 5 Citrix PV Network Adapter #2 20 Up BE-EF-B0-1D-FA-CE 1 Gbps<br />Ethernet 8 Citrix PV Network Adapter #0 23 Up FE-ED-BA-5E-BA-11 1 Gbps<br /><br /><br />PS C:\Windows\system32> Get-NetAdapterBinding -InterfaceAlias "Ethernet 8" | Select-Object Name,DisplayName,ComponentID<br /><br />Name DisplayName ComponentID<br />---- ----------- -----------<br />Ethernet 8 Link-Layer Topology Discovery Responder ms_rspndr<br />Ethernet 8 Link-Layer Topology Discovery Mapper... ms_lltdio<br />Ethernet 8 Microsoft Network Adapter Multiplexo... ms_implat<br />Ethernet 8 Client for Microsoft Networks ms_msclient<br />Ethernet 8 QoS Packet Scheduler ms_pacer<br />Ethernet 8 File and Printer Sharing for Microso... ms_server<br />Ethernet 8 Internet Protocol Version 6 (TCP/IPv6) ms_tcpip6<br />Ethernet 8 Internet Protocol Version 4 (TCP/IPv4) ms_tcpip </code></span></span></div>
</blockquote>
<div class="line number1 index0 alt2">
</div>
<div class="line number1 index0 alt2">
<b><span style="font-size: small;"><span style="font-family: inherit;"><code class="powershell plain">Now, just disable IPv6...</code></span></span></b></div>
<div class="line number1 index0 alt2">
<span style="font-family: inherit;"><span style="font-size: large;"><code class="powershell plain"></code></span></span></div>
<div class="line number1 index0 alt2">
<br />
<blockquote class="tr_bq">
<span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="powershell plain">PS C:\Windows\system32> Disable-NetAdapterBinding -InterfaceAlias "Ethernet 8" -ComponentID ms_tcpip6</code></span></span></blockquote>
</div>
<div class="line number1 index0 alt2">
</div>
<div class="line number1 index0 alt2">
<span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;"><code class="powershell plain"><span style="font-size: large;"><span style="font-family: inherit;">And - TA-DAHH! That's it.</span></span></code></span></span></div>
<div class="line number1 index0 alt2">
</div>
<div class="line number1 index0 alt2">
</div>
</div>
RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-50119688446405361892014-12-18T14:20:00.001-06:002014-12-18T14:20:10.682-06:00iSCSI with Powershell and Hyper-V on Windows Core 2012 R2I found a <a href="http://blogs.technet.com/b/keithmayer/archive/2013/03/12/speaking-iscsi-with-windows-server-2012-and-hyper-v.aspx#.UT9DtFIo46Q">great link for working with iSCSI drives</a> from Powershell. The first thing you have to do is turn on iSCSI:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> Set-Service -Name MSiSCSI -StartupType Automatic
<br />PS C:\Windows\system32> Start-Service MsiSCSI</span></blockquote>
<br />
Next, tell Windows Server Core where your SAN resides:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> New-IscsiTargetPortal -TargetPortalAddress 192.168.12.34
</span><br /><span style="font-family: "Courier New",Courier,monospace;">0
</span><br /><span style="font-family: "Courier New",Courier,monospace;"> </span><br /><span style="font-family: "Courier New",Courier,monospace;"> </span><br /><span style="font-family: "Courier New",Courier,monospace;">InitiatorInstanceName :
</span><br /><span style="font-family: "Courier New",Courier,monospace;">InitiatorPortalAddress :
</span><br /><span style="font-family: "Courier New",Courier,monospace;">IsDataDigest : False
</span><br /><span style="font-family: "Courier New",Courier,monospace;">IsHeaderDigest : False
</span><br /><span style="font-family: "Courier New",Courier,monospace;">TargetPortalAddress : 192.168.12.34</span><br /><span style="font-family: "Courier New",Courier,monospace;">TargetPortalPortNumber : 3260
</span><br /><span style="font-family: "Courier New",Courier,monospace;">PSComputerName :
</span></blockquote>
<br />
I would have thought at this point it would know the iSCSI share but it did not. Had to run this command:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> $target = Get-IscsiTarget
</span><br /><span style="color: red;"><span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> print $target.NodeAddress
</span><br /><span style="font-family: "Courier New",Courier,monospace;">Can't find file iqn.2003-06.com.equallogic:0-bf1bf6-56acce3eb-fd0030124795492f-test</span><span style="font-family: "Courier New",Courier,monospace;">vol1
</span></span><br /><span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> Connect-IscsiTarget -NodeAddress $target.NodeAddress
</span></blockquote>
<br />
You just need the above TWO commands in black. I ran the line in red to see what it was looking at (making certain of the IQN before proceeding). The <span style="font-family: "Courier New",Courier,monospace;">Connect-IscsiTarget</span> command responds with this:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">AuthenticationType : NONE
<br />InitiatorInstanceName : ROOT\ISCSIPRT\0000_0
<br />InitiatorNodeAddress : iqn.1991-05.com.microsoft:testsrv.example.com
<br />InitiatorPortalAddress : 0.0.0.0
<br />InitiatorSideIdentifier : 412341375678<br />IsConnected : True
<br />IsDataDigest : False
<br />IsDiscovered : True
<br />IsHeaderDigest : False
<br />IsPersistent : False
<br />NumberOfConnections : 1
<br />SessionIdentifier : ffffe000cd87c020-4012313700056702
<br />TargetNodeAddress : iqn.2003-06.com.equallogic:0-bf1bf6-56acce3eb-fd00301...-testvol1 TargetSideIdentifier : 4f00
<br />PSComputerName :</span></blockquote>
<br />
Testing the iSCSI session...<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> Get-IscsiConnection
<br /><br /><br />ConnectionIdentifier : feffe060cd87c029-1
<br />InitiatorAddress : 0.0.0.0
<br />InitiatorPortNumber : 15552
<br />TargetAddress : 192.168.12.34<br />TargetPortNumber : 3260
<br />PSComputerName :</span></blockquote>
<br />
Looks good so you permanently register it (you don't want your iSCSI volumes disappearing after a reboot after all this). <br />
<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> Get-IscsiSession | Register-IscsiSession</span></blockquote>
<br />
Now, check to see if you have a iSCSI session:<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> get-IscsiSession
<br /><br /><br />AuthenticationType : NONE
<br />InitiatorInstanceName : ROOT\ISCSIPRT\0000_0
<br />InitiatorNodeAddress : iqn.1991-05.com.microsoft:testsrv.example.com
<br />InitiatorPortalAddress : 0.0.0.0
<br />InitiatorSideIdentifier : 400301370020
<br />IsConnected : True
<br />IsDataDigest : False
<br />IsDiscovered : True
<br />IsHeaderDigest : False
<br />IsPersistent : True
<br />NumberOfConnections : 1
<br />SessionIdentifier : bfbfe030cd87c020-400201370020d002
<br />TargetNodeAddress : iqn.2001-05.com.equallogic:0-af1bf6-66acce3eb-fd02300
<br /> 24795492f-testvol1
<br />TargetSideIdentifier : 4f00
<br />PSComputerName :</span></blockquote>
<br />
Looking good. Now check your drives again:<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> get-disk
<br /><br />Number Friendly Name Operationa Total Size Partition
<br /> lStatus Style
<br />------ ------------- ---------- ---------- ---------
<br />0 XENSRC PVDISK SCSI Disk Device Online 88 GB MBR
<br />1 XENSRC PVDISK SCSI Disk Device Online 40 GB MBR
<br />2 EQLOGIC 100E-00 SCSI Disk Device Online 77.01 GB RAW</span></span></blockquote>
<br />
You can see the Dell Equalogic SAN volume has been added as disk number 2.<br />
Now you just need to format the disk and give it a drive letter:<br />
<br />
<blockquote class="tr_bq">
<span style="font-size: xx-small;"><span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> Get-Disk | Where partitionstyle -eq 'raw' | Initialize-D
<br />isk -PartitionStyle MBR -PassThru | New-Partition -AssignDriveLetter -UseMaximum
<br />Size | Format-Volume -FileSystem NTFS -NewFileSystemLabel "iDisk3" -Confirm:$fal
<br />se
<br /><br />DriveLetter FileSystemL FileSystem DriveType HealthStat SizeRemain Size
<br /> abel us ing
<br />----------- ----------- ---------- --------- ---------- ---------- ----
<br />F iDisk3 NTFS Fixed Healthy 76.91 GB 77 GB</span></span></blockquote>
<br />
Remember: <span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><b>Get-Disk | Where partitionstyle -eq 'raw'</b><span style="font-family: inherit;"> is CRUCIAL if you do not want to initialize a disk with data on it already.</span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;">That's it. You've added an iSCSI drive from the command line. </span></span></span><br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"> </span></span></span>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-18895366665602719112014-12-17T16:26:00.001-06:002014-12-18T10:44:10.767-06:00Hard Disks with PowerShellThe other day, I needed to extend a Hyper-V iSCSI disk store (after increasing the size on the SAN). I didn't know how. One of our consultants used <span style="font-family: "Courier New",Courier,monospace;">DISKPART</span> - oh yeah - forgot that from NT 3.51 (or perhaps earlier). I was using PowerShell's <span style="font-family: "Courier New",Courier,monospace;">Get-Disk</span> but wasn't able to go much further. So I mocked up a VM to play with. I added a drive and formatted it (after looking at the <a href="http://blogs.technet.com/b/heyscriptingguy/archive/2013/05/29/use-powershell-to-initialize-raw-disks-and-partition-and-format-volumes.aspx">Hey, Scripting Guy!</a> blog).<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"> PS C:\Windows\system32> Get-Disk | </span><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: "Courier New",Courier,monospace;">Where partitionstyle -eq 'raw' | </span>Initialize-Disk -PartitionStyle MBR -PassThru |New-Partition -AssignDriveLetter -UseMaximumSize |Format-Volume -FileSystem NTFS -NewFileSystemLabel "disk2" -Confirm:$false</span></blockquote>
<br />
You can run most of the commandlets between the pipes as individual commands (not sure that makes it any easier).<br />
<br />
Anyway, once I had my test drive, it was time to expand it. I halted the system and then made the changes in Citrix XenCenter. After restarting, I checked to see that the drive was now 40GB instead of 25GB. HOWEVER, this is misleading. Although the DRIVE is now 40GB, the partition being used is still only 25GB.<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">PS C:\Windows\system32> Get-Partition -DiskNumber 1</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">Disk Number: 1</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">PartitionNumber DriveLetter Offset Size Type</span><br />
<span style="font-family: "Courier New",Courier,monospace;">--------------- ----------- --------- ---- ----</span><br />
<span style="font-family: "Courier New",Courier,monospace;">1 E 1048576 25 GB IFS</span></blockquote>
<br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<span style="font-family: inherit;">To expand the disk, I had hoped there was a simple "MaxSize" but instead I <a href="http://technet.microsoft.com/en-us/library/hh848680.aspx">found this</a>:</span><br />
<span style="font-family: Arial, Helvetica, sans-serif;"></span><br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">PS C:\<span style="color: grey;">></span> <span style="color: black;">$size</span> <span style="color: grey;">=</span> (Get<span style="color: grey;">-</span>PartitionSupportedSize –DiskNumber 1 –PartitionNumber 1)</span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;">PS C:\<span style="color: grey;">></span> Resize<span style="color: grey;">-</span>Partition <span style="color: grey;">-</span>DiskNumber 1 –PartitionNumber 1 <span style="color: grey;">-</span>Size <span style="color: black;">$size</span>.SizeMax</span></span></blockquote>
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"><b>Ta-dahh!</b> Sadly, <span style="font-family: "Courier New",Courier,monospace;">DISKPART</span> is easier. But, for the PowerShell purists, running Windows Core 2012 R2, this does the trick.</span></span></span><br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"></span></span><br />
<pre><span style="font-family: inherit;"></span></pre>
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span></pre>
<pre><span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;"> </span></span></pre>
RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-3729052585284386412014-09-12T16:52:00.001-05:002014-09-16T08:53:12.455-05:00When your VM gets stuck in suspended mode in Red Hat KVM...I needed to re-do my network interfaces in KVM - make more bridged Ethernet connection for the VMs to use. I totally forgot that I had a guest VM running as I began my reboot. "Suspending SSB2" it says as I panic suddenly realizing what I had done. It's ok - I've done this before I quickly remember. It does a great job of automatically suspending and resuming UNLESS YOU JUST HAPPEN TO CHOSE THAT REBOOT TO SCREW UP THE NETWORK CONFIGURATION.<br />
<br />
So, it reboots and networking is goofed. I quickly see what I did, fix and reboot again. This time it's ok but the SSB2 VM does not start. I try to start it manually and get the message:<br />
<blockquote class="tr_bq">
<span style="font-size: x-small;"></span><br />
<span style="font-size: x-small;">libvirtError: error creating macvtap type of interface: Device or resource busy</span></blockquote>
<br />
Whatever that means. (It actually means I tried to un-suspend but couldn't talk to the iSCSI network so we're leaving it in limbo). I google and google and find a lot of folks in the same boat. They came up with some very iffy and convoluted solutions involving editing multiple XML files, etc. I follow the threads to the bottom of each. None of them seem quite right.<br />
<br />
New to KVM, I try clonging the non-startable SSB2 and succeed. It boots and works (requires a lot of network changes, but oh well).<br />
<br />
Still not satisfied I see mention of "/var/lib/libvirt/qemu/save/rhel.save" (it's ssb2.save in my case). Again some very complicated procedures involving editing multiple XML files, etc. with no guaranteed results by the author.<br />
<br />
Since I have a working clone, I figure "What the heck! I'll just delete "/var/lib/libvirt/qemu/save/ssb2.save" and try starting. It worked! -Except for one snag - I already had an exact doppleganger running. It locked up my virt-manager and the server hard. After, rebooting all was well.<br />
<br />
This worked for me. On a TEST system. Use at your own risk.RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-2171874484246560132014-06-05T13:19:00.000-05:002014-06-05T13:21:46.293-05:00Fun with Windows Server Core 2012 R2As a Unix/Linux admin, I find administering Windows servers boring and tedious. Until now. With Server Core 2012, you get Powershell pre-installed. Some of the windowish apps, still launch little windows (e.g. Xen Tools) but for the most part, I find I can deploy servers much more quickly simply by using SCONFIG. To me, this is much quicker than hovering a mouse all over trying to find where they've hidden the thing you need now (seems to change in every version).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://3.bp.blogspot.com/-Ry4_bwY2-vk/U5C1KQOVY8I/AAAAAAAAFLc/ZJ_UPoEk21k/s1600/Win2012CoreSconfig.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-Ry4_bwY2-vk/U5C1KQOVY8I/AAAAAAAAFLc/ZJ_UPoEk21k/s1600/Win2012CoreSconfig.png" height="268" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
This isn't Windows Server Core, but you get the idea. The menus are pretty self explanatory. I find configuring a system with this much quicker! All I needed was a command line disk utility (which has been around a long time I know). Brushing up on the commands, I was able to quickly deploy a new disk. I will post the command line version of iSCSI when that comes up (soon, I'm sure).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-y0ydXpIPaCA/U5CzVTIzdTI/AAAAAAAAFLU/qqetHExRdiQ/s1600/Win2012CorePSDiskPart.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-y0ydXpIPaCA/U5CzVTIzdTI/AAAAAAAAFLU/qqetHExRdiQ/s1600/Win2012CorePSDiskPart.png" height="268" width="320" /></a></div>
Again, all pretty straight forward. This looks a little more complicated than the GUI but I'll bet if I raced someone, they would not be able to find the utility, right click, etc. etc. as quickly.<br />
<br />
Although this isn't showing it off much, I am really loving the power of Powershell. I like how all of my Unix commands like ls and cat are already aliased (I used to have to make a ls.bat and cat.bat, etc.). With Windows Server Core 2012 R2's command line utilities, and powerful shell, I might actually start to enjoy this OS again. It's becoming more Unix-like everyday - and that's a good thing (for me anyway).<br />
<br />
<br />RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com8tag:blogger.com,1999:blog-2267284187143627970.post-16990007088177467652014-05-16T11:04:00.001-05:002014-05-16T11:04:08.630-05:00Netbackup PortsNote to self: After installing the Netbackup client, don't forget to open ports 1556 and 13724 in the firewall.RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-10636537746955724292014-05-16T09:55:00.002-05:002014-05-16T09:55:25.073-05:00Simple ThingsHaving a Red Hat 6 install with no GUI, and little else, made installing Netbackup clients from CDROM rather problematic. No definition for the CDROM drive was in /etc/fstab so "mount /dev/cdrom" wasn't going to work. Running "fdisk -l" did not show a CDROM and scanning and grepping dmesg revealed no clues. Then I found this command:<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"># wodim --devices</span><br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"><span style="font-family: inherit;">That worked (after running "yum install wodim"</span>). Handy command!</span>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-38989930448232519892014-04-10T16:53:00.001-05:002014-04-10T17:01:15.932-05:00SELinux and CentOS 6 with Special Guest: BackupPC<span style="font-family: inherit;">I was trying to tighten things back up on the BackupPC after getting it running. SELinux is a pain - but I like to have it running on all systems. I had two BackupPC installs - one on a CentOS 5 server and one a CentOS 6 server. You would think the latter would be the easiest - but not so! </span><br />
<br />
<span style="font-family: inherit;">For the most part, I just used this blog article <a href="http://advisorbits.com/2011/03/backuppc_on_centos_5_selinux_fix/">BackupPC on CentOS 5 (selinux fix)</a> but I had a few issues between the two servers so I'm documenting that. </span><br />
<br />
<h3>
<span style="font-family: inherit;">CentOS5 </span></h3>
<span style="font-family: inherit;">CentOS 5 didn't have the</span> <span style="font-family: "Courier New",Courier,monospace;">semodule</span> command. So...<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"># yum install selinux*</span><br />
<br />
And then create a source policy module...<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"># grep httpd /var/log/audit/audit.log | audit2allow -m backuppc > backuppc.te</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;">And then </span></span> build the policy module...<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"># grep httpd /var/log/audit/audit.log | audit2allow -M backuppc</span><br />
<br />
<span style="font-family: inherit;">And finally, install the module...</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"># semodule -i backuppc.pp</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;">After that, I turned on SELinux=enforcing at the command line and edited the <span style="font-family: "Courier New",Courier,monospace;">/etc/selinux/conf</span> to default to enforcing.</span> </span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<span style="font-family: "Courier New",Courier,monospace;"># setenforce 1</span><br />
<span style="font-family: "Courier New",Courier,monospace;"># sestatus </span><br />
<span style="font-family: "Courier New",Courier,monospace;">SELinux status: enabled<br />SELinuxfs mount: /selinux<br />Current mode: enforcing<br />Mode from config file: enforcing<br />Policy version: 21<br />Policy from config file: targeted</span><br />
<span style="font-family: "Courier New",Courier,monospace;"><br /></span>
<br />
<h3>
<span style="font-family: inherit;">CentOS 6</span></h3>
<span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-weight: normal;">CentOS 6 also needed to have all of the SELinux tools installed (I think). However, when I tried the exact same things as above, the semodule command gave an error:</span></span></span><br />
<br />
<span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-weight: normal;"> <span style="font-family: "Courier New",Courier,monospace;">Tried to link in a non-MLS module with an MLS base</span></span></span><span style="font-family: "Courier New",Courier,monospace;"> </span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;">After some searching I found that I needed to run </span>system-config-selinux <span style="font-family: inherit;">which is a GUI (no system-config-selinux-tui I could find).</span></span><br />
<br />
<div class="composeBoxWrapper GCUXF0KCPJB">
</div>
<span style="font-family: "Courier New",Courier,monospace;"># </span><span style="font-family: "Courier New",Courier,monospace;">system-config-selinux</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-XB-1vzVTK88/U0cSIxyUuDI/AAAAAAAAFCA/0RPtY6RvYgM/s1600/Screenshot-SELinux+Administration.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-XB-1vzVTK88/U0cSIxyUuDI/AAAAAAAAFCA/0RPtY6RvYgM/s1600/Screenshot-SELinux+Administration.png" height="200" width="320" /></a></div>
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;">Here, I was expecting to see MLS instead of targeted. Not sure why, but it was already toggled to the correct setting. (So why does it think it's MLS?) So, I checked the box to "Relabel on next reboot" and rebooted. I was a little afraid of this because it said it could take a long time if you had a large filesystem and this had already used about 23% of 3TB. It was probably done well under 20 minutes (by the time I tried it again) and it worked!</span></span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: inherit;"> </span> </span><br />
<br />
<br />
<div class="composeBoxWrapper GCUXF0KCPJB">
</div>
RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com1tag:blogger.com,1999:blog-2267284187143627970.post-83344242217326273282014-02-11T14:19:00.004-06:002014-02-11T14:19:53.961-06:00iSCSI LVM Red Hat/CEntOS/Oracle LinuxToday I learned a couple of important things about LVMs on iSCSI.
First, a silly one - pvcreate against a slice (or partition - sorry, my
Sun Solaris is showing) - NOT against a disk. That is, /dev/sda1 NOT
/dev/sda. I coulda swore you could use the disk and LVM would take care of the details. Again, probably thinking of ZFS and Sun Solaris.<br />
<br />
The other really important things is you MUST use _netdev in place of defaults in the /etc/fstab. For example:<br />
<br />
<span style="font-family: "Courier New", Courier, monospace;"> /dev/mapper/vg_oracle-lv_u01 /u01 ext4 _netdev 0 0</span><br />
<br />
<span style="font-family: inherit;">This is a serious gotcha! If you don't do this, the device disappears from /dev/mapper. Pretty unnerving! </span><br />
<br />
<span style="font-family: inherit;">The other cool thing I picked up was, if you lose the /dev/mapper device, you can get it back (assuming you tinkered with iscsi restarts a bit) simply by issuing the command "vgchange -ay". That was a neat trick and prompted this blog post.</span><br />
<br />
<span style="font-family: inherit;">That is all. </span>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com2tag:blogger.com,1999:blog-2267284187143627970.post-86529452789745336642013-04-26T17:00:00.000-05:002013-04-26T17:00:25.707-05:00Slackware 14 under XenI have tried (halfway) to get Slackware to run under Xen (which I run on 32 bit CentOS 5.x). It never seems to have a working network. This time, I took a (very) little amount of time to fix this. Googling resulting only in running Xen on Slackware. I couldn't find anything on this problem. I love to load each new distro that comes out but I really enjoy just using Slackware (SLS was my first distro). So, when Slackware would repeatedly come up without a network interface, I was disappointed and a bit surprised. If you're having this issue - here one possible fix: Use a virtual Ethernet and do NOT use the default hypervisor network interface. Instead, use "ne2k_pci". I intend to try to get the shared physical interface to work with a real outside address and even test the other options under the virtual Ethernet. But, this solved my problem. If anyone else tries these, I'd love the hear the results.RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com3tag:blogger.com,1999:blog-2267284187143627970.post-2396822208572500942011-12-04T18:02:00.003-06:002011-12-04T19:18:11.975-06:00Powershell, pretty cool afterall<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;">I am really enjoying <a href="http://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx">Powershell</a>. The ISE is much more useful than I thought and flipping from the shell to notepad is really slick (although I still had to install <a href="http://www.vim.org/download.php#pc">gVim</a>). The cmdlets are slicker than I originally gave them credit for. The default is to list all of the parameters/attributes of the cmdlet I've been experimenting and you can almost always leave them off when there's just one or two parameters. e.g. </span></div><br />
<div style="font-family: "Courier New",Courier,monospace;"><span class="highlight">PS > Get-History | Foreach-Object { $_.CommandLine } > c:\temp\</span></div><div style="font-family: "Courier New",Courier,monospace;"><span class="highlight">script.ps1</span></div><form action="/user_annotation_relation/delete_highlight" class="deleteHighlightForm" method="post" style="font-family: "Courier New",Courier,monospace;"><span class="deleteHighlight"></span></form><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO"><span class="noteContent" style="font-family: "Courier New",Courier,monospace;"><span style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; font-size: small;">For the exact same results - try the much easier to remember...</span> </span></div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO"><br />
</div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO"><span class="noteContent" style="font-family: "Courier New",Courier,monospace;">PS > get-history > history.txt </span></div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO"><span class="noteContent" style="font-family: "Courier New",Courier,monospace;">The above works just like you would expect.</span></div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO"><br />
</div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO" style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;">I found quite </span><span style="font-size: small;"><span class="noteContent">a few other examples that were obviously simplified. It's a pretty interesting scripting language. By adding the .Net accessibility, it is as if you have blended Bash and Ruby and some special Windows references thrown in to boot. I like it. It looks to be <a href="http://blogs.technet.com/b/heyscriptingguy/">very powerful and handy</a>. One of the main reasons I didn't like administering Windows is the lack of good sysadmin scripting tools and a poor command line shell. Powershell fixes that. Much is familiar too since it uses many Bash commands.</span></span></div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO" style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;"><span class="noteContent"><br />
</span></span></div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO" style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;"><span class="noteContent">So, I've spent the day patching and armoring my Windows 7 running under OpenBox. I really like Windows 7 (which is probably why they are coming out with a Windows 8 so soon.) </span></span></div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO" style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><br />
</div><div class="editNote " id="editNotea11O2E0WXOIK92_a1JIKZS7NPH9RO" style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;"><span style="font-size: small;"><span class="noteContent">With the vastly improved Windows 7, Windows 2008 R2 and Powershell - all in 64 bit - looks like it's going to be a less painful transition that I had thought. I'm actually really looking forward to it now.</span></span><br />
<span style="font-size: small;"><span class="noteContent"> </span></span> </div>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0tag:blogger.com,1999:blog-2267284187143627970.post-54651620329719225962011-08-27T21:04:00.002-05:002011-09-21T13:54:53.191-05:00Honey Harvest<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-lunYfeD_dTE/Tlmeo2UGjfI/AAAAAAAAB_k/dknWsTwcV6A/s1600/honeycrop2011.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="150" src="http://3.bp.blogspot.com/-lunYfeD_dTE/Tlmeo2UGjfI/AAAAAAAAB_k/dknWsTwcV6A/s200/honeycrop2011.jpg" width="200" /></a></div>Finally had time to harvest honey. A bit disappointing. Milano never did completely fill all 8 medium frames. I took only 4 fully capped (front and back) frames from that colony. The 5th was only fully capped on one side. I decided not to spin it. I thought once that Milano's activity had drastically dropped off. I wonder if I lost some productivity to a swarm?<br />
<br />
I had added a 2nd hive body to Venice - a deep. I took one beautiful full frame of capped honey from Venice. I was going to take a second but they have a begun putting brood in the two next closest full frames. I was surprised how heavy a deep frame full of honey was. I was also pleasantly surprised that my little extractor DID accommodate a deep frame - although two would've been nice for the balance.<br />
<br />
No more mason jars! They are too messy. I bought these 3lbs jugs. This years harvest - 16 lbs. It tastes EXACTLY like previous years (unique and completely different from store bought). We have Persimmon trees, scores of acres of Tulip Populars, a nearby peach orchard, tons of blackberries and, thanks to the dairy down the road, 40 acres of alfalfa (which they tell me they cut 5 times right after it blooms). It seems thicker than previous years too. Good stuff! Should last a while and I'm pretty sure I left them plenty.<br />
<br />
I didn't take any from my new split: Sicily. That colony has completely packed a medium 10 frame. I have been meaning to add another hive body - now I wonder if that would be a good idea. I really hope they'll winter. I am considering adding a lower medium and feeding them all really well before winter. I'd be bummed if my first split didn't over-winter. It's come a long way and overcome my mistakes.<iframe align="left" frameborder="0" marginheight="0" marginwidth="0" scrolling="no" src="http://rcm.amazon.com/e/cm?t=robertspage-20&o=1&p=8&l=bpl&asins=B004WKILQ4&fc1=000000&IS2=1&lt1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr" style="height: 245px; padding-right: 10px; padding-top: 5px; width: 131px;"></iframe>RAThttp://www.blogger.com/profile/10116429541709326996noreply@blogger.com0