Tuesday, December 28, 2010

esxi raw disk pass through

As a follow up to this post, I have migrated to ESXi.

Here's how to pass through drives as raw in ESXi:

(from the SSH tech support console)

# fdisk -l

Have a look at all the drives on the system, then check how they map to "vml" descriptors:

# ls /dev/disks/ -l

Hopefully you can see something like this:

vml.01000000002020202020202020202020203956533030524859535433313530 -> t10.ATA_____ST31500341AS________________________________________9VS00RHY

Now create a spot for the mappings... such as: /vmfs/volumes/system/rdms/

# cd /vmfs/volumes/system/
# mkdir rdms
# cd rdms

Then create the mapping:

# vmkfstools -z /vmfs/devices/disks/vml.010000000020202020202020202020202039565330344d4254535433313530 rdm02.vmdk -a lsilogic

You should end up with a nicely formatted .vmdk file:

# cat rdm01.vmdk
# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=fffffffe
parentCID=ffffffff
isNativeSnapshot="no"
createType="vmfsPassthroughRawDeviceMap"

# Extent description
RW 2930277168 VMFSRDM "rdm01-rdmp.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "7"
ddb.longContentID = "b2fb0907ebc87f39d99073f1fffffffe"
ddb.uuid = "60 00 C2 9b 29 b5 6d ec-bd 59 29 42 64 db 45 46"
ddb.geometry.cylinders = "182401"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"


Now head back to the GUI and add the harddrive to the desired VM.

( Thank you http://www.vm-help.com/esx40i/SATA_RDMs.php )

Thursday, October 21, 2010

Windows Home Premium (Vista) username troubles

The trouble with Windows Vista Home Premium is that it doesn't allow access to the local users and groups snap-in. This means that usernames expected by network devices (other computers, i.e. file servers) cannot be specified for users whilst keeping "pretty names" such as "Joe Blogs" (username: joeb).

Solution is to use: Netplwiz.exe in system32.

Sunday, October 17, 2010

Samba / Winbind auth to ADS 2008 R2

I'd been having problems connecting CentOS 5.5 to a Active Directory 2008 R2 domain.

1) use the samba3x packages

Winbind would refuse to show entries in getent passwd, and Samba would not allow domain users access to shares. There were problems observable in a packet trace... for example Wireshark would decode STATUS_LOGON_FAILURE in SMB transactions.

Anyway, it turns out that you MUST specify a "idmap config " for the domain! Otherwise UID/GID mappings fail and then users cannot login.

2) use idmap config configuration options

Resulting configuration looks like this:

[global]
log level = 0

workgroup = ad
password server = ad-box-1.ad.local ad-box-2.ad.local
realm = AD.LOCAL
security = ads
encrypt passwords = yes

idmap uid = 1500-999999
idmap gid = 1500-999999
idmap backend = ad

idmap config AD : backend = ad
idmap config AD : range = 1500-999999

template shell = /bin/bash

ldap ssl ads = no

preferred master = no
local master = no
domain master = no

winbind use default domain = true
winbind offline logon = true
winbind nss info = rfc2307
winbind enum users = yes
winbind enum groups = yes
winbind separator = +

server string = File server


[temp]
comment = samba test server tmp directory
path = /tmp
valid users = @AD+Administrators
read only = No
writeable = Yes
guest ok = No
browseable = Yes

Wednesday, September 29, 2010

verify timezone data in unix

With daylight savings approaching...

> /usr/sbin/zdump -v /etc/localtime | grep 2010

/etc/localtime Sat Apr 3 15:59:59 2010 UTC = Sun Apr 4 02:59:59 2010 EST isdst=1 gmtoff=39600
/etc/localtime Sat Apr 3 16:00:00 2010 UTC = Sun Apr 4 02:00:00 2010 EST isdst=0 gmtoff=36000
/etc/localtime Sat Oct 2 15:59:59 2010 UTC = Sun Oct 3 01:59:59 2010 EST isdst=0 gmtoff=36000
/etc/localtime Sat Oct 2 16:00:00 2010 UTC = Sun Oct 3 03:00:00 2010 EST isdst=1 gmtoff=39600

> /usr/sbin/zdump -v /etc/localtime | grep 2011

/etc/localtime Sat Apr 2 15:59:59 2011 UTC = Sun Apr 3 02:59:59 2011 EST isdst=1 gmtoff=39600
/etc/localtime Sat Apr 2 16:00:00 2011 UTC = Sun Apr 3 02:00:00 2011 EST isdst=0 gmtoff=36000
/etc/localtime Sat Oct 1 15:59:59 2011 UTC = Sun Oct 2 01:59:59 2011 EST isdst=0 gmtoff=36000
/etc/localtime Sat Oct 1 16:00:00 2011 UTC = Sun Oct 2 03:00:00 2011 EST isdst=1 gmtoff=39600


Perfect : )

Saturday, August 7, 2010

GnuCash reports with zero values?

If you do a report in GnuCash for accounts with currency x (say AUD), but the GnuCash default for reports is currency y (say USD), then you will get an error message about zero values, or a report with all zeros.

The solution is to alter the report's currency to match the account's currency.

Why? Because the accounts really do have zero balance in currency y - but that's probably not what you intended to report on. Really you wanted a report on currency x.

Note: you can change the default currency for reports in the preferences.

Monday, August 2, 2010

openSUSE distribution upgrades

To go from openSUSE 10.3 -> 11.0 -> 11.1 -> 11.2 -> 11.3 etc. you can use zypper. This does it all from the Internet, so it's nice and easy (in theory).

At a very high level this is the procedure:

(for 11.1 -> 11.2)

zypper ar http://download.opensuse.org/distribution/11.2/repo/oss/ openSUSE-11.2-oss
zypper ar http://download.opensuse.org/distribution/11.2/repo/non-oss/ openSUSE-11.2-nonoss
zypper ar http://download.opensuse.org/source/distribution/11.2/repo/oss/ openSUSE-11.2-srcoss
zypper ar http://download.opensuse.org/update/11.2/ openSUSE-11.2-update



I generally upgrade the tools before doing the "dup" command, as I had a range of issues doing 10.2 to 10.3 upgrades:

zypper in zypper rpm

Then I go forth and:

zypper dup


I did have tonnes of problems going from 10.2 to 10.3 due to changes in libzypper. I ended up force installing a whole bunch of rpm's to make it work. Messy, but got there in the end.