To remember is to learn

If you don't write it down somewhere...

Sunday, March 18, 2012

How to get Avanced Network Config with VmWare Player

Check out this link http://www.technazgul.com/2011/01/advanced-network-configuration-using.html

It's still working for version 4 :  VMware-player-4..exe /e .\netcfg

Nice!

Sunday, March 14, 2010

ACCESSdb-v0.9.2, Jquery, Jquery-UI and JQGrid for HTA

HTAs - HTML applications - can be usefull for many a thing.
Mostly they are used as a way to implement admin scripts with feedback, or with the need for some input from the users.

However they can also be used to:
- Create full featured applications
- Create really good looking scripts.
- Create a Web like application when you cannot access, install or manage a WebServer, but have instead access to File Share.

This is because, of course, full CSS and JavaScript support is possible.
However HTAs are usually composed of a single file. Of course, you can have multiple files, but if you want to distribute it or send it, it is not possible.

At the above link is my last saturday night: Jquery, Jquery-UI, JQgrid and Accessdb all integrated into a single file. The point being to demonstrate that it is possible. Tested with IE8.

You can donwload and extract the file JQhta.zip . You will find jqhta2.hta and index.htaAdmnCodes.mdb.

Inside the zip file there will be a jqhta folder and a source folder wich contains all the libraries in their original state, as they are all open source.

jqhta.hta is an HTA application that includes the Jquery 1.3.2 library, jquery-ui plugin V. 1.7.2, JQGrid 3.6.4 plugin, and the ACCESSdb library. All of the libraries are included in the HEAD part of the HTA. CSS files links to external images have been replaced by Base 64 Strings with the content of the files.

All the code in the MAIN section of the file is related to the examples, and there are examples for all the libraries and plug-ins in the file. None of the examples were created by me: they were created from examples available in the sources as the sources provide example files. I just compiled it all into one big happy HTA.

To do something else with it all you have to do is delete all that is inside the
section and just write something else.

Size is of course large, for an HTA: 547kb, just the libraries and the basics. The example amounts to 589k.

So here it is, it is free to use, or too look at it and download the libraries and build it yourself.

A note to the less cautious: An full HTA application is a very dangerous thing: very difficult to implement any kind of access controls, application wise, because the code is freely accessible and modifiable by the user. No security is therefore possible and therefore in non absolutely secure / trustworthy environments it could be a disaster!

Sunday, February 21, 2010

And how to propely shutdown solaris/open solaris?

Answer is enter the command

init 0

Also, a really good explanation for this is here.

Friday, January 1, 2010

How to build a data storage and VM Server using comodity hardware and free software

Requisites:

1) RAID protection for data
We'll use ZFS as filesystem. RAIDZ is somewhat akin to RAID5 and should provide better performance than other types of software RAID5 with several advantages that we'll discuss later.

2) UPS power outage protection
UPSes are expensive, and we're keeping our costs down. ZFS RAIDZ works eleminates the RAID5 loophole. This won't replace an UPS for all it is needed for, but we'll greatly improve the odds of not data corruption for files directly stored on the ZFS filesystem in the event of sudden power loss.

3) Controlled costs
ZFS is available on Linux trough xxxxx or natively in Open Solaris. Both cost zilch and can be used professionaly without costs.
Because cost is a factor, storage host and VM host should be the same hardware so direct access to hard disks by VM should be supported.

4) Ease of use and management and multiple OS virtualization ability
Even if setup is not a walk in the park, usage and maintnance should be easy. Also the virtualization environment should allow for windows, linux, solaris and as many of other OSes as possbible. This means Vmware, Xen Server, or xxxxx.



At the time i bought the parts to build the computer i did not buy a motherboard + cpu combination that allowed for direct hardware access using vmware as Intel Directed I/O is needed. Alas, one must go around this. In fact going around is cheaper.

Hardware used:
- Asus P5Q3 motherboard
- Intel Quad Core Q9550 cpu
- 8gb DDR3
- 4x 1TB HDD
- 1x 80gb old HDD (original plan was to use 16gb USB pen, but was unable to create a datastore on a USB pen.)
- Power supply, silent box, fanless cpu cooler.

