Archive

Archive for the ‘HowTo’ Category

Convert Thick Virtual Disks to Thin

November 9th, 2009 No comments

When working with virtual machines, it is often advantageous to over allocate and under utilize resources. When it come to virtual hard disks, this is even more common place. On low use or low demand servers, I always use thin provisioning. This saves disk space by only using physical disk space when the guest actually uses the virtual disk. But what about those disks that were created using the thick option, or brought over as thick automatically during a P2V conversion? Time to convert your thick virtual disk to thin.

As always, I recommend backing up all of your data and knowing what you are doing. Test this in a non-production environment.

Converting disks from thick to thin is actually quite easy and can be accomplished using these steps:

1. Log into your ESX host using SSH and cd into the VM directory that contains your virtual disk.

2. Shutdown the VM so that we can get exlusive access to the virtual disk.

3. Run vmkfstools -i yourthickdisk.vmdk -d thin yourthindisk.vmdk

4. Edit the settings for your VM and remove the existing drive. Add a new hard drive and choose the existing drive option.

5. Boot the VM and enjoy.

Note: Dont forget to go back to ESX server and remove the old .vmdk and -flat.vmdk files once you are sure that your VM is operating normally off the thin disk.

–Himuraken

Windows Services for Unix and Backup Exec

August 14th, 2009 6 comments

Been working on a backup project and needed to use a NFS export as a backup to disk destination in Backup Exec. The best (read free) way to accomplish this is to setup Windows Services for Unix so that your server can map a network drive to the NFS export. Backup Exec does not allow B2D targets to be located on mapped drives but there is a simple work around. Here is the rough break down on what you need to do:

1. Install NFS and export the directory that you want to use as your backup target. Ubuntu users can use the following to install NFS server:

sudo apt-get install nfs-kernel-server nfs-common portmap

Export your directoy however you see fit. I won’t describe the steps necessary to setup /etc/exports as it has been documented numerous times.

2. Download and install Windows Services for Unix 3.5 on your Backup Exec server. You can find that download here. Again, not to be overly redundant, follow the instructions provided on ubuntuforums.org to install SFU 3.5 here. Proceed to step 3 after verifying that you can manually map a network drive to your NFS export and read/write/etc.

3. Create the backup to disk folder in Symantec Backup Exec. In order to create a backup to disk folder on NFS, you must run a simple command. Open up the Windows command line/cmd and make your way over to: c:\program files\symantec\backup exec. Finally, run the following command:
bemcmd -o116 -v -f"Name of your backup to disk folder" -e0 -m1 -d\\NFS-Server-Name\export-name

A fair amount of research and testing went into this setup and the end result was well worth it. We are now using our Ubuntu 9.04 server as a backup to disk target and it is moving some serious IO.

–Himuraken

HowTo: Install Adobe Air and TweetDeck in Linux

June 26th, 2009 No comments

So I finally created a Twitter account and started checking it out. I quickly noticed that below everyone’s tweets, was the application or place that they were tweeting from. I noticed that a lot of people with using TweetDeck. So I headed over to their download page and clicked on the big yellow “Download now, it’s free” button and nothing happened.

Apparently their install is delivered via the Adobe Air application which I have never seen or used. Well it is pretty easy to get TweetDeck going once Air is loaded. So follow these short steps and you will be up and running.

Head over to Adobe’s Air download page which is here and download the .bin file. For simplicity sake, lets just say that you saved the file to your desktop. Open up a terminal window and

cd Desktop

Next we need to set the execute bit/permission so enter in

chmod +x AdobeAIRInstaller.bin

Now start install by entering

./AdobeAIRInstaller.bin

Just follow the wizard and complete the install. Head back to the TweetDeck download page and click on the download button. This should start TweetDeck download/install via the Adobe Air application. Follow the onscreen steps and you are good to go.

Update! 64 Bit Ubuntu users follow this link and use the step by step directions there. Cheers to Tony at OSSRamblings for this one.

