Bypass SBS 2008 Memory Requirements

For anyone looking to work with SBS 2008 in a dev environment but unable to provision VM’s with 4gb of ram you may be interested in this little reg key..

I see lots of posts around the net asking for ways to bypass the memory requirements but not many with answers. I stumbled upon this one recently which has finally allowed me to get some SBS 2008 dev work done.

When installing SBS 2008 once you are past the initial install and are up to the first page of the configuration if you hit shift+F10 to bring up a command prompt then launch regedit you can edit the following key to allow the install to continue even though your machine doesn’t meet the requirements.

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SmallBusinessServer\Setup]
“SkipReq”=”RamRequirement”

This may also be useful for those of you running on the bare minimum but with an onboard videocard which is consuming some of the ram pushing your usable ram down.

Hope this helps a few people :)

mRemote

Just a quick post for anyone looking for mRemote downloads and/or source code as the latest wasn’t easily found on their page.

mRemote as their website says is “a full-featured, multi-tab remote connections manager”. I use it for accessing RDP/VNC/SSH services on a variety of hosts so that I can keep it all neat and in one interface. However the developer has since merged the project into a paid for application so at some point the current 1.5.0 may no longer be on his site.

For now I have uploaded the current latest source code and binary for anyone looking for a copy. Long live mRemote. However I will note the paid for application is pretty good so if your feeling generous grab a copy :)

  mRemote_1.50_Setup_EN.exe (2.5 MiB, 435 hits)

  mRemote_1.50_Source.7z (4.3 MiB, 472 hits)

*UPDATE*

Check out mRemoteNG http://www.mremoteng.org as an ongoing build of mRemote by another author.

mRemote is a full-featured, multi-tab remote connections manager.

PHP WMI Library for Linux

I’ve just released a WMI/PHP library which will allow you to easily WMI query Windows machines from your Linux server via PHP. It is somewhat of an extension of the CactiWMI project as it used that code base as a reference for the query and processing of the returned data. Whilst there are a number of libraries in existence for this purpose on Windows there appeared to be none for when running PHP on Linux.

So why has this all come about. In my job I’ve been working on a small helpdesk type application written in PHP. The idea being that it presents all the information about the user, computer and helpdesk ticket that we are working on in one place. It also provides a quicker interface for searching information than the existing systems on their own. For this I needed to be able to hook into Active Directory, the MSSQL job tracking DB and of course WMI data for the remote PC. All this from the Linux based server.

So I branched off some code from the CactiWMI project and initially wrote it as a simple wmi() type function to run basic queries against remote machines. This quickly became a bit of a pain as I needed to add more arguments to allow filters and then more code to decide if a filter had been supplied or not etc so dumped it and rewrote it into a WMI object.

Now what we have is a reasonably simple library which you can include into your project, create the WMI object and throw some queries at hosts. The data returned at the moment is a little rough as its just a numerically indexed multi dimensional array but should make iteration very easy. I’ll be looking for suggestions as to what I can improve as it’s the first library like this I have had to write and I’ve probably made plenty of rookie mistakes.

I’ve attached a copy of the current stable release and an example file which should get people started until I can add some documentation. I may look at releasing the helpdesk app as well as it’s come in quite useful :)

SVN Repository is located here http://svn.parkingdenied.com/PHPWMILib/

  PHPWMILib-0.0.2.r4.tar.gz (13.3 KiB, 1,063 hits)

  example.zip (569 bytes, 1,020 hits)

Automated VirtualBox + LVM Snapshot VM Provisioning

Just a quick follow-up to my previous post about using LVM to clone logical volumes to create new VM’s. I’ve written up a quick script to help automate the process which allows you to rapidly deploy a fleet of test VM’s without having to mess about.

The script is attached below and requires PHP. Configure the config options within the script and then to provision a new VM you simply sudo ./makevm.php <vmname> and it will take care of everything.

  • Creates the snapshot of the original logical volume
  • Sets the permissions on the device so that the user can access it
  • Creates the raw VMDK file and registers it with VirtualBox
  • Creates the base VM with the name provided
  • And finally it configures the VM to use the correct disk and network setting etc

That’s all there is to it :)

  makevm.tar (10.0 KiB, 560 hits)

0.0.6 Release of CactiWMI

I posted this on the forums some time ago and realised I had not posted here. This is the latest version, the mini change log is below.

  • Update templates to suit new input method
  • Backwards compatibility for old argument input method
  • Overhaul how arguments are passed to wmi.php
  • Debug mode via console option
  • Add support for alternate namespaces
  • Use isset() instead of is not null
  • Prevent passwords from showing up in process list
  • Fix data template MIN & MAX
  • Enterprise Vault Templates

I have added support for additional namespaces and overhauled how  input arguments are passed to support this. As you can see below the cmd line help details how input is now passed.

Usage:
-h <hostname>         Hostname of the server to query.
-u <credential path>  Path to the credential file. See format below.
-n <namespace>        What namespace to use. (optional, defaults to root\CIMV2)
-w <wmi class>        WMI Class to be used.
-c <columns>          What columns to select. (optional, defaults to *)
-k <filter key>       What key to filter on. (optional, default is no filter)
-v <filter value>     What value for the key. (required, only when using filter key)
-d <debug level>      Debug level. (optional, default is none, levels are 1 & 2)

All special characters and spaces must be escaped or enclosed in single quotes!

Example: wmi.php -h 10.0.0.1 -u /etc/wmi.pw -w Win32_ComputerSystem -c PrimaryOwnerName,NumberOfProcessors -n ‘root\CIMV2′

Password file format: Plain text file with the following 3 lines replaced with your details.

username=<your username>
password=<your password>
domain=<your domain> (can be WORKGROUP if not using a domain)

In addition to this there is now no longer any need for additional PHP files. The passwords are stored in a separate file and called via passing the path. This prevents passwords showing up in your process list and allows you to secure it further by limiting access to the password file to the cacti user.

To ease the upgrade process backwards compatibility has been maintained however there is one gotcha. You will still need to update your templates to point to the new password file instead of the reference to the key pair in wmi-logins.php. Aside from this the old templates will all work.

So basically this version is a bit cleaner, adds a few key features, improves security and lays the foundation for further feature upgrades. As per usual the download is attached to this post and any fault tickets can be lodged on my Mantis bug tracker page (Link) and the subversion repository in the usual spot (Link).

  CactiWMI-0.0.6.r101.tar.gz (132.1 KiB, 2,802 hits)