Saturday, October 29, 2016

Q and A Tangents 1 - Articles I'm reading answering questions i'm questioning

Q and A Tangents 1

I believe You should always be learning.  So I read alot of technical articles to answer questions which usually inspire other questions about the stuff I'm working on.  I thought I might write blog posts about questions I've thought up that I get answered from other's posts about what I'm working on.  Unfortunately this will probably lead to more questions so I'll come back to those topics later on. Hopefully this inspires some conversation in the comments section. Maybe if someone sees my unanswered questions they'll answer in a comment or disagree with an answer I have. I may link a post in the question that inspired the question as well.

This is to mimic the hardware review sites I read that kind of aggregate other peoples reviews at the end of their daily posts.  Need to figure out how they do that.  TODO

Q: Can a dell r515 use an amd Opteron 43xx processor? Half the support files only mention 4300.  All mention 4200 and 4100.  Is this a function of being a release II (2) version?

Friday, October 28, 2016

Creating a virtual machine (vm) on ESXi 5.5 for Windows Server 2012 (Part 1)

Creating a virtual machine (vm) on ESXi 5.5 for Windows Server 2012 (Part 1)

To make a new vm, you first need to left click on the Host we want to add a virtual machine to.  For us since we only have 1 host that's easy and 192.168.1.102 down below.  When you're managing many machines you'll have to select where you want the virtual machine to be stored.

Clicking the host changes the Inventory drop down to allow Host to be selected.  We can then Select New Virtual machine.  You can click anything that's Highlighted and has a red arrow. You can also right click on the host itself to bring up a duplicate window being shown.

TL;DR control+n for new vm


Thursday, October 27, 2016

Adding a Gadget for a Twitter feed to Blogger by creating a Twitter Widget.

Adding a Gadget for a Twitter feed to Blogger by creating a Twitter Widget that works with HTTPs.

So I really wanted to add a a list of of the posts in #sqlhelp into this website. SQLhelp twitter feed will server 2 purposes:
1. It's a great resource when you have questions and you can stay update only checking it a few times a day.
2. It has one of the lowest overheads to submitting a question. StackExchange is fantastic for depth, but 140 characters makes you focus down your question down.

However, this procedure ended up being a little user unfriendly after an update to twitter's widget system. This post walks you through getting a twitter feed for almost anything into your blogger post that works with https.  So lets get started.


Wednesday, October 26, 2016

Choosing a version of Windows Server 2012 for my virtual machine on ESXi 5.5

Choosing a version of Windows Server 2012 for my virtual machine on ESXi 5.5

This started out as provisioning a vm until I saw all the different versions of Windows Server 2012 and ended up writing enough to make this it's own post so here it is.

 So I have 1 vm of window 10 running, and I figured I'd do a write-up of making my next vm. Windows Server 2012 R2 evaluation which can be downloaded here.  Upon going here you get a ton of options and realize that there are more than just Windows Server Standard and Enterprise edition.  There are now in 2012:
The Windows_Server_2012_R2_Licensing_Datasheet.pdf can be found at this location to give you a more robust idea of the differences between the editions.  Microsoft's quick take on this is the following.

Where to install a hypervisor; USB or HD Raid Array?

When ESXi was first installed I had the choice of where to install it.  On a usb drive or on the harddrive.  I installed the host OS onto my main hard drive raid array, This I've heard might not be best, however I am pretty new to system administration side.  Hopefully below helps explain why this is bad.  What would have been better was to do 1 of 2 things. 
  1. Install ESXi onto a different usb flash drive. One installed into a port usually directly on the motherboard inside the case This port is usually provided by server motherboard manufacturers specifically for this purpose.  ESXi once loaded by the server will run in RAM and won't access the flash drive unless rebooting the entire host after changing host settings.
  2. Install ESXi directly onto the portable flash media you put the iso install file onto.  This is a nifty trick that allows you to basically load an OS onto the same drive you had the install files.  The install files themselves were only around 360 mb, And the lowest usb flash I ever find nowadays is 2 gig at minimum.  So this is more than possible.  However, I'm a newbie and am expecting to need to reinstall ESXi a few times just for learning purposes.  I also only picked up 1 usb drive so I needed to install this onto something else.
Now, why not just install directly onto the raid array.  Why not have it redundant with my raid 1+0 setup, faster access with my hard disks etc.  Warning: This answer is going to be based off things I've read, and not what I've experienced just yet.  