Note* The Adobe Air install described here works for all browsers tested: Opera & Firefox.

–Himuraken

Categories: HowTo, Linux Tags: , ,

HowTo: Reset a Cisco IP Phone to Factory Defaults

June 16th, 2009 1 comment

Recently a client asked me to lend them a hand with a Cisco IP Phone 7940 that was haning during the boot process.

After some quick research online, I determined that a reset on the device was needed, and the process is really simple.

Begin by unplugging the phone and then reconnecting the power. As soon as the headset key illuminates you need to press and hold the # key. After a few seconds you should see Reset sequence detected. Once that is displayed you have 60 seconds to enter in the following key sequence: 123456789*0#. You will be asked whether to keep the network config or not, press 2 and you should see: Factory reset initiated. You can watch process from beginning to end here.

–Himuraken

Categories: Hardware, HowTo, VoIP Tags: ,

Steering Windows User Profiles via the Registry

June 5th, 2009 1 comment

If you have ever had to join a pre-existing user/profile to a Windows domain, then you certainly know the pain that comes with migrating the old profile. Very few users find new (read clean) profiles very entertaining. So most people copy the contents of the previous profile’s folder to the new one. That approach does work although read/write/in use errors are sure to follow during at least one stage of the transfer.

Many years ago I found a way to accomplish the same thing in a fraction of the time as the old way. If you are responsible for joining systems to domains at any level, this tip will save you valuable time. A typical usage scenario is when you are deploying a domain controller into a network with a pre-existing domain or a small workgroup with no domain.

Open up the registry editor and navigate to the following area: HKLM\Software\Microsoft\WindowsNT\CurrentVersion\ProfileList. You will see several sub keys that are shorter than the rest, ignore these. You need to look at the randomly named keys in the format of S-1- ETC…. Each one of these keys corresponds to a user profile/account. Look for the string value named ProfileImagePath. This is the path to the user profile for that key. Identify the ProfileImagePath of the user that you want and double click it. Copy the entire path, this is important because you have to have the path identically as it appears here. Now, locate the key for the new profile that you want to map or steer to the old profile. Edit the ProfileImagePath for the new profile and paste in the path that you copied earlier. Log off and back on and you are good to go.

A couple of extra tips:
The new user account must have full access to the old profile or the profile will fail to load completely. One of the easiest ways to do this is grant the new account local administrator rights, but let your security conscience decide the best course of action for you.

I typically make the registry changes from the new user account/profile after verifying that I have access to the c:\documents and settings\oldprofile path. After editing the reg as the logged on user, just log off and on.

This has saved me countless time since I found and memorized this registry key. Hopefully it will help you out too.

–Himuraken

Categories: HowTo, Windows Tags: ,

Internet Connection Sharing with Windows Mobile 6.1 in Ubuntu

April 8th, 2009 9 comments

After turning in my HTC 6800 as an insurance claim, I was given a new HTC Touch Pro running Windows Mobile 6.1. I had not even tethered my data phone since my UTC 6700 and was curious if it could even be done on the newer Windows Mobile OS. So few Google searches later, I was able to find a how-to, and a really easy copy pasta style one at that. There is a note at the bottom regarding possible issues with the HTC Touch and Diamond, I had no issues what so ever, YMMV. Full text from Ubuntu Forums to follow…

–Himuraken

From Ubuntu Forums
How To: Internet sharing on USB with Linux and Windows Mobile
I have been lookin’ for a complete guide on “How to connect to HSDPA/3G trough USB with Linux and Windows Mobile 6″ – And here is the solution!

To connect your WM6 device via usb to your linux pc do the following:

On your phone enable internet sharing via usb but do not connect the usb cable yet.

Run the following commands..you may need to install “svn” for this to work: (install by terminal: sudo apt-get install subversion)

Code:

