Archive for the ‘Networking’ Category.

Mapping iSCSI disks in VirtualBox

To add iSCSI disk to already made VirtualBox machine do the following from a terminal/Command Prompt
VBoxManage storageattach MyVirtualMachineNameOrUUID --storagectl "SATA" --port 0 --device 0 --type hdd --medium iscsi --server 10.10.10.7 --target "iqn.2004-04.com.nas:target-name" --tport 3260

MyVirtualMachineNameOrUUID = The Name of your Virtual Machine. Use quotes if your VM name has spaces
–storagectl “SATA” = Name of the controller under the storage tab in VirtualBox
–port 0 = Port Number. If you already created a virtual disk connected to the SATA controller, probably want to select a different virtual sata port.
–server 10.10.10.7 = ip address of the iSCSI server
–target “iqn.2004-04.com.nas:target-name” = Full target name
–tport 3260 = iSCSI server port number.

Using nslookup to add allow entries for PeerGuardian Linux

I use PeerGuardian Linux to block IPs as extra layer of protection my servers. Because I block more than I need, I wanted a way to quickly add IPs to the allow.p2p file by their hostname. Below is the contents of my “Add_Allow_IPs” script.
nslookup $1 | sed -e '1,4 d' -e '$ d' -e 'N;s/\n/ /' -e 's/ Address: /:/g' -e 's/Name:\t//g' >> /etc/pgl/allow.p2p
sudo pglcmd reload
sudo pglcmd restart

So now if I run:
./Add_Allow_IPs google.com
It will take out all the google.com ipv4 addresses from nslookup output and make them line items in the allow.p2p file. It dose not work for IPV6 and CNAME results.

MAC Address Conflict – ESXi management interface could not communicate to another ESXi box

When I first put together my home ESXi box, I used a Intel Pro/1000 PT quad port NIC. All was great until I wanted to pass-through individual ports to specific virtual machines. So I purchased a newer Intel I350 quad port NIC that supported what I wanted to do. Then I gave my old Pro/1000 quad port to a friend that needed it for his home ESXi box. Months down the road, my friends ESXi box came to live next to mine. With both machines running, connecting to the vSphere management or SSH was terrible. Connection was unreliable but guest OS’s networking seemed to work fine. On my workstation I would ping each ESXi box and neither would respond at the same time. I launched wireshark and noticed there were constant ARP requests for each ESXi management IP. These ARP requests were getting the same MAC for each IP. Doh! Little research on google and found this VMware KB.To sum it up, once you create a ESXi management interface it uses the physical mac address. If you replace the physical hardware it will keep the old mac address. It required me to remove the management interface and re-create it. Now the management interface has the physical address of my newer I350 NIC. In VMwares’s KB they have this work around.
esxcfg-advcfg -s 1 /Net/FollowHardwareMac
Above command in ESXi Shell should update the Management interface mac to the physical mac address if the underlying hardware changes.

Windows 7 SMB 2.0 Client doesn’t find new files until reboot

At work we had an issue where two Windows 7 Home Pre clients would not show newly created files on mapped network drive. Normal refresh wouldn’t cut it, but unmount and remount or a pc reboot would. After little of googling I found I wasn’t alone.

http://social.technet.microsoft.com/Forums/en/w7itprogeneral/thread/947489ae-dc86-45f0-ad5e-463a62e1d59f

Even though this topic’s setup was a windows server and here at my office we use Samba 3.6.3 with SMB2.0 enabled. But the symptoms were very similar.  The finger was pointed at the new caching abilities in the SMB2.0 client. The solution was to disable DirectoryCacheLifetime on the client via a registry entry.  Here is Microsoft link for description of DirectoryCacheLifetime http://technet.microsoft.com/en-us/library/ff686200(WS.10).aspx

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
“DirectoryCacheLifetime”=dword:00000000

In my experience it seems that only Windows 7 Home Pre clients are effected, our Windows 7 Pro clients have no issues. I applied the registry entry to the Windows 7 Pro machines as well with no side effects.

Steam and massive steamapps folder

*** Edit: Sometime in the last few months Steam added a new feature, Steam Library. You can create multiple locations on the same drive, different drives, or even networked drives to install games!.  Networked drive sounds nice! Useful if anyone is running a Cafe of steam users.

I’ve had a few people complain about the steamapp folder size being to big to fit on their main hard drive. So I thought about few solutions:

  1. Install steam on a separate harddrive
  2. Delete/backup games you don’t play?
  3. Use mklink to point all or specific games to another harddrive or network location.
Solution #1 is pretty simple
#2

You could just delete the games you don’t want. Or Above the ‘Delete Local Content’ option is ‘Backup Game Files’. Now it will backup all the games files with compression to a location you pick. It can even break the backup sets into 700mb (CD size) or 4.7GB (DVD sizes) or any custom size.

#3
Useing mklink (windows 7 has it, windows xp requires windows 2003 server resource kit)
ex.
mklink /D “C:\Program Files (x86)\Steam\steamapps” Z:\steamapps
Move your steamapps folder to your destination (Z:) first. Because source folder must not exist.
Could also do parts. like “C:\Program Files (x86)\Steam\steamapps\common” or “C:\Program Files (x86)\Steam\steamapps\username” to different locations if needed.

First!

Hello World! This will be the most boring post ever. For who ever reads this post, my goal with the website is to store notes, steps on how I solved problems, tips, and other computer related things. There has been many times blogs have shown me the way to fix complicated computer issues. So now on I will try to post every computer issues I have with a solution so maybe I can help someone with the same issue.