Keith Smith - My Blog

Keith Smith - My Blog

XenServer VM Backups

Tuesday, June 2, 2015 - Posted by Keith A. Smith, in Xen

I've been trying to conjure up some way to backup the guests that reside in a xenserver virtualized environment. I started off by looking at what i would call my usual suspects (e.g. unitrends, alike, etc.) unfortunately in this situation they all let me down for one reason or another, so i did what most creative minds do when they can't find a solution "Make my own". I figured i start by jumping on to the cli at the host, i know most hypervisors reference the guest by UUID's. I spent sometime looking through the variables and commands on the host, i eventually came up with

# xe vm-list
 which produces the following output for all guests

uuid ( RO)           : 15b96001-84c6-83d1-ef11-8gh6509i122j
     name-label ( RW): nameoftheguest
    power-state ( RO): running

Another command i saw that was available was #vm-snapshot, so i figured I'd try and string it together by doing a xe vm-snapshot uuid=15b96001-84c6-83d1-ef11-8gh6509i122j or tab which display all uuid's. And the tale of the command i place name-label=snapshot, so the whole thing would look like 

xe vm-snapshot uuid=15b96001-84c6-83d1-ef11-8gh6509i122j name-label=vmsnapshot

Now that i saw that worked i figured i would develop a crontab task using the #crontab -e command that would run a shell script (which i will post at another time) to handle this redundant task which was version1 of this solution. Once I uploaded the shell script i needed to make it executable, which i did by running the chmod +x command. I attempted to execute it and got a error bad interpreter - No such file or directory, some times when you move files from DOS/windows to linux or nix system you run into the ^M charater problem. The way i have solved this so many times is simply to open the file in the vim editor using the following command
vi -b once the file is open you will see ^M at the end of each line, the quickest way to remove this is to run :1,$s/^M//g the trick to this command that you don't really type a ^ character and then a M character 
to generate that command. You actually type a [Control][v] and then a [Control][m] to create the necessary character then do a :wq to write and quit the editor. I figure it must be punishment for not developing the script in the vim editor in the first place. 

So far this has been working for the xenserver environment, in version2 of this i included retention elements and frequency of backups for individual guests. In my last version3 i added more comments to the script because the code was pretty extensive at this point (over 100 lines of code). The next item i have on my dev to-do list would be to add some mail functionality, so i can be notified of the out come of the backup job.

Note: this files used to perform the backups should copied from the hypervisor prior to any upgrades.
View Comments 0 Comments
Share Post   

Screw Verizon and there stupid STB's and constant rate hikes with the

Thursday, May 28, 2015 - Posted by Keith A. Smith, in Network

In February of 2014 i finally decided to cut the cord! I returned all the Set top boxes (STB) that were in my house to the provider and cancelled my tv subscription. The customer service guy tried really hard to prevent me from canceling but i was persistent enough to see it through, during the same process I negotiated a speed tier increase which was going to be utilized by all the Internet connected things.

I like most people have more shows on hulu, Netflix and amazon prime than on anything else, the challenge was going to be with sports! How would I be able to watch football and basketball? And what would would be the device of choice for streaming? Since i don't have any smart tv's or any of that I started to do some research, i already knew of the apple tv's, roku's and chromecast's of the world but i wanted something different, on Mar 27, 2014 i heard a rumor that amazon was working on some sort of set-top box which was intriguing to me. Apr 2, 2014 Amazon unveiled a new streaming video product during a press conference it dubbed Fire TV, after looking at the specs it seemed like it do fit the bill for what i wanted.
On Apr 2, 2014 i pulled the trigger and purchased my first amazon fire tv, the setup was pretty straight forward and there are a few popular music apps included like Pandora, but the company says its Amazon Music Cloud player will be available soon. Currently you can't access your local video or music collection from an external drive, even though there's a USB 2.0 port. Company execs say the port is meant for accessories as well as developer support. But once the Amazon Cloud Player is ready, you can upload your songs to it and play them.