svn co https://synce.svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite/
cd usb-rndis-lite/
make
sudo ./clean.sh
sudo make install

Create the path “/etc/sysconfig/network/”, in Hardy Heron the path “sysconfig/network/” doesnt exists, easy with nautilus trough terminal:

Code:

sudo nautilus

Nautilus opens, and browse to “/etc/” and create the path “sysconfig/network/” and futher. – Close nautilus.

The create the file “ifcfg-rndis0” in “/etc/sysconfig/network/“, easy with gedit (gnome’s text-editor) trough terminal:

Code:

sudo gedit /etc/sysconfig/network/ifcfg-rndis0

Fill the file with the text below:

Code:

BOOTPROTO='dhcp'
BROADCAST=''
ETHTOOL_OPTIONS=''
IPADDR=''
MTU='1460'
MRU='1500'
NAME=''
PEERDNS=no
NETMASK=''
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='hotplug'
USERCONTROL='no'
_nm_name='static-0'

So, if you haven’t start “Internet Sharing” on your WM-phone yet. Do it now..

- Now plug the phone into the usb cable going to the pc and if you do a “dmesg” you should see the following (or something similar):
Code:

[ 6539.589930] usb 5-1: USB disconnect, address 2
[ 6539.590829] rndis0: unregister ‘rndis_host’ usb-0000:00:1d.2-1, RNDIS device (SynCE patched)
[ 6540.972801] usb 5-1: new full speed USB device using uhci_hcd and address 3
[ 6541.019337] usb 5-1: configuration #1 chosen from 1 choice
[ 6541.628430] rndis0: register ‘rndis_host’ at usb-0000:00:1d.2-1, RNDIS device (SynCE patched), 80:00:60:0f:e8:00

and if you do an ifconfig you should have a new rndis0 device:

Code:

rndis0 Link encap:Ethernet HWaddr 80:00:60:0f:e8:00
inet addr:192.168.0.102 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::8200:60ff:fe0f:e800/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:8050 Metric:1
RX packets:3008 errors:2425 dropped:0 overruns:0 frame:225
TX packets:2993 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1915412 (1.8 MB) TX bytes:763519 (745.6 KB)

—-
The rndis0 device will exist both when internet sharing is enabled via usb and when it is NOT….here is how it works:

If internet sharing IS enabled via usb you have access to the internet and will get an IP…default route will be set.

If internet sharing is NOT enabled via usb then the rndis0 device will exist and can be used by programs such as syncE to manage your contact list or transfer files but you will not have internet access (from the phone) and more than likely you will not get an ip address auto assigned (it may keep the ip it used last).

I know this works as I’m connected at the moment via the rndis0 device. I find it to be more responsive than the connection via bluetooth. Hope this helps someone.

Source from: http://forums.opensuse.org/1579065-post1.html

Solution for HTC Touc Pro / Diamond (HTC devices that can’t get DHCP to
work properly): http://ubuntuforums.org/showthread.p…82#post6239582

Enable SSH on VMWare ESXi 3.5 & 4.0

February 25th, 2009 No comments

I have been playing around with ESXi and needed to upload some files via SCP and discovered that SSH is not enabled by default. There are many sources out there for accomplishing this but I found the following information to be the easiest to follow.

1) At the console of the ESXi host, press ALT-F1 to access the console window.
2) Enter unsupported in the console and then press Enter. You will not see the text you type in.
3) If you typed in unsupported correctly, you will see the Tech Support Mode warning and a password prompt. Enter the password for the root login.
4) You should then see the prompt of ~ #. Edit the file inetd.conf (enter the command *vi /etc/inetd.conf*).
5) Find the line that begins with #ssh and remove the #. Then save the file. If you’re new to using vi, then move the cursor down to #ssh line and then press the Insert key. Move the cursor over one space and then hit backspace to delete the #. Then press ESC and type in :wq to save the file and exit vi. If you make a mistake, you can press the ESC key and then type it :q! to quit vi without saving the file.
6) Restart host or try kill -HUP `ps | grep inetd`