The plan:

1) Install VMWARE 4.0 ESXi on the bare metal.

1.1) Install VMWARE 4.0 ESXi to the 80 GB HDD

2) Install Open Solaris 2009.06

OpenSolaris is being prefered to linux zfs support because of performance. I have read everywere about how much peformance is lost so we'll stick to linux. However, on the Open Solaris side, there is no paracirtualization support in VMWARE ESXi and as far as i can tell, no support for VMNET3 virtual NIC, so i don't really know wich one is better, but have bet on Open Solaris anyway.

Moving on.

2.1) Create VM to install Open Solaris into
First create a new virtual machine. 1 GB RAM should be enough and i don't see the advantage of more than 1 cpu, performance wise. No need for a large hard drive, too, 5gb should be enough as the only job for OpenSolaris will be to run the ZFS filesystem, and to offer an ISCSI target for ESXi to connect to and eventually offer shares for access to files stored.

2.2) Installation itself
No special requirements for installing. Just next, next, next, answering the several queries should be fairly easy.

2.3) Installing VMWARE Tools on OpenSolaris 2009.06
There are no vmware tools available for Open Solaris. However the package available for Solaris 10 should do fine, with some modifications.

unzip the vmware tools:

gunzip vmware-solaris-tools.tar.gz

untar the vmware tools:

tar -xf vmware-solaris-tools.tar

now, execute the installer:

./vmware-install.pl

Just press enter on every query.

you will get an error:

Unable to copy the source file
/user/lib/vmware-tools/configurator/XOrg/7.4/vmware_drv.so to the destination
file /usr/X11/lib/modules/drivers/vmware_drv.so

what you need to do is the following:

mkdir /usr/lib/vmware-tools/configurator/XOrg/7.4
cp /usr/lib/vmware-tools/configurator/XOrg/7.1/* /usr/lib/vmware-tools/configurator/XOrg/7.4

then re-execute the installer:

./vmware-install.pl

Again, just press enter on any query.

Now, VMWARE Tools should be installed. This will add improvements to performance.

Next, restart Open Solaris.

Voilá, open solaris is now installed, with VMware Tools loaded. Nice.

Sunday, May 18, 2008

How to map persistent smb shares under linux

1 - How to map a share under linux command line.

I - Everything in Linux is all about the filesystem. So, first create a folder to wich later we will map the windows share:

cd /mnt
sudo mkdir myshare

Naming the folder you create on the linux machine with the windows share name is probably a good idea as one will be redirecting to the other.

II - here is the command to mount the share. Remember, if you want to be able to write, delete, modify files and folders in the windows machine the WINDOWSUSERNAME and WINDOWSPASSWORD you are supplying must have those permissions.

sudo mount -t cifs //IPOFTHEWINDOWSBOX/myshare /mnt/myshare -o username=WINDOWSUSERNAME,password=WINDOWSPASSWORD

III - Now problem is this mapping will be forgotten on next reboot. So how to make sure the mapping is performed upon poweron?

a) First create a hidden file (with a dot on the beginning) with the windows username and apssword:

Tuesday, March 11, 2008

Tif and BMP....

@echo off
:start
cls
@echo OPEN TIFF WITH:
@echo.
@echo 1 - Office Image
@echo 2 - Image Fax Viewer
@echo.
set /p userinp=Choose an Option (1-2) and press ENTER:
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto 1
if "%userinp%"=="2" goto 2


echo invalid choice
goto start
:2
call c:\software\tif\sanurifv.bat
pause
goto end
:1
call c:\software\tif\menu2.bat
goto end


:end
pause>nul

Sunday, March 9, 2008

CD-R drive or CD-RW drive is not recognized as a recordable device

CD-R drive or CD-RW drive is not recognized as a recordable device
Article ID
:316529
Last Review:October 16, 2007
Revision:3.0
http://support.microsoft.com/kb/316529/