XenServer: Enable SNMP

KB ID 0001629

Problem

We had to enable SNMP on a XenServer today, I’d never even logged onto one, but it turns out, much like ESX, it’s just a Linux server, at least the good folk at Citrix included nano on there so I didn’t have to struggle with the vi editor!

Solution

First from the web console ensure that SSH access is enabled > Remote Services Configuration > Enable/Disable Remote Shell.

SSH into the host and execute the following commands to start the SNMP daemon,  take a backup of the config file, and finally edit the ‘live’ config file.

[box]

chkconfig snmpd
cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.backup
nano /etc/snmp/snmpd.conf

[/box]

You can delete EVERYTHING (At the beginning of the file press CTRL+6 to mark the file, then Press ALT+Shif+T (or ALT+T) to cut the text away). Then type in;

[box]

rocommunity {SNMP-String} {IP address or range with /{bits}}

i.e.
rocommunity public 192.168.1.0/24

[/box] 

Save and Exit (CTRL+X > ‘Y’ > {Enter}). Now you need to edit the firewall on the host (iptables). To allow the IP addresses of your SNMP collector(s).

[box]

nano /etc/sysconfig/iptables

[/box]

At the bottom, (usually) you will see a deny for ICMP, put an entry for each collector BEFORE that in the following format;

[box]

-A RH-Firewall-1-INPUT -s {Collector-IP-Address} -p udp -m udp --dport 161 -j ACCEPT

[/box]

Save and Exit (CTRL+X > ‘Y’ > {Enter}). then restart iptables and the snmp daemon.

[box]

service iptables restart
service snmpd restart

[/box]

If you are polling it though a firewall you can test it locally using this piece of freeware, (I use this to test, but remember to add the local IP you are testing from to the sump config and the iptables!)

Related Articles, References, Credits, or External Links

NA

VMware Converter Slow!

KB ID 0001584

Problem

I was P2Ving a server for a client this week. I did a ‘trial run’ just to make sure everything would be OK, and got this;

Yes, that says 13 days and 29 minutes! Suddenly doing this at 1700hrs on a Friday became a moot point! (Note: I was using VMware vCenter Converter Standalone version 6.2)

Solution

At first I assumed this was a network problem, so I moved everything onto the same Gigabit switch, and made sure all the NICs were connected at 1Gbps. Still no improvement. I then shut down as many services on the source machine as I could, still it was terribly slow 🙁

Firstly, make sure Concurrent Tasks, and Connections per Task are set to ‘Maximum’.

Then locate the converter-worker.xml file and edit it;

Usually located at “C:\ProgramData\VMware\VMware vCenter Converter Standalone

Note: ProgramData is, (by default) a hidden folder!

Locate the section, <useSsl>true</useSsl>, change it to <useSsl>false</useSsl> then save and exit the file.

Then restart the ‘VMware vCenter Converter Standalone Worker‘ service.

Boom! That’s better.

Related Articles, References, Credits, or External Links

NA

Find All HP iLOs on your Network

KB ID 0001571

Problem

I had to find all the HP iLOs on a client network today, I could have got an IP scanner and then sorted the results for HP devices, but I would have ended up with switches, printers and God knows what else!

If only there was a PowerShell command I could use?

Solution

There is! You will need to download it though, (HPiLOCmdlets-x64,) extract them to your C: drive.

 

Here I’m installing them from PowerShell, but you can simply run the HPiLOCmdlets-x64.msi file, (if you do install from PowerShell, you will need to restart it, and might need to change your signing policy).

Run the following commands;

[box]

Find-HPiLO
{Then supply the range to scan i.e. 192.168.1.1-254}

[/box]

Related Articles, References, Credits, or External Links

NA

EVE-NG (VMware) Connecting to the Internet

KB ID 0001432

Problem

I did an article a while back on doing this with UNL, so I thought I’d revisit it today for EVE-NG. I really like EVE-NG, for proof of concept work, testing, and just learning new products I cant think of any product better.

But what if you want to connect your labs to the outside world? 

Solution

In all honesty a lot of this article you can skip, I’m just showing you what’s going on down at the Linux level (so you can be sure yours will be OK).

I’m assuming you already have EVE-NG installed and some images in it, and know how to create a lab, and that you want to connect that lab to the internet.

Unlike UNL, EVE-NG will deploy with only one vNIC, (below I’m using vSphere 6), so to keep things nice and simple I’m just going to add one more;

