Skip to main content

Posts

Showing posts from 2013

Identifying virtual disks in Linux on vSphere

A default virtual machine has straightforward hardware. A single SCSI disk on a single SCSI card, for example. Having multiple SCSI disks or cards in a VM creates the need for in-guest identification. Linux complicates matters slightly by using alphabetical disk naming: /dev/sda, /dev/sdb, ... /dev/sdz, /dev/sdaa, /dev/sdab, ... This post looks at how you can identify individual disks in a VMware virtual machine. Executive summary: VMware notation "X:Y" typically maps onto Linux scsi(X+2), Id:Y, which are then named in ascending order with /dev/sd* identifiers.

which vSphere version is my VM running on?

(an update of an older post, now complete up to vSphere 5.5) Your Linux runs on a VMware VM, but which on which ESXi version? You can see for yourself: run "dmidecode" and look at lines 10, 11 and 12. ESX 2.5 - BIOS Release Date: 04/21/2004 - Address 0xE8480 - Size 97152 bytes ESX 3.0 - BIOS Release Date: 04/17/2006 - Address 0xE7C70 - Size 99216 bytes ESX 3.5 - BIOS Release Date: 01/30/2008 - Address 0xE7910 - Size 100080 bytes ESX 4 - BIOS Release Date: 08/15/2008 - Address 0xEA6C0 - Size 88384 bytes ESX 4U1 - BIOS Release Date: 09/22/2009 - Address 0xEA550 - Size 88752 bytes ESX 4.1 - BIOS Release Date: 10/13/2009 - Address 0xEA2E0 - Size 89376 bytes ESXi 5 - BIOS Release Date: 01/07/2011 - Address 0xE72C0 - Size 101696 bytes ESXi 5.1 - BIOS Release Date: 06/22/2012 -  Address: 0xEA0C0 -  Size: 89920 bytes ESXi 5.5 - BIOS  Release Date: 07/30/2013 -  Address: 0xEA050 -  Size: 90032 bytes NB These DMI properties are set at boot time. Even if your VM g...

VMware Certified Associate exams half-price until 31/1/2014

Using a voucher code, anyone can do a VCA exam (datacenter virtualization, cloud, or desktop, and maybe network when it becomes available) for half the regular price. VCA is a certification that you can do from the comfort of your desk! Enroll at http://vmware.com/certification/ . To do the exam for half the normal price, use this voucher code:  VMRT4B425324. Best of luck to anyone who tries! NB This code used to reduce the exam price to 0, rendering VCA certification completely free, but starting somewhere in december 2013, the discount will be reduced to 50%.

downloading protected/embedded videos - the hard way

Charged with the task to save a news broadcast for posteriority, I wanted to download a video that was only available through an embedded "JW Player" videoplayer on a website. Time was not on my side: the video would be purged from the site within a week. In the HTML source of the webpage containing the video, I found tags like data-video-src =" http://media. XYZ nieuws.net/GEO2013/09/230916509ONL1309244843676.GeoFLVLong.flv " data-video-iphone-path =" GEO2013/09/230916509ONL1309244843676.GeoMP4_H.264.m4v or (from another video) data-video-rtmp-path =" 2009/11/132628352ONL0911177754876.urlFLVLong.flv " but I couldn't get a clear URL out of the page's source code (URLs anonymized to protect involved parties). After a bit of research (a.o. channeling browser traffic through a proxy and looking at the URLs being requested), the files used by the JW Player were still a mystery to me, but I found the server that was hosting the iphone...

SSD overprovisioning in vSphere

SSD vendors like Samsung or Intel often provide tools to reserve some space on your SSD that can be used by the internal algorithms for better wear-leveling, longevity, garbage collection, and performance. My own Samsung SSD comes with a tool to do that on Windows, for example. But on vSphere, you'll have to do that manually: I see two possibilities: don't format the SSD "full" but instead use "partial", and specify only the amount of the disk that you want to use. The rest is left unpartitioned, and therefore unallocated. You can only do this if you haven't formatted the SSD as VMFS yet. If you have, this second possibility can still help you: create a thick-provisioned lazy-zeroed VMDK on the SSD-backed VMFS, either with vmkfstools or by creating a dummy VM. Those blocks are allocated, but remain unwritten. You're not going to attach the disk to a running VM, so they won't ever be written to. This effectively reduces the amount of blocks t...