The original blog posting can be found here.

–Himuraken

Categories: HowTo, Linux, Virtualization Tags: , , ,

Using Whaleback Crystal Blue VoIP in Linux

October 31st, 2008 2 comments

The company that I work for recently ditched its traditional PBX system in favor of a new VoIP service. Our VoIP system is provided and managed by Whaleback Systems. They provide a unique approach to VoIP in the sense that it isn’t an on-premise system or a standard hosted system. Their system is a hybrid of an on-premise and hosted solution, which they state is superior to other VoIP systems because they are able to get the best of both worlds. Either way, this isn’t a Whaleback review, the information provided above is merely a quick attempt to describe the type of system used.

Whaleback offers two types of endpoints to make calls with, a physical phone and a softphone. The current Whaleback softphone is provided by Counter Path. They provide a Windows and Mac OS X versions of their application. That seems decent enough of them. but what if you want to make calls from your Linux box?

Although there are probably countless softphones available for Linux, the default one in the distributions that I prefer include Ekiga. I have used Ekiga for PC to PC calls and found it rather useful. However, I need to make calls to business clients and they need to think that I am calling from my office. Regardless of OS or softphone used, calls placed from a softphone registered with a Whaleback voice server always originate from the physical location or number of the site that the server is located at.

Important Note: Although they are a great group of people, and a few of them use Linux, they do not officially support any softphone other than the ones that they provide. That being said, Whaleback is somewhat unique in that they do not offer a generic softphone download that you can install and configure. All of their softphones come to the user pre-configured with that user’s password, extension, and other information. This is the tricky bit, where do you get the information needed to plug into Ekiga? Answer: You call them and let them know that you are configuring a Linux softphone. Be sure to let them know that you aren’t expecting formal support of any kind. As with most things in life, if you are a polite human, they may help you out. You will need the following information, or at least the parts that you don’t know already: The external IP address that other softphones use to connect to your voice server, the internal IP of your voice server, your extension, and your password. They may be hesitant to give up your password or they may not give it to you at all. This depends on your demeanor and how their day is going.

Now that you have that information, make sure you have Ekiga installed and that you have gone through the configuration wizard. Generally, I accept all of the defaults that are presented to me, although I opt out of the free Ekiga service. Once that is complete, go to Edit -> Accounts. Click on add and enter a friendly name like Whaleback or WB. Your protocol must be set to SIP, not H323. Enter the internal IP address of your voice server into the Registrar field. Enter your extension into the User field and your password into the Password field. Review your settings and then click OK. Close the Accounts windows and go to Edit -> Preferences. Under Protocols -> SIP Settings, enter the external IP address of your voice server in the Outbound Proxy field. Assuming that you have followed these steps and have the right information, you should now be able to make calls.

Important Note: Although this might seem obvious, you must dial calls the same way that you do from a physical phone. In other words, if you have to dial 9 to get an outside line from your desk phone, you must do the same thing on the softphone.

I use this setup frequently from my Dell Mini 9 and my Dell Latitude D630 and love it. Because I am always on the move, my connectivity is typically the nearest open or recently opened ( XD ) WiFi hotspot around. For obvious reasons, WiFi is not ideal for voice as most access points use best effort for packet management. At home I have QoS on my wireless access points so this is much less of an issue. Regardless of the internet connectivity that you have available, you can improve or decrease quality as needed. To do this you simply go to Edit -> Preferences and go to Codecs -> Audio Codecs. You can select and deselect codecs as your needs require. Also note that you can move the codecs up and down in priority. Although all codecs may not be supported by your Whaleback voice server, Ekiga will negotiate the best available codec upon connection/registration.

This setup is so much more convenient than my last one. Happy dialing…

–Himuraken

Categories: HowTo, Linux, VoIP Tags: , ,