Basically, we've all gone through accidentally mucking up our home Operating system at least once and needed to format our home pc after we've backed up everything important.  Maybe we just wanted to upgrade/change to a new operating system.  The result is, formatting the drive, and installing everything from scratch.  Except now with a server we basically have all our vm's, and ISO's standalone.  We don't need to back things up to make changes.  VMs that can be loaded on notice.  Multiple datastores of information that can be secured outside of a VM and used by multiple vm's as network shares.  The goal of the server is to basically have the ability to fix/adjust to issues/wants/etc faster by providing a separation of all these types of data so that its never tied down to 1 system. 

Pros to USB:
  • Once a server loads ESXi into RAM it never reads/writes to the drive again unless you make changes to the host OS.  You don't need this taking up hard drive space.
  • If you want to upgrade the Host OS of ESXi, you just format/overwrite the USB with the new host OS.
  • If the usb drive goes bad. It will take a few minutes to replace. No big raid array rebuild.
  • If you're lucky enough to have 2 USB internal ports, you might be able to make an array off them.
Cons to USB:
  • Reading from my USB 2.0 drive is around 15mb/s  Its awful. Harddrive loads should be much faster than this.
  • Chances are you you can't tell how a USB harddrive is doing with smart technologies found on S.M.A.R.T. drives.  Something I need to look into.
  • Finding enterprise USB drives using SLC or MLC flash like high end SSDs isn't cheap.
  • If a USB drive goes bad, you will have to open up the server and replace it.  Depending on the motherboard/server this might be obnoxious. Especially if you don't have server cable arms allowing you to move a server out readily.
  • USB drives are always hit or miss, they just go bad. You will be replacing it eventually so you need to make sure you're ok with the process of doing a restore..

We've basically boxed ourselves into a corner that we can't reinstall the OS without some problems or hoops to jump through since it's on our main raid array.  Can it be done, I think so.  But its not something that I'm positive about just yet.  I wonder if I can install ESXi onto a USB drive while the other one still exists...As always leave a comment below on your thoughts or opinions.

Things TODO - ESXi can use a scratch file/drive.  This should be moved off usb onto something faster.  good place is ssd, but is a normal drive good?  should this be done always if you're using USB boot?

Monday, October 24, 2016

Installing an OS on a virtual machine in ESXi 5.5

Installing an OS on a virtual machine in ESXi 5.5

So now that I've installed ESXi and provisioned a virtual machine I need to figure out how to put an OS on the vm.

First thing is to get an image of the disc I want to install or download the image / .iso file.  Luckily microsoft has them up at all times, you just have to get a license key for them to bring them out of evaluation editions.  Since I already had a few .ISO files from microsoft we're moving onto step 2.

We need to put the iso file from my main computer onto the server.  We're going to click the server, not the virtual machine we've created since we want these .iso files to be accessible by more than just the one VM.


:Begin tangent

When ESXi was installed I installed the host OS onto my main hard drive raid array, This is a newbie mistake, however I am a noob to system administration.  Hopefully this helps explain why this is bad.  What would have been better was to do 1 of 2 things.
  1. Install ESXi onto a different usb flash drive. installed into a port usually directly on the motherboard.  This port is provided by Server motherboard manufacturers specifically for this purpose.  ESXi once loaded by the server will run in RAM and won't access the flash drive unless rebooting the entire host after changing host settings.
  2. Install ESXi directly onto the flash media you put the iso install file onto.  This is a nifty trick that allows you to basically load an OS onto the same drive you had the install files.  The install files themselves were only around 360 mb, And the lowest usb flash I ever find nowadays is 2 gig at minimum.  So this is more than possible.  However, I'm a newbie and am expecting to need to reinstall ESXi a few times just for learning purposes.  I also only picked up 1 usb drive so I needed to install this onto something else.
Now, why not just install directly onto the raid array.  Why not have it redundant with my raid 1+0 setup, faster access with my hard disks etc.  Warning: This answer is going to be based off things I've read, and not what I've experienced just yet.  


Basically, we've all gone through screwing up our home Operating system at least once and needed to format our home pc after we've backed up everything important.  Maybe we just wanted to upgrade our operating system.  The result was, formatting the drive, and installing everything from scratch.  Except now with a server we basically have everything backed up and standalone.  VMs that can be loaded on notice.  A multiple datastores of information that can be secured outside of a VM and used by multiple vm's as network shares.  The goal of the server is to basically have the ability to fix/adjust to issues/wants/etc faster by providing a separation of all these types of data so that its never tied down to 1 system. 

We've basically boxed ourselves into a corner that we can't reinstall the OS without some problems since it's on our main raid array.  Can it be done, I think so.  But its not something that I'm positive about just yet.

