Archive for Uncategorized

Random MAC address for libvirt

Snippet for generating a random MAC address. Useful if adding interfaces to a libvirt xml define file.

MACADDR="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')";
echo $MACADDR
echo "
<interface type='bridge'>
<mac address='$MACADDR'/>
<source bridge='br233'/>
<model type='virtio'/>
</interface>
"

Comments (1)

KDC reply did not match expectations while getting initial credentials

Seems kinit is particular:

I had similar problems. I figured out that krb5.conf requires the realm names to be in upper case. I have converted the domain names (wherever it appears in krb5.conf) to uppercase.

[root@LinuxLS logicalfuzz]# kinit myaccount@corp.example.com
Password for myaccount@corp.example.com:
kinit(v5): KDC reply did not match expectations while getting initial credentials
[root@LinuxLS logicalfuzz]# kinit myaccount@CORP.EXAMPLE.COM
Password for myaccount@CORP.EXAMPLE.COM:
[root@LinuxLS logicalfuzz]#

Comments (1)

SATA cable fault causes disk system to timeout

While setting up Nexenta 3.0 on a Intel SS4200, I hit this error: “transport failed reason tran_err“. The reason – a SATA cable was caught and being compressed between a drive cage and the case.

Comments off

vmbuilder, virtio and fstab

nic@vm-base:~$ sudo blkid /dev/vda2
/dev/vda2: UUID=”0c75b2dd-6c6f-4729-b041-0d95475dc171″ TYPE=”swap”

If you install a vm with vmbuilder without virtio the swap section of /etc/fstab will use /dev/sda2 instead of /dev/vda2. You can use blkid

nic@vm-base:~$ sudo blkid
/dev/vda1: UUID="bac299c4-c545-46ca-aed3-26da4a56f6d7" TYPE="ext3"
/dev/vda2: TYPE="swap" UUID="0c75b2dd-6c6f-4729-b041-0d95475dc171"
/dev/vdb: UUID="jIkLcQ-zXUo-KIWR-zvmm-cpKP-9PpT-eE9RY3" TYPE="lvm2pv"
and then add this UUID to fstab:
nic@vm-base:~$ cat /etc/fstab
# /etc/fstab: static file system information.
# <file system>                                 <mount point>   <type>  <options>       <dump>  <pass>
proc                                            /proc           proc    defaults        0       0
/dev/sda1                                       /               ext3    defaults        0       0
UUID="0c75b2dd-6c6f-4729-b041-0d95475dc171"     swap            swap    defaults        0       0

in order to get swap working with different driver types.

Comments off

Shared Storage and Virtualisation

Recent issues and 18 months of experience have shown me that shared storage for a small (2-4 node) virtualisation cluster is hard.

It is still practical and possible to build a shared storage cluster using Solaris, rather than buying super experience appliance storage. But you must always spec at least two storage nodes, otherwise you lock yourself into a structure that can be difficult to change. That includes changes that involve upgrades.

Virtualisation technology has moved a long way in the last couple years. And while I’m still formulating a new approach, there are many more options for flexible micro virtualisation clusters.

Comments off

KVM, disk formats and disposable computing

I’ve got a couple XenServer vms that I never migrated to ESX. Time and complexity got in the way. In fact one of the reasons why I dislike XenServer is that fact that way it ran disk images was not portable.   Where as with ESX and KVM I can migrate disk images between the two hypervisors without needing to chance anything in the guest. With XenServer at the time this was not easy. XenOSS has a similar issue with PV domains, although with KVM+xenner  is meant to be able to run these.

Anyway here are a few links for converting disk images between formats.

I found though in the end that kvm-img or qemu-img has able to handle all the images I use: VHD, VMDK, RAW, and QCOW2. For example kvm-image convert disk.vhd -O raw disk.raw will work.

This leads to the nicest thing I found about KVM. With either ESXi 3.5 or vSphere 4 ubuntu 8.04 or 8.10 VMDK files I was able to: kvm-img convert -O raw disk.vmdk disk.raw. Then run this new disk in raw format with KVM plus virtio drivers and do so without any changes in the guest.

This truely is disposable computing!

Comments off

Running KVM

I’ve started running KVM recently and I’ll post a review at some point. I’m finding it very flexible and much much easier to use that Xen.

There are still a few questions regarding file caches and disk images. In general I’m happy that it’s ready for production.

Comments off

Google Wave – Fully Integrated Social Tech Networks

Watch this video. There is a lot I could say, but it’s best to watch the video. Google Wave covers most of my vision of how communication should work, but extends it further in directions I haven’t considered.

  • Inline replies
  • Simultaneous online interaction 
  • Wiki like behaviour
  • Data interface linking.
  • Drag and drop.

The whole agent/robot functionality is very exciting.

Comments off

From Professional VMware blog, here is another method to fix your lost Ethernet device on Ubuntu.

Another method of doing this, is to edit the ‘persistent-net-generator.rules’ file to include something similar to:

# ignore VMware virtual interfaces
ATTR{address}==”00:0c:29:*”, GOTO=”persistent_net_generator_end”

Comments off

Cloud Automation

Image representing Mechanical Turk as depicted...
Image via CrunchBase

Couple article with interest methods for leveraging cloud computing.  Both of these talk to my concept of disposable computing.

Do the maths correctly for cloud computing.

Look for applications that leverage Amazon’s ease of use: EC2 instances can easily be brought up and quiesced; it’s not necessary to keep an instance up and running 24/7. Unlike a data center, where once a server is installed it’s easier to keep it running than to power it up and down, Amazon is ideally suited for applications that are used in a transient fashion, or even a temporary fashion. For example, one company I worked with had an application where it needed to test a system with 100 simultaneous browser instances. The company fired up 100 Amazon EC2 instances, ran a browser script on each one overnight, and completed the test the following day, whereupon it shut down the instances and discarded the systems. It accomplished all of this over a period of three days. Imagine how long it would take to do this in a traditional IT environment. Even better: the total cost for the simulation: $100.

Virtual Stress-free Testing in the Cloud.

Throw-away boxes
It was funny when I was talking to some developers about testing. One of the developer jumped and said “If you mess up the configuration, simply dump the instance and start a new one. Time is precious, dude!”  I knew developers from server-less start-up companies in our ecosystem, who start their dev boxes every morning and run it for 12 hours (the average developer uptime) per day and shut down every night before they go home. But I never thought that one can actually use Amazon EC2 to create thousands of Test environments in the Cloud – all fresh and new – and dump them, if they mess up and/or recreate it in the next test/sprint cycle. When you are testing your mobile application on different device platforms or testing your database-agnostic and app server-agnostic middleware app on different deployment configurations, the Cloud becomes an ideal platform to create-dump-recreate environments as you need.


Mechanical Turk for Innovative Testing
Using the on-demand workforce to help you in testing your app:

  1. Workers create actual test scenarios (Selenium)
  2. Workers enable Usability testing
  3. Worker help analyze results from Cross-browser testing (present a screenshot and ask a turker to compare the pages)
  4. Worker analyzes your test results/log files
  5. Worker tests for broken links on your website
  6. Workers participate in surveys that rate look-and-feel, navigation, search features of your website

You will find variety of customer stories and actual HITs on Mturk.com. Last year’s Start-Up Challenge Contest nominee UserTesting.com uses Amazon Mechanical Turk to create real videos to capture user behavior.

Reblog this post [with Zemanta]

Comments off