dd-wrt refusing new configuration: out of NVRAM space

Another post documenting a small issue just so I can google it later: one of the Cisco/Linksys WRT160NL devices (both running DD-WRT) in my environment stopped accepting config changes through its web interface. It happened to be the one I'm using as a NAT gateway and DHCP server, not the one just functioning as access point. A config backup appeared to be full of UPnP rules. Those are port forwarding rules that have been asked for by applications on NATed stations that want to be reachable. Think Skype amongst many others. Clearing the UPnP list solved the problem: click "NAT/QoS", then "UPnP", then "Delete all". Apparently the UPnP list filled up the available NVRAM space, which broke all subsequent config changes.

what's the IP address of my VM

Imagine wanting to access a VM, but you don't know the IP address, and you don't have a GUI client for your vSphere environment? The most basic way of getting the IP address of a VM from the vSphere hypervisor level, is logging in to the ESXi Shell (could be local or SSH), and finding your VM number in the VM list: # vim-cmd vmsvc/getallvms In my example, my VM has number 42. Then type # vim-cmd vmsvc/get.summary 42 | grep ipAddress       ipAddress = "10.11.12.13",  Et voila! NB this requires running VMware tools in your guest OS, evidently.

nomodeset can break Xorg monitor probing

Some time ago, a CentOS install on a particular new Dell workstation needed the "nomodeset" kernel parameter to get a graphical login screen to correctly display. This was with a Radeon Firepro 2260 graphics card. After applying the CentOS 6.3 updates, Xorg wouldn't correctly detect the LCD panel's resolution anymore. A 1680x1050 panel would get a 1280x1024 resolution. In the days of digital DVI connections, DDC probing and what not, this was unusual and surprising. A lot of searching and testing led to the solution: the nomodeset parameter broke Xorg probing. Rebooting without the nomodeset parameter worked (no graphical problems like I had earlier), and solved the Xorg resolution probing.

Synology RS3413xs+ tech notes

The newest addition to my home lab is a Synology RS3413xs+ NAS. While installing it, I came across a couple of details that I didn't know before buying it. So for other people thinking of buying this unit, here's what I found out: If you add network interfaces in the available PCIe slot, they might be numbered _before_ the four onboard interfaces. They were in my case. So onboard 1-4 are eth2-5, and add-on interfaces 1-2 are eth0-1.  the SSD cache feature only works with identical drives in the both cache slots. You can buy two 120GB SSDs, but you can't just add one 240GB SSD. Except if you configure it manually through the CLI, and want to work without Synology support.  as explained in an earlier post, there's no multiple-VLAN-over-one-interface support in the GUI, but you can work around that in the CLI the DSM web interface counts VLAN-tagged packets twice in its "Total Network" graph. The per-interface/per-bond counters are correct however. PS that loo...

Multiple VLANs on a Synology NAS

Synology, like other SOHO/SMB NAS vendors, touts VLAN functionality with their current DSM 4.1 software. However, the web interface just lets you specify one VLAN tag to use over each eth interface (or bond interface). Manual approach In the busybox environment that you can ssh into as root (after enabling ssh through the webinterface), there's all the tools you need to use multiple VLANs over one link (eth or bond), however: First you insert the 802.1q module into the Linux kernel:  /sbin/lsmod | /bin/grep -q 8021q || /sbin/insmod /lib/modules/8021q.ko Then you add each VLAN you need to every interface (bond0 in this example)  /sbin/vconfig add bond0 4 And finally you can configure IP addresses on every interface.vlan combination (bond0.4 in this example)  /sbin/ifconfig bond0.4 192.168.4.1 broadcast 192.168.4.255 netmask 255.255.255.0 The same type of script would work on a QNAP NAS too, by the way. They offer 8021q.ko and vconfig in their commandline environment a...