VMXNet3 is fine, just make sure it’s connected to the correct port-group.

Note: You can probably skip down to allowing promiscuous mode below. As the good folk at EVE-NG have configured all the hard stuff for you!

SSH into your EVE-NG server > log on as the root user, and make sure it can see BOTH network cards, with the following command;

[box]ifconfig -a | grep ^eth[/box]

Above you can see the original eth0, and the one I just added eth1.

You probably already have nano installed, (it’s a text editor). But just in case, run the following command;

[box]apt-get install nano[/box]

Use nano to edit/view the network card settings; 

[box]nano /etc/network/interfaces[/box]

Scroll down to the settings for eth1 and make sure it is tied to, (bridged to)  pnet1 (as below). Repeat for any additional network cards.

To exit nano Press CTRL+X, (then if you have made any changes save them).

You can also see a summary of bridged interfaces with the following command;

[box]

brctl show

[/box]

Enable Promiscuous Mode

Your Hyper Visor (VMware) needs to be able to see traffic from your EVE-NG devices, coming out though the vNIC we added earlier, that means a lot of MAC addresses are going to be coming from the MAC address of that vNIC. By default VMWare will block that. so we need to enable promiscuous mode on the port-group that we connected to earlier, (mine was called VM Network).

If you are using the older VMware (Fat) client, see the link at the bottom of the page for the older UNL article.

Edit the port group;

On the Security tab > Tick ‘Override’, and set it to ‘Accept’ > OK.

Forged Transmits: You will also need to enable this, (if you use VLAN tagging in your network!)

Add Cloud Objects to EVE-NG

Above, (if you remember) the vNIC (eth1) was bridged to pnet1. These used to be labelled pnet1, pnet2, etc. Now they are labelled Cloud1, Cloud2, etc.

In your lab workspace add a ‘Network’ object.

Select Cloud1 (remember this is mapped to pnet1, which is bridged to eth1.). You may want to change the name from Net, to something like ‘Internet’.

Connect a device to it, (I’m using a router, because they are quick and easy to setup).

My Network has DHCP on it, so my router picked up an IP from my LAN, and once I’d given it a default route, I now have full internet access from the lab.

Related Articles, References, Credits, or External Links

Unified Networking Lab – Connecting ESX VM to the Internet

I’m Going on Holiday, What do I need to Disable on my iPhone?

KB ID 0000622 

Problem

Here in Europe the big mobile Telco’s are being forced to keep roaming prices down. But going abroad with all your data services turned on can mean you might come back to a big bill.

Solution

1. On most peoples phones “Data Roaming” is already disabled (Mines always off).Data Roaming is designed to let you use another provider’s phone network if your carrier signal is too weak. On some sites it says you cant use your phone abroad if you have this disabled I DISAGREE, I’ve got it disabled and I use my phone every time I’m out of the country?

Settings > General > Network > Data Roaming.

2. If you see ActiveSync and/or have mail pushed to your phone, you might want to also disable “Mobile Data” to stop that happening while your away.

Settings > General > Network > Mobile Data.

3. That’s Data stopped but your phone will still function as a phone. WARNING you may still be charged “call forwarding” if your phone rings and you let it go to answer phone while you are away. I don’t mind that, because I prefer to keep my phone on. If you want to disable the phone and text features as well, e.g. You Just want to use the Camera, iPod, and Alarm capabilities. Then just put the phone in Airplane mode, (which isn’t a word Apple! The word is Aeroplane!)

Settings > Airplane Mode.

Related Articles, References, Credits, or External Links

NA

Event ID 7022

KB ID 0000138 

Problem

Event ID 7022

The McAfee Framework Service service hung on starting.

The Framework service starts before the network is up.

Solution

1. Start > run > Regedit {enter}.

2. Navigate to HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesMcAfeeFramework.

3. In the right hand window locate DependOnService > Double click it.

4. Add the following to the bottom of the list, “Netman” without the quotes.

Related Articles, References, Credits, or External Links

NA

VMware Error – Host {name} currently has no management network redundancy

KB ID 0000231 

Problem

Seen in Vmware ESX / Vmware Vsphere environments with both ESX and ESXi hosts.

Solution

As far as errors go this one’s pretty straight forward (and very common). I’ve seen it in ESX3 and VSphere networks, with high availability clusters.

It’s complaining because there is only one physical NIC presented to the Service Console (I know ESXi does not have a service console, but it has a management IP).

To fix the problem you can do any one of the following.