:End tangent

Ok now lets put an .iso someplace useful for our server's vms.
  1. We've clicked on the server 192.168.1.102.
  2. Click on the Configuration Tab, 
  3. Click Storage on the left of the tab.  This by default goes to Datastore view.




Right Click your datastore1 or whatever you've renamed it to and select browse datastore, wherever you're planning to put some files.




Create a directory for .ISO files. And then upload a file to this datastore.

*note you'll notice I created a vm directory before creating the vm, that was never able to be chosen during vm creation.  Creating the vm, created its own directory

Now that we've got our file somewhere the server and all our vms can access it.  We need to get the vm to boot looking at it.  

Right Click on your vm and goto Edit Settings, or if you're at the vm's Resource Allocation Tab, click Edit



Now we need to tell them vm 2 things.  
-It has a cd player
-The cd's contents are our .iso file from our datastore.
  1. The default settings tab that opens is Hardware, select hardware if you're not there.
  2. Click CD/DVD drive on the left.
  3. Check connect at power on, and check connected.
  4. Select Datastore ISO File.
  5. Browse to your Datastore iso file.



The connected checkbox actually allows you to add or remove cd's on the fly when your vm is running, Checking Connect at power On however is essential to boot an OS. To have it available during boot up.

Fantastic we're all done....or are we. DUN DUN DUNNNNN

If your vm refuses to boot off the cd, It might need to be reconfigured in the bios to boot off your cd ...so how does one get to the bios of a virtual machine.
  1. In the same VM Settings window, Click the options tab
  2. Click Boot Options down on the left side of the window
  3. Check The next time the virtual machine boots, force entry into the bios.
This will force the vm to go into a bios, where you can go find the boot sequence and make sure CD is above Hard drive and PXE



Now you should be ready to install an OS,

Picking how many virtual sockets vs cores per socket in ESXi

Picking how many virtual sockets vs cores per socket in ESXi

So I'm looking at the options for allocating resources to my vm and I come across an interesting breakdown of my cpu within vmware.

So we see the possibilities and combinations for my small 2 x xeon e5503 which have 2cores each and no HT(hyperthreading)  But the question comes up what's better. If I max out vsocket or vcores, or a combination of them?

With these settings I load up my vm and go looking at what's going on at Task manager.

So we can see that I have 1 socket and 2 virtual processors, Which is what I expected based on my settings.  I'm not sure why the cpu graph isn't broken down into 2 different blocks showing the 2 cores however...  Checking the vm though I found the cpu was pegged at 50% cpu usage nonstop with Windows Module Installer clogging up my vm.  
  • I had to do a bit of research, but I expected it to be related to Microsoft's OS problem of Windows Update getting locked into a loop and just destroying your cpu until its resolved or you finally google what's going on yourself.  I'll be doing a blog post shortly on that and the few steps I took. but if you google/youtube it it's a pretty common error about TIworker.exe and windows update services.
So above you see it peaking around 50%  which is what you expect for processes/program that don't handle multithreading and the importance of higher clock cpus not just having a server with as many cores as you can.  It would go above 50% if I had multiple things going on at the same time, but in general that single 2.0GHz processor is the workhouse.

But the question remains...If I had good cpus what would be the best mix of sockets and cores.  I came across these postings
So going off these posts we see something extremely important from a licensing/OS perspective. Different operating systems can have hard caps for how many sockets they're going to use but not how many cores.  
"In vSphere a vCPU is presented to the operating system as a single core cpu in a single socket, this limits the number of vCPUs that can be operating system."- 
Denneman's article goes on to say it doesn't really matter the combination as long as you're not reaching any hard limits set by your Operating System. I think this changes in Windows Server 2012/SqlServer 2012 and they start going off cores...which is pretty much why noone wants to upgrade from Win2k8 r2 or Sql2008R2. Licensing becomes more complicated, and in general expensive.


Continuing reading on the article below shows an example of what happens when You've assigned things past the cap and the OS ignores the settings it can't handle.
Testing has shown i am better off in my case respecting the physical server configuration.
Most common host config is probably like ours, half height blade. 2 sockets , some cores. In this case 12 cores. 512GB of memory and Intel processors (v2)
Test was restoring a 300GB database with Microsoft SQL Server 2008 R2 on Windows Server 2012 R2 (both enterprise editions). 112GB of memory.

  • Test 1, time to restore was 1 hour 12 minutes. Throughput was 52 MB/sec . Config was 12 sockets 1 core. This was bad!
  • Test 2, time to restore was 9 minutes 50 seconds. Throughput was 334 MB/sec . Config was 1 socket 12 cores. This was great. Over 600% I/O performance improvement and a great time reduction.
  • Test 3, time to restore was 9 minutes 59 seconds. Throughput was 330 MB/sec. Config was 2 sockets and 6 cores. Still great.