FreeTime for kids is another feature that works with parental controls and limits the amount of time your kid can watch videos and play games. It also lets you create personalized profiles for each of your children. The FreeTime service is a subscription that will cost US$2.99 per month, and is said to be arriving in the coming weeks. A month later i planned to other another Fire TV, but i needed to make a few changes first.

As i noted here i chose to go the Amazon Fire TV route for media streaming in 2014, by the time September rolled around i had not found a solution for watching football and basketball with out a tv subscription. I stumbled upon a article that reminded me that i could use a vpn solution to access certain content, I already knew of a pretty reasonable vpn provider that might be able to do this but in order to test it out i would need to and i did purchase NFL Game Pass which would allow me to stream the NFL games. To sum it all up my answer was a vpn provider and a NFL Game Pass subscription for the streaming of NFL games.
In February of 2015 i figured now would be the time to see if i would be able to find a solution for the streaming of NBA games. I discovered something called NBA League pass which was suppose to allow you to stream NBA games just like the NFL Game Pass did for me, after installing the app and creating a login i attempted to watch a few games but two things seemed to be vary consistent which were the following streaming quality, a lack of HD broadcasts.

The streaming quality was just dreadful, so much so that after about 4 weeks i cancelled it because of that and the customer support wasn't really helpful. My last option was to wait for the Sling TV to become available, at least then i could gain access to ESPN and TNT which are stations that sometimes carry NBA games. On February 13, 2015 i installed the Sling TV app and it filled the all gaps that were existing (e.g. HGTV, ESPN,TNT and some NBA games) in early goings I had some issues with the streaming quality but i believe quite a few people had the same sort of issues. Over the past few months the streaming quality has improved and all is well for now.
View Comments 0 Comments
Share Post   

Initial NAS Setup headache

Sunday, May 10, 2015 - Posted by Keith A. Smith, in Network

This Post is private, you need to be a active susbcriber to vew this Post. Click here to Subscribe
View Comments 0 Comments
Share Post   

Packet filters converted to proxy policy types

Monday, March 9, 2015 - Posted by Keith A. Smith, in Network

I decided to clean up and consolidate my firewall rule base last week. I originally had multiple rules for the same policy type for each subnet that need access, it ended up that way because I needed to get things up and running ASAP because the change took place late in the evening. Anyway I created some http-proxy, https-proxy and dns proxy policy types to lump all the vlans into, once that was done I tested most of the services and things seemed ok.

I found out on 3/7/15 that Netflix had not working in a few days; I took a look online twitter and etc and found others had issues also so I figured our problem with the amazon fire tv's could be related to that issue. I called Netflix and they were no help basically, so I had a thought...which was to split out the vlan that contains the amazon fire tv’s from the proxy policies and to place it in to a non proxy http, https and dns packet filter. Once that change was committed I proceeded to test it out on one of the fire tv's and bam it worked! I didn't see a whole lot of traffic being blocked before the change.

The one entry on the traffic monitor that tipped me off was

2015-03-09 16:52:26 Deny x.x.x.x https/tcp 47763 443 3-vlan 0-External ProxyDrop: HTTPS timeout (HTTPS-proxy-00) proc_id="https-proxy" rc="594" msg_id="2CFF-0008"

The belongs to one of amazon's cdn's

I also discovered that the amazon fire tv's don't like non u.s. dns servers.

All is well now. Note to self never use proxy policy types for things like media.

View Comments 0 Comments
Share Post   

Wi-Fi woes...

Saturday, September 6, 2014 - Posted by Keith A. Smith, in Network

I’ve had many issues with the DHCP on one of the cisco 350n AP’s, I figured I should place this part of the Wi-Fi network on its own vlan. After about 10mins of fighting with subnet masks, it seems like ddwrt doesn't like any smaller than a /27 for its WAN allocation. I figured this out after trying a /30 and etc. Wi-Fi is such a pain! Censored.

A win is a win and you have to take them when you get them. 

View Comments 0 Comments
Share Post   

Page  <1...1314151617>