How to tell if you are using openvswitch or bridge networking in XenServer 6

The XenServer 6 Administrator’s Guide and other sources contain instructions on switching between openvswitch and bridge networking mode in XenServer. Information on how to tell which is configured on a host is unfortunately, sparse.

Here’s a quick way to tell if you are running the openvswitch. From the XenServer console, run:

ovs-vsctl list-br

If this returns a list of bridges, you’re using openvswitch. If you get a list of errors where the command is unable to open the openvswitch database, hit Ctrl-C. You’re using bridge.

Unconventional, but it works.

XenServer 6 – Enabling Gigabit LAN in HVM VMs without XenServer Tools

By default, Citrix XenServer sets a rubbish 100Mbps Realtek virtual NIC to HVM VMs that don’t have XenServer Tools installed. I ran into this running some FreeBSD based virtual appliances on XenServer.

There is Gigabit support built in – the Intel e1000 driver – but you have to implement a workaround to unlock it. Here is an excellent article describing how to do it.

Rails 3: Wrong Timezone in Text Field?

I came across this issue today in a Rails app I am writing. It took me a while to figure out so hopefully this post will save someone else a bit of time. My dev environment is Rails 3.1.3 using Ruby 1.9.3 – although this may affect other versions.

My Rails app has a custom default timezone, with the following set in config/environment.rb:

config.time_zone = 'Brisbane'

There are no issues with Date attributes. The time zone is respected through the Rails app when creating or displaying DateTime attributes. However, when editing DateTime attributes, the time displayed in the form is in the UTC time zone rather than local time.

After trying numerous workarounds, I found a post on Stack Overflow mentioning that this appears to be an issue with displaying DateTimes in text fields in Rails. It appears that this is a limitation (bug?) in Rails. As I’m using a JQuery-UI DateTimePicker plugin, I have to use a text field to display the time.

As mentioned in the Stack Overflow post, to fix this issue I needed to force the attribute to be used by the text field by changing the text field in my form from:

f.text_field :start_time

to:

f.text_field :start_time, value: f.object.start_time

Fixed.

How to flush the DNS cache in OS X Lion

The old way to flush the DNS cache in versions of MacOS X prior to Lion was to run the command:

dscacheutil -flushcache

This doesn’t work for me in Lion. To flush the DNS cache in Lion, run:

sudo killall -HUP mDNSResponder

Offline

After mucking around with my webserver and switching from Apache to nginx, it appears as though my blog was offline for a month or so. I’m sure the world didn’t miss it with my amazing post frequency.

New Idea 11 White Paper: Implementing Citrix XenApp

I’ve been pretty quiet on the blog recently, but very busy elsewhere. At Idea 11 we have released a new white paper on implementing Citrix XenApp. Check it out if interested.

Idea 11 website now online

After much planning, work and rework, the Idea 11 website is now online at http://www.idea11.com.au. Click and enjoy!

Video: My Ignite Presentation – Stuck in the Clouds: So what’s a cloud, anyway?

A video of my talk from Ignite Brisbane is online. Watch it here.

Ignite is a short presentation format where you have 5 minutes to talk on a topic, with 20 slides that auto-advance every 15 seconds. It’s fun, interesting – and not to mention a very different presentation format to the 30 – 60 minute talks I’ve done previously.

The easiest way to run IE6, IE7 and IE8 on the same machine

There are far too many guides on the net about running multiple versions of IE on the same machine. And most of them are a pain in the ass to set up.

Here’s something I bumped into today: Spoon’s Browser Sandbox. Spoon have a plugin that can launch all sorts of applications from your browser. It streams virtualised application packages to your PC through the browser. A couple of clicks and IE6 – or any other application they have in their portal – will launch.

This is probably the single best use of application virtualisation that I’ve seen in the wild. It’s the kind of “just works” technology I love. Great for web developers or occasional hacks (I’m in the latter category).

And just for the hell of it – here is a screenshot of Firefox (running natively), IE8 (running in a Windows VM via VMware Fusion) and IE6 (running in the VM with Spoon) all on my MacBook Pro:

Screenshot2010-03-17at2.05.48PM.x6wThM1iJWYU.jpg

My new favourite iPhone app – Instapaper

I download and play with a fair amount of iPhone applications, but I only stick with a few in the long run. The few that I use all the time are NetNewsWire, RunKeeper Pro, and Pocket Weather AU. I’ve found a new application for that list – Instapaper.

The idea behind Instapaper is to mark web pages when you’re at your computer so that you can read them offline on your iPhone when you might have a few minutes to kill. You add a “Read Later” link – which Instapaper supplies – to bookmarks toolbar in your browser. Whenever you’re at a page that you’d like to save to read later you hit the “Read Later” bookmark. Instapaper then saves that page to your reading list.

When you’re away from your computer, run the Instapaper app on your iPhone and Instapaper grabs your reading list and formats it nicely to read on the iPhone. Pick an article and start reading. If you’re interrupted Instapaper will remember your place. Nice little touches like that make it a pleasure to use.

It’s a simple concept that is done very well. The whole process just gets out of the way and lets you do what you wanted to – read.

Copyright © JK
thoughts on technology

Built on Notes Blog Core
Powered by WordPress