13July2010

OCS 2007 R2 on Windows 2008R2 and NTLM problems

Posted by Michele Baldessari under: en; tech.

It took me a while to figure it out, so I thought I post it, so people in the future might be able to avoid the waste of time. I had a machine which is not joined in our domain that just couldn’t log on to the OCS system. The client was a Windows XP machine and the authentication on the front-end OCS server was correctly set to “NTLM + Kerberos”.

After a lot of googling and trying different things, I found a post mentioning that the minimum key requirements on NTLM on Windows 2008R2 are 128-bits and this key length is not supported in Windows XP (only on Windows 7).

With this link: http://technet.microsoft.com/en-us/library/dd566199%28WS.10%29.aspx I was able to remove the 128-bit requirement and things were all dandy again.

0 

23May2010

vSphere export VM list in excel

Posted by Michele Baldessari under: en; tech.

I wanted to have a list of all the VMs in our vSphere farm exported to excel. CPU, RAM, Disks, Resource Allocation and so on. I needed one line per vm. I read up a little bit on powershell (which does seem to be pretty neat) and cooked up the following script:

# Export VM lists in a nice Excel List

$rows = @()
Foreach ($VM in get-vm) {
 $View = $VM | get-view
 $Config = $View.config
 if ($Config.Template) { continue } # Skip templates

 $row = New-Object -TypeName PSObject
 $res = Get-ResourcePool -VM $View.Name

 $row | Add-Member -MemberType NoteProperty -Name ResourcePool -Value $res.Name
 $row | Add-Member -MemberType NoteProperty -Name VM -Value  $Config.Name
 $row | Add-Member -MemberType NoteProperty -Name Hostname -Value $View.Guest.HostName
 $row | Add-Member -MemberType NoteProperty -Name PoweredOn -Value $VM.PowerState
 $row | Add-Member -MemberType NoteProperty -Name Cpu -Value  $Config.Hardware.NumCPU
 $row | Add-Member -MemberType NoteProperty -Name Ram -Value  $Config.Hardware.MemoryMB
 $row | Add-Member -MemberType NoteProperty -Name FullOS -Value $Config.GuestFullName
 $row | Add-Member -MemberType NoteProperty -Name IP -Value $View.Guest.IPAddress
 $row | Add-Member -MemberType NoteProperty -Name Tools -Value $View.Guest.ToolsStatus
 $row | Add-Member -MemberType NoteProperty -Name HWVersion -Value $Config.Version

 Write-Host "VM: $VM" -ForegroundColor blue
 $i = 1
 foreach ($Disk in Get-HardDisk -VM $View.Name)
 {
   $row | Add-Member -MemberType NoteProperty -Name "DiskPath$i" -Value $Disk.Filename
     $CapacityGB =  [math]::Round(([int]$Disk.CapacityKB) / 1024 / 1024)
   $row | Add-Member -MemberType NoteProperty -Name "DiskCapacityGB$i" -Value $CapacityGB
   $row | Add-Member -MemberType NoteProperty -Name "Persistent$i" -Value $Disk.Persistence
   Write-Host "$i"
   $i += 1
 }
 foreach ($j in $i..7)
 {
   $row | Add-Member -MemberType NoteProperty -Name "DiskPath$j" -Value ""
   $row | Add-Member -MemberType NoteProperty -Name "DiskCapacityGB$j" -Value ""
   $row | Add-Member -MemberType NoteProperty -Name "Persistent$j" -Value ""
 }
 $rows += $row
}

$rows | Export-Csv "vms.csv" -NoTypeInformation

I definitely need to dig powershell more. I’ll be able to ditch vbscript once and for all for repetitive Windows admin tasks ;)

0 

13May2010

Books

Posted by Michele Baldessari under: en; life.

0 

12May2010

Hostapd with an ath5k card on Debian Squeeze

Posted by Michele Baldessari under: en; tech.

Last night our Linksys WAP54G suddenly died on us, and no matter how many times I tried resetting it, I was not able to get it back to life. I couldn’t reach its default IP 192.168.1.245 even though I clearly saw that it made ARP requests to check if someone else had this IP on the network. I gave up trying to fix it and forced myself to configure the Atheros Wireless Card I have in my Soekris firewall:

00:11.0 Ethernet controller: Atheros Communications Inc. AR5413 802.11abg NIC (rev 01)

Most of the guides out there are outdated and mention the old non-free madwifi drivers. Nowadays, with recent kernels, things are so much easier: no downloading and no recompiling. Simply edit your /etc/hostapd/hostapd.conf

interface=wlan0
bridge=br0
driver=nl80211
ssid=pupazzo
channel=1
wpa=3
wpa_passphrase=blabla
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
debug=0
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
auth_algs=1

One day, when I’m bored enough, I’ll set everything up without any encryption and tunnel everything through openvpn. Guests will still be able to surf the net but with a very limited speed and without outgoing smtp ;)

Update: you need kernel 2.6.33.2 otherwise errors about tx phy will come up

0 

9May2010

This week

Posted by Michele Baldessari under: en; life.

I knew already that next week will suck. I just got confirmation:

0 

26April2010

Music Library

Posted by Michele Baldessari under: en; tech.

Following a post from lifehacker, I decided to buy the jaikoz software (for 15 GDP). It took 6 whole days and a half of cpu at 100% (welcome to Java *g*), but now a good part of my tags are clean and I have proper artwork. Things won’t look so messed up next time I put some music on my ipod ;)

0 

18April2010

Quebec

Posted by Michele Baldessari under: en; travel.

Over the easter weekend we did an Active Directory migration in Quebec. Lots of work, lots of fun (*g*). Here are a couple of pictures:

0 

18April2010

Ski with the IT

Posted by Michele Baldessari under: en; life.

Had a ski day some weeks ago with the whole italian IT department. Exhausted at the end, since I hadn’t been going for like 7/8 years (excluding a half-day skiing trip with Pietro a few years ago).

Here are our faces in full glory:

I kind of liked going back on the snow. Maybe next year I’ll ask Santa for a new board. My 18-year old Mistral X-59 has served well, but it’s time for a change ;)

0 

13December2009

Krampus in Sterzing

Posted by Michele Baldessari under: en; life.

0 

13December2009

Eclipse on Debian Sid

Posted by Michele Baldessari under: en; tech.

If you get the following error on debian sid (Dec 2009):

!ENTRY org.eclipse.osgi 4 0 2009-12-13 16:37:36.790
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTError: XPCOM error -2147467262
at org.eclipse.swt.browser.Mozilla.error(Mozilla.java:1638)
at org.eclipse.swt.browser.Mozilla.setText(Mozilla.java:1861)
at org.eclipse.swt.browser.Browser.setText(Browser.java:737)

Just add the following to your eclipse.ini:

-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib/xulrunner-1.9.1/xulrunner

3 

Categories

    Books

    Archives

    Search

    Links