1. Ignore the error, HA will still work (though it’s simple to stop it giving an error).

2. Present another physical NIC to the virtual switch that has the Service Console/Management port. On a host with loads of NIC’s that easy, but if your pushed for NIC’s then that’s not an option.

3. The easiest, and my preferred option; You already have Vmotion running for HA, so simply add a Service Console (or a vmkernel management port if your running ESXi) to the vmotion switch, you will never need to connect to it anyway, and it will stop the system presenting this error.

Select your Vmotion switch and select “Add Networking” If you’re on an ESXi host then select “vmkernel”, or on an ESX host select “Service Console”

For ESXi

For ESX

If you are on an ESX host skip to the next step, ESXi users only select use this port for management option. Take note of the IP address of your existing Vmotion kernel port.

Give it an IP address in the same range as your Vmotion ports.

Now you can either wait, or right click each host and select “Reconfigure for HA

 

Related Articles, References, Credits, or External Links

NA

Sharing Files from Ubuntu to Windows

KB ID 0000412

Problem

If you have only a few files to share, you might want to consider using Dropbox, however if you want to share your files over the network then you need to install samba and configure it.

Solution

 

Related Articles, References, Credits, or External Links

Special Thanks to Morbuis1 Over at the Ubuntu Forms for the help.

Samba Install Error

 

What’s My Network Address and What’s my Broadcast Address?

KB ID 0000215 

Problem

The network address is the IP address that is the lowest number in your network range, and the broadcast address is the highest.

To find out what your is, use the form below.

Solution

Find your IP address and Subnet Mask then enter it below.

 

Enter your IP address:
.

.

.
Enter your subnet mask:
.

.

.


Answer:

Network Address:
Broadcast Address:

 

Related Articles, References, Credits, or External Links

NA

Windows – Cannot Delete Thumbs.db

KB ID 0000683

Problem

Thumbs.db is a small hidden system file that gets generated when you view media in a folder, you know when you look at all your MP3 songs and you can see the album cover as a thumbnail? Or you can see what all your photos are as a tiny thumbnail before you open them, well thats what the thumbs.db file is doing. It’s a tiny cache of all that information so next time someone visits this folder it displays those pictures quicker. Well that’s great! But when you try and delete a folder with one in (particularly a folder on another machine) you can see the error below.

The file Thumbs.db is a system file if you remove it, Windows or another program may no longer work correctly.

Then it won’t let you delete it, and if you persist, you end up with a folder with just this file in it, that you cant delete.

Solution

First Step – Delete the Thumbs.db file

OK, lets solve the initial problem first and get rid of the one thats annoying us at the moment.

1. In Windows 8/2012 whilst in the folder > File > Open command prompt as administrator. (With older versions of windows hold down SHIFT and right click).

2. Issue the following commands;

[box] attrib -s -h thumbs.db del thumbs.db [/box]

Stop your PC Generating Thumbs.db Files

Option 1

Open Windows Explorer > View Options > Change folder and Search Options > View > Enable ‘always show icons, never thumbnails’ > Apply > OK.

Option 2 (Use the Local Policy of the Machine)

1. Press Windows Key+R to launch the run menu > gpedit.msc > OK.

2. Navigate to;

[box] User Configuration > Administrative Templates > Windows Components > File Explorer {or Windows Explorer} [/box]

Locate the ‘Turn off caching of thumbnail pictures’ policy.

3. Enable > Apply > OK.

Option 3 (Use the Registry)

You can simply run the following command;

[box] REG ADD “HKCUSoftwarePoliciesMicrosoftWindowsExplorer” /v “DisableThumbsDBOnNetworkFolders” /t REG_DWORD /d 1 /f [/box]

Or to do it manually,

1. Press Windows Key+R to launch the run menu > gpedit.msc > OK.

2. Navigate to;

[box] HKEY_CURRENT_USER > Software > Microsoft > Windows > CurrentVersion > Explore > Advanced [/box]

Create a New DWORD Value.

3. Call it DeleteThumbnailCache and set its value to 1.

Remove all Thumbs.db Files

Finally lets tidy up any remaining thumbs.db files.

Option 1

1. Open Windows Explorer (Windows Key+E) > Right click the drive > Properties > Disk Cleanup.

2. Select Thumbnails > OK.

Option 2

1. From command line, issue the following commands;

[box] cd del thumbs.db /s /q [/box]

 

Related Articles, References, Credits, or External Links

NA