Only change as was the socket and core configuration. VM was of course brought down for each configuration change.
So not configuring the socket count on the VM higher than the physical host in this case resulted in a fantastic performance improvement.
Run your own load tests with your application to determine the best configuration for you.

TL/DR,  Check your OS/Software products for hard caps on vsockets, and check your licensing for softcaps on cores per socket to determine the best mix of the 2 for your vm.

Saturday, October 22, 2016

Installing ESXi 5.5 on a Dell r510 (part 2)

Installing ESXi on a Dell r510 (part 2)


  • This is a continuation of installing ESXi 5.5 onto a dell r510 with the ESXi ISO from Dell instead of vmware's website.  This kept us from needing to make an account from VMware for the download.  We'll see what that approach does in a later post or just delayed the inevitable. TODO
  • So we're chugging along, it takes a bit to load everything up.  Especially from my USB 2.0 stick.  Acquired for $4.99 at office depot because I wanted to get this started, but really the read times on http://usb.userbenchmark.com/SpeedTest/1349/SanDisk-Cruzer-Blade are fairly terrible.  
  • Fantastic news though.  Once we got into the Welcome to VMware ESXi 5.5.0 Installation screen. my router found 'A' nic plugged into it...should have found 2, but baby steps. My guess is it found the idrac shared port. (I previously set up IDrac to share nic 1 instead of using it's own port because I only have an 4 port router right now so router ports are hard to come by as of right now.  However the Idrac should be named idrac-XXXXXX where XXXXXX is my Dell service tag, and it's blank. Baby steps.
  • TODO-I need to figure out if there's a set standard for rj45 wire cabling color or if it is basically shop independent.  having wires going all over hell and back would be nice to try and narrow things down by color, and then look for labels.

  • I chose to install on my 4 disk raid 1+0 array and then hit my first snafu.  It said Virtualization technology was either not turned on in the bios or not possible on this chip.  Since I'm using a xeon e5503, xeons should all have Virtualization capabilities but I'm using near the lowest rung of  the Xeon e55xx series so I wasn't sure, however I swore I had turned it on in the bios.  So I exited the install before continuing, no reason to continue installing a Hypervisor for virtualization if the chip can't handle it.
  • Second shot at installation doesn't produce the error but it gives a warning that my hard drives will be partitioned. Accept the notification, not sure why, but lets hit F11 and install
    • Install seemed to hang at 28% for a few minutes, lets hope it continues and its just because of my slow read speed usb drive. 
    • Success, need to remove the usb drive before hitting enter for reboot.
    • and again...the reboot shoots out my CD Drive.  That'll be annoying.
  • Ok ESXi is installed, however I need to manage it remotely and try to make the server useful.  The screen of the server says, download tools to manage this host from: 192.168.1.102. Going to that page brings up a default page on where to download the management tools
    • Now to figure out what Vsphere Client is  versus the next download link of VMware vCenter
    • The vSphere client luckily has a direct download link....of a 353mb file downloading at 1Mb/s, not too slow but definitely not the fastest.
  • The vmware vCenter link doesn't have a direct link and puts you at some huge download page.  I have no idea what all this stuff is, so this is going to be a little more work.
  • Installing Vsphere Client
    • installing microsoft J# compiler thing, probably going to need a reboot
    • Logged into the Client by knowing it's IP address, and using root/the password I set during ESXi installation.  However its telling me I only have 60days before my vms are destroyed....so I'll need to figure that out soon. TODO
  • WHOOOO Went into IDrac and told the Idrac to get its IP address from DHCP instead of me assigning it directly.  I believe that I didn't fill in all the information for a static IP address and it never worked because of it.  I also changed it back from having the Idrac be accessed over a shared LOM 1 back to the Idrac port itself.  I was getting worried because the IDrac wasn't even lightning up when something was plugged in and I wasn't sure if I just had a crap cable. I still cannot get anything from LOM2 so I'm wondering if it's setup as failover and not useful when LOM1 is working.  I still have a 4port gigabit card that's working however that is going to be used for something, just not sure what.
  • Proof that it's working. Interesting to see what's being used by default with ESXi without anything else running. And now I'm going to be sad because the r510 I bought came with 2x e5503 's which are some of the only processors without hyperthreading.  However 2x e5520s in a matched pair...are 10 dollars for the set off ebay.  Might be something I'm going to be upgrading soon.  Baby Steps.  Lets get a VM running first.
  • It looks like I need a vCenter server running to access all the ESXi hosts that would be running per server.  Probably overkill right now since I only have 1 server running. and since the 2 servers I have are manufactured 7 years apart. I question if i'm going to be able to do much just yet with them moving vms back and forth,  I need to figure out what the long term purposes are.  Where will data be stored and should I change my raid array on r510 with 5x160gbs







Friday, October 21, 2016

Installing ESXi 5.5 on a Dell r510 (Part 1) - PreInstallation

Installing ESXi on a Dell r510 (Part 1) - PreInstallation

A little pre-setup,
  • server turns on. Hooray. As a surplus buy with no kind of warranty or testing, this is very good
  • Since the homelab is not sitting in a good environment I made an air filter out of a all black knee high nylon stocking. Put the front bezel inside it and snapped it right back in.
  • Set up DiskGroup/Virtual Disk/
    • I have set up my raid 10 with 4 drives and 1 global hotspare.
I've read about not ever using a hotspare, that the best practice would be when something fails, run a backup, then install the new hard drive, then have the raid array rebuild.  This does have downtime, but if something goes wrong when rebuilding the new array with the hotspare, you basically lose all your data from between now and the last backup
  • Setup Idrac...sorta
    • I've changed the idrac gateway settings to my actual gateway. The Linksys wrt54gl assigning itself 192.168.1.1 instead of what dell looks for being 192.168.0.1 so things went a little crazy.
    • Plugged in ethernet wires to idrac and both ports onboard the r510 and nothing is detected by the router. todo-->fixed Ctrl+E is your friend during boot


            • EDIT: As an alternative I found this ESXi 6.0 Dell Installer Link This Link however has a section dedicated to what systems are supported.  
            • Yeah...the dell r710 and r515 are supported but not the 510. Bite me Dell. We'll try and install this anyway and see what happens later on, not sure which install to use though. todo
          • Well, that's alot of files and possible updates I need to deal with todo
          • Looking around in the headings finally pans out in Enterprise Solutions and I download the most current ESXi iso image.
          • I right clicked download and used save link as because reading a line right above it that says this will install after being downloaded and requires a restart on a hypervisor, or anything on this page is questionable.  
          • I also just managed to blow up google chrome, and destroyed this blog post's formatting somehow.  Luckily I'm used to finding bugs and after alot of shift tabs to go backwards with my bullets and copying things into notepad and then back out to remove saved blogger formatting, all is fixed.
    • Need to put the ESXi iso bootable image onto something.
      • Since the file is only 360 mb this could go directly onto a cd and will probably be my plan in the future once i know that I don't have any other things to put onto this cd.
      • First step is to put it on a USB drive and see if anything works.
        • So how does one make a USB bootable for ESXi.
        • Google lights the way again with http://www.virten.net/2014/12/howto-create-a-bootable-esxi-installer-usb-flash-drive/
        • So I download Rufus to make the USB, however on Rufus website there's a good point. If you need to make an ISO yourself of something you own, you can use one of my favorite pieces of software Imgburn.  However I would recommend going to oldversion, the latest version of imgburn had some nonsense bundled with it.
        • Image shows a few things you should be clicking on
    • Boot from usb
      • The server didn't find a place to boot from because under harddrive it listed the boot order as perc first and the usb stick second.
      • Press F11 to goto boot menu, goto harddrive and selection the Dell-ESXi-5.5U3-xxxxx-Axx installer
    • Holy Hell stuff is loading, next blog post we'll see how well it does.
    • Need to figure out how to do this remotely instead of being right next to this server somehow through a console.  TODO




Friday, October 14, 2016

Racks and Rack Holes - The differences and why you care.

I bought a Dell T130 server recently after finding a good deal on it, and if 1 is good, more is better. After looking at some auction websites I found a Dell R510 (R stands for Rack mount, T stands for Tower is the dell server ecosystem) and purchased that as well.  Once you start finding server hardware you realize you're probably going to need space to store it for easy access, This brings up Racks.  I'm not really a hardware guy, never been a sysadmin from that perspective but all software computer guys have to deal with their own hardware.

I found a good guide describing one of the main differences between racks.  Rack Holes.

Racks use rails to mount servers and come with a few different flavors for mounting them, Round Holes, and Square Holes.  The following movie talks about the differences and the hardware needed for Dell Rack Systems.  Hopefully this helps you decide on what kind of rack you should be looking for on ebay/craigslist if you start branching out into a more robust layout.