Tuesday, January 3, 2017

Finding Your Public IP with Telnet (CLI)

Her I’m going to show you a little trick off a way to get you public IP when you just have a command line interface.

This can be done in any equipment with telnet like a:

  • Router
  • Switch
  • Linux Server
  • etc

 

How To Do It – Site: Check IP

The webpage:

gives out you public IP on a Browser, so what we are going to do is to open the Web Page on the HTTP Port (Port 80), and get a response from the webpage with you Public IP.

This Web Page does not need you to send HTML to pretend that your telnet is a Web Browser (like the IP Echo Website bellow)

To do it:

telnet checkip.dyndns.org 80

or

telnet 216.146.38.70 80

if you don’t have DNS configured, and then do as soon as it connects press:

  • ENTER (one or two times)

and it will give you the output bellow.

image

 

 

How To Do It – Site: IP Echo 

The webpage:

gives out you public IP on a Browser, so what we are going to do is to open the Web Page on the HTTP Port (Port 80), and then send some HTML code to pretend that your telnet is a Web Browser to get the HTML response from the webpage with you Public IP.

To do it:

telnet ipecho.net 80

or

telnet 146.255.36.1 80

if you don’t have DNS configured, and then paste the following HTML code

GET / HTTP/1.1
Host: ipecho.net
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)

and press Enter, and you get this:

01

rigth here you can see you IP.

 

See Public IP on a Browser

In both methods/sites if you want, you can see the IP in a more pretty way, just copy the HTML code the Web Page returned (this output is from the IP Echo site):

02

to a text file with the “.html” extension in the computer you are using, I named mine index.html

03

save it and double click in the index.html which will open on your default browser, and show the HTML you copied from the command line:

04

Sunday, December 11, 2016

Raspberry Pi/PC - NAS: OpenMediaVault

Today I’m going to show you how to install and configure OpenMediaVault which is a very cool platform that allow you to make a NAS out of a Raspberry Pi or a PC and add a lot of services on top of that, these are either already builtin ou added via the many plugins that you can install with just a click.

Index

  • Install - PC / VM
  • Install - Raspberry Pi
  • Log In
  • System Basic SetUp
  • Storage SetUp
  • Users SetUp
  • Service SetUp – SMB/CIFS
  • Service SetUp – Other Services (Compact)

 

NOTE

On the Web Interface every change needs to be:

SAVED and APPLIED

or else the changes don't take efect

 

Install – PC / VM

 

Installing OMV

Go to:

    https://sourceforge.net/projects/openmediavault/files/3.0beta/

and get the iso, in my case i got this:

    openmediavault_3.0.36-amd64.iso   
   
for a real PC you must burn it to a CD and put it in the CD Drive and for a VM you just select
the ISO image.

Now start you PC/VM and boot the CD/ISO, then series of BLUE SCREENS will show and you should  configure it to your specific location, bellow  you have the default values OMV gives you.
   
Use Tab and Arrow Keys to move arround in
each screen

    ## BLUE SCREENS ##

  • Select Language | English
  • Select your location | United States
  • Keymap to use | American English
  • Configure the Network | Hostname: openmediavault
  • Configure the Network | Domain name: local
  • Set up users and passwords | Root password:********
  • Set up users and passwords | Re-enter password to verify:********
  • Configure the clock | Select your time zone: Eastern


    Wait...

  • Configure the package manager | Debian archive mirror country: United States
  • Configure the package manager | Debian archive mirror: ftp.us.debian.org  
  • Configure the package manager | HTTP proxy information: <blank>

    Wait...

  • Install the GRUB boot loader on a hard disk | Device for boot loader installation: /dev/sda

    Wait...

  •     Configuring resolvconf | Installation complete: <Continue>

    Now it boot up and starts OpenMediaVault showing you the CLI

 

Installing OMV Extras

The OMV Extras plugins adds multiple plugins repositories that make installing additional plugins very easy.

Download the plugin OMV Extras plugin here:

    http://omv-extras.org/joomla/index.php/guides

download the .deb for you version:
 
     For OMV 2.x (stoneburner) - openmediavault-omvextrasorg_latest_all.deb
     For OMV 3.x (erasmus) (STILL BETA) - openmediavault-omvextrasorg_latest_all3.deb

First find the IP your OpenMediaVault obtained via DHCP on the CLI

    openmediavault login: root
    Password: ********

    ifconfig

     eth0
     ...
     inet addr: 192.168.1.99    !--> OMV_IP
     ...

Now do the following steps:

  • On a Browser: http://<OMV_IP>
  • Go to the plugin tab in OMV's web interface
  • Upload the file.
  • Select the newly uploaded plugin openmediavault-omvextrasorg
  • Click on Install. Refresh page.
  • Go to the plugin tab and click Check.

 
from here on the PC version is indistinguishable from the Raspberry Pi version.

If you had any trouble check the following video, it has the procedure above and more:

 

Install - Raspberry Pi

Go to:

and download an image, then you install it with Win32 Disk Imager on your Raspberry Pi SD Card, like every other raspberry Pi Image.

00

 

Log In

The IP was assigned via DHCP, I found the IP on my internet router on the DHCP section  (the name associated with the IP was “raspberry” / “OMV3”)

01.1

WEB INTERFACE:
- username = admin
- password = openmediavault

CONSOLE/SSH:
- username = root
- password = openmediavault

 

System Basic Setup

First lets change the Web Interface password:

01

This does not change the SSH password, if want to change it you need to access it via SSH with a client like Putty

root@raspberrypi:~# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

Bellow I activate the HTTPS option, and force it to be the only available web access, to garante a secure access (this step is optional).

Enabling HTTPs requires a certificate, so first we will have to create it:

02

Creating a certificate:

03

Enable HTTPS and force HTTPS to be the only option (“Force secure connection only”) :

03.1

Set time with via NTP server (this step is optional):

04

Change Hostname (this step is optional):

05

SetUp a private IP Adress (this step is optional):

06

07

 

Storage Setup

First lets wipe the Disk clean if it already has a filesystem (mine is a USB Flash Disk) :

08

Now let’s create a filesystem (disk with an EXT4 partition):

09

Now we mount the filesystem we created above:

10

 

Users Setup

Now we setup a user to use with the services we are going to configure later:

11

This user is automatically put in the users Group:

12

 

Service Setup – SMB/CIFS

Here we are going to setup the SMB/CISFS service (aka Windows Shared Folders).

First we add a folder to the filesystem:

13

Next we make this folder available via SMB/CIFS.

First we enable the service:

14

and next we add the previously created folder to SMB/CIFS:

15

the final step is to setup the access permissions to the folder:

16

Now let’s test the access via SMB/CIFS to the created folder.

17

18

19

 

Service SetUp – Other Services (Compact)

The setup of other the services is very similar to the setup of SMB/CIFS above, so lets take a more compact aproach

### FTP Service (Built In) ###
Services >> FTP >> Settings | Enable                   !--> Activate Service
Services >> FTP >> Shares | (v)                            !--> Add Folder to Service
Services >> FTP >> Shares | (Magnifying Glass)   !--> Define permissions

 

### TFTP Service (Built In) ###
Services >> TFTP >> Settings | Enable                   !--> Activate Service
Services >> TFTP >> Shares | (v)                            !--> Add Folder to Service
Services >> TFTP >> Shares | (Magnifying Glass)   !--> Define permissions
Services >> TFTP >> Allow new files                     !--> Allow new files creation

 

### RSync Server (Built In) ###
Rsync >> Server | Enable                                            !--> Activate Service
Rsync >> Server >> Modules >> Shared Folder | (v)   !--> Add Folder (Source)
Rsync >> Server >> Modules >> Shared Folder | (Magnifying Glass) !--> Define user permitions

!-- Syncing with the OMV Rsync Server – Remote to Local Folder --
rsync -avz -e ssh remoteuser@remotehost:/remote/ /local   

!-- Syncing with the OMV Rsync Server – Local to Remote Folder --  
rsync -avz /local/ -e ssh remoteuser@remotehost:/remote     

 

### BitTorrent Client (PlugIn) ###
Download your torrents directly to you OpenMediaVault and access them via the
other services (ex: SMB/CIFS | MiniDlna | Plex | etc).

System >> Network >> Plugins                                             !--> Install Plugin
- Section: Downloaders
- Plugin : openmediavault-transmissionbt 3.0.9
- Select Plugin + Install

Services >> BitTorrent >> Settings | Enable                          !--> Activate Service
Services >> BitTorrent >> Files and Locations | Download   !--> Add+Enable Done Folder

Services >> BitTorrent >> RPC | Enable                                !--> Enable Web Client
Services >> BitTorrent >> RPC | Port: 9091                            !--> Web Client TCP Port
Services >> BitTorrent >> RPC | Username                           !--> Web Client Username
Services >> BitTorrent >> RPC | Password                            !--> Web Client Password


To use the BitTorrent WebClient just go to:

 

### MINI DLNA (PlugIn) ###
This allows you to access/stream you
media files to you TV or Mobile device

System >> Network >> Plugins                               !--> Install Plugin
- Section: Multimedia
- Plugin : openmediavault-minidlna 3.3.4
- Select Plugin + Install

Services >> DLNA >> Settings | Enable                   !--> Activate Service
Services >> DLNA >> Shares | (v)                            !--> Add Folder to Service
Services >> DLNA >> Shares | (Magnifying Glass)   !--> Define permitions

 

### Plex Media Server (PlugIn) ###

!-- Install and Configure --
System >> OMV-Extras | Plexmediaserver: Edit+Enable              !--> Activate Repository

System >> Network >> Plugins                                                    !--> Install Plugin
- Section: Multimedia
- Plugin : openmediavault-plexmediaserver 3.7
- Select Plugin + Install

Services >> Plex Media Server >> Settings | Enable                   !--> Activate Plex Server
Services >> Plex Media Server >> Settings | Database Volume  !--> Pick Filesystem
Services >> Plex Media Server >> Plex Web Client                    !--> Local Plex Client

The Local Plex Client allow you to play you
media on you browser locally on you LAN, but
if you want to make it available on the internet
just create an account at:

    https://www.plex.tv/

Clic on the message at the top of the
Local Plex Client:

    "An unclaimed media server has been found on your network. Claim it now"

and click on "Claim Server"
 
If this message dos not show, just go to:

   Settings >> Server >> Claim Server

and add the user and password of the account
you created online
 
Now you can play the media on you disk from
anywer in the internet

!-- Play Media - On The internet --
https://www.plex.tv/ + LAUNCH

!-- Play Media - On The LAN --
Services >> Plex Media Server >> Plex Web Client

 

### Remote Desktop - RDP (PlugIn) ###
Remote desktop plugin for OpenMediaVault. Installs xfce4 minimal desktop environment
and rdp server.

System >> Network >> Plugins                                        !--> Install Plugin
- Section: Network
- Plugin : openmediavault-remotedesktop 3.6
- Select Plugin + Install

Services >> Remote Desktop >> Port: 3389                      !--> Default Port
Services >> Remote Desktop >> Encription Level: Low   !--> Default Encription

 

### USB Backup (PlugIn) ###
The new plugin ‘USB Backup’ can be used to automatically synchronise a shared
folder to an external USB storage device when the USB stick is plugged in.

System >> Network >> Plugins                                                   !--> Install Plugin
- Section: Multimedia
- Plugin : openmediavault-usbbackup 3.2.12
- Select Plugin + Install

Services >> USB Backup >> Settings | +Add                               !--> Add Job
Services >> USB Backup >> Settings | Enable                             !--> Activate Service
Services >> USB Backup >> Shared Folder | (v)                          !--> Add Folder (Source)
Services >> USB Backup >> Shared Folder | (Magnifying Glass) !--> Define user permitions
Services >> USB Backup >> Device                                             !--> Select USB Flash (Destination)

 

### OpenVPN (PlugIn) - UNTESTED ###
This is AWSOME OpenMediaVault can even have
a VPN Server in it's services for remote/secure
access to you files

This is AWSOME OpenMediaVault can even
have a VPN Server in it's services for
remote/secure access to you files

System >> Network >> Plugins                                                      !--> Install Plugin
- Section: Remote
- Plugin : openmediavault-openvpn 3.0.4
- Select Plugin + Install

Services >> OpenVPN >> Settings | Enable                                    !--> Activate OpenVPN
Services >> OpenVPN >> Settings | Public address: <Pub IP>       !--> Your Public IP
Services >> OpenVPN >> Settings | DNS servers(s): <IP1>;<IP2>   !—> DNS Server

 

### Shell In a Box (SSH via Web UI) ###
Web based SSH client to the local Open Media Vault

System >> Network >> Plugins
- Section: Administration
- Plugin : openmediavault-shellinabox 3.4
- Select Plugin + Install

Services >> Shellinabox >> Enable


To use the Web SSH Shell:

Services >> Shellinabox >> Web Client
 
or

 http://<Your_OpenMediaVault_IP>:4200
 

### Wake On Lan (WOL) ###
Plugin to send WAKE-ON-LAN magic
to wake a system at using rtcwake
and wakeonlan.

System >> Network >> Plugins
- Section: Administration
- Plugin : openmediavault-wol 3.1
- Select Plugin + Install

Services >> WOL >> System | +Add                            !--> Add Machine
- Name            : <Machine Name>
- MAC Address    : <Machine MAC>
- IP Address    : <Machine IP - Optional>

To use the Web SSH Shell:

Services >> WOL >> System | Select Machine +Send

Enjoy Smile

Related links:

- OpenMediaVault on VMWARE: https://www.youtube.com/watch?v=ox69xQaOfXM

Tuesday, October 11, 2016

VMWare - CLI: Convert Virtual Disks - Thin to Thick

Here I’m going to show you how to convert Thin Virtual Disk (dynamic space allocation up to the provisioned size) to a Thick Virtual Disk (all space provisioned at creation).

The Thick Virtual Disk does not save space, but it is safer because the space is already allocated, there are no surprises. With a Thin Virtual Disk you migth run out of space in the Datastore and the Disk can’t grow up to the provisioned size.

thin-provisioning[6]

!-- Log in via SSH (must activate first) --
# ssh root@192.168.1.45
Password: *******


!-- List DataStore Disks (if needed) --
# ls -lh /vmfs/volumes/


!-- Access the VM Folder --
# cd /vmfs/volumes/DS-VM-DISK/UBUNTU-VM/
# ls -lh

total 16779272
-rw-------    1 root  root   16.0G Oct 10 00:41 UBUNTU-VM-flat.vmdk
-rw-------    1 root  root    8.5K Oct 10 00:41 UBUNTU-VM.nvram
-rw-------    1 root  root     473 Oct  9 22:28 UBUNTU-VM.vmdk
-rw-r--r--    1 root  root       0 Oct  9 22:25 UBUNTU-VM.vmsd
-rwxr-xr-x  1 root  root    2.6K Oct 10 00:41 UBUNTU-VM.vmx
-rw-r--r--    1 root  root  187.4K Oct 10 00:41 vmware.log


!-- Convert the Virtual Disk - Thin to Thick (Easy Way) --
# vmkfstools -j UBUNTU-VM.vmdk
Inflate: 100% done.

This option converts a thin virtual disk to Eager Zeroed Thick,
you have the same conversion done bellow the "Hard Way"

 

!-- Convert the Virtual Disk - Thick to Thin (Hard Way) --

image

# vmkfstools -i UBUNTU-VM.vmdk -d zeroedthick UBUNTU-VM_thick.vmdk
Destination disk format: VMFS zeroedthick
Cloning disk 'UBUNTU-VM.vmdk'...
Clone: 100% done.

or

# vmkfstools -i UBUNTU-VM.vmdk -d eagerzeroedthick UBUNTU-VM_thick.vmdk
Destination disk format: VMFS eagerzeroedthick
Cloning disk 'UBUNTU-VM.vmdk'...
Clone: 100% done.

!-- Replace the Thin with Thick (Virtual Disks) (Hard Way) --
# rm UBUNTU-VM-flat.vmdk
# mv UBUNTU-VM_thick-flat.vmdk UBUNTU-VM-flat.vmdk
# rm UBUNTU-VM_thick.vmdk

 

!-- All Looks as When We Started --
# ls -lh
total 3246088
-rw-------    1 root  root  16.0G Oct 10 23:59 UBUNTU-VM-flat.vmdk
-rw-------    1 root  root   8.5K Oct 10 23:59 UBUNTU-VM.nvram
-rw-------    1 root  root    471 Oct 10 23:57 UBUNTU-VM.vmdk
-rw-------    1 root  root      0 Oct 10 16:46 UBUNTU-VM.vmsd
-rw-------    1 root  root   2.5K Oct 10 23:59 UBUNTU-VM.vmx

Now you can power the VM :)


To Reverse It Check Out:

VMWare - CLI: Convert Virtual Disks - Thick to Thin


Here I show you how to convert  Thick Virtual Disk (all space provisioned at creation) to a Thin Virtual Disk (dynamic space allocation up to the provisioned size).

This is a good way to save space because with a Thin Virtual Disk, only occupies the space of the files It holds at the time.

Warning with a Thin Virtual Disk you migth run out of space in the Datastore and the Disk can’t grow up to the provisioned size.

thin-provisioning

!-- Log in via SSH (must activate first) --
# ssh root@192.168.1.45
Password: *******


!-- List DataStore Disks (if needed)--
# ls -lh /vmfs/volumes/


!-- Access the VM Folder --
# cd /vmfs/volumes/DS-VM-DISK/UBUNTU-VM/
# ls -lh

total 16779272
-rw-------    1 root  root   16.0G Oct 10 00:41 UBUNTU-VM-flat.vmdk
-rw-------    1 root  root    8.5K Oct 10 00:41 UBUNTU-VM.nvram
-rw-------    1 root  root     473 Oct  9 22:28 UBUNTU-VM.vmdk
-rw-r--r--    1 root  root       0 Oct  9 22:25 UBUNTU-VM.vmsd
-rwxr-xr-x  1 root  root    2.6K Oct 10 00:41 UBUNTU-VM.vmx
-rw-r--r--    1 root  root  187.4K Oct 10 00:41 vmware.log


!-- Convert the Virtual Disk - Thick to Thin --
# vmkfstools -i UBUNTU-VM.vmdk -d thin UBUNTU-VM_thin.vmdk
Destination disk format: VMFS thin-provisioned
Cloning disk 'UBUNTU-VM.vmdk'...
Clone: 100% done.


!-- Replace the Thick with Thin (Virtual Disks) --
# rm UBUNTU-VM-flat.vmdk
# mv UBUNTU-VM_thin-flat.vmdk UBUNTU-VM-flat.vmdk
# rm UBUNTU-VM_thin.vmdk


!-- All Looks as When We Started --
# ls -lh
total 3246088
-rw-------    1 root  root  16.0G Oct 10 23:59 UBUNTU-VM-flat.vmdk
-rw-------    1 root  root   8.5K Oct 10 23:59 UBUNTU-VM.nvram
-rw-------    1 root  root    471 Oct 10 23:57 UBUNTU-VM.vmdk
-rw-------    1 root  root      0 Oct 10 16:46 UBUNTU-VM.vmsd
-rw-------    1 root  root   2.5K Oct 10 23:59 UBUNTU-VM.vmx

Now you can power the VM :)

To Reverse It Check Out:

Sunday, September 18, 2016

Cisco - Upgrade Switches From Tar (Bin+Html)

To upgrade a Cisco Switch from a .tar (IOS and Html - Management Web Page), just start TFTP64:

image

and use the command:

  • archive download-sw xxxxxxxxxx

on the switch command line, this will download and install the .tar, and set it to boot next time.

I normally use is the my “Main Command” this should work in most cases, but you have other options like the ones shown in “Command Options”, that you can use “as is”, or by combining them like the “Main Command”.

 

Main Command

Download & Install - Overwrite & Different Feauture Set
============================================
Download from TFTP server and unpack tar
and install it (IOS and Html - Management Web Page)
even if the current and the new image have diferent
feature sets (ex: ipbase vs ipservices)

archive download-sw /overwrite /allow-feature-upgrade tftp://192.168.1.230/c3560-ipservicesk9-tar.150-2.SE.tar

OPTIONS USED
/allow-feature-upgrade - update/downgrade to
                                    different feature set
                         
/overwrite                   - overwrite everything in
                                    the flash with the new
                                    IOS tar image

 

Command Options

Download & Install
============================================
Download from TFTP server and unpack tar and
install it (IOS and Html - Management Web Page)

archive download-sw tftp://192.168.1.230/c3560-ipservicesk9-tar.150-2.SE.tar


Download & Install - Overwrite
============================================
Download from TFTP server and unpack tar and
install it (IOS and Html - Management Web Page)
and overwrite everything in the flash with the
new downloaded IOS tar image

archive download-sw /overwrite tftp://192.168.1.230/c3560-ipservicesk9-tar.150-2.SE.tar

 OPTIONS USED
/overwrite - overwrite everything in the flash
                    with the new IOS tar image

 
Download & Install - Different Feauture Set
============================================
Download from TFTP server and unpack tar
and install it (IOS and Html - Management Web Page)
even if the current and the new image have diferent
feature sets (ex: ipbase vs ipservices)

archive download-sw /allow-feature-upgrade tftp://192.168.1.230/c3560-ipservicesk9-tar.150-2.SE.tar

OPTIONS USED
/allow-feature-upgrade - update/downgrade to different feature set
 


Download & Install - Image Only
============================================
Download from TFTP server and unpack tar
and install it only the IOS (.bin) and deletes
the Html files (Management Web Page)

archive download-sw /imageonly  tftp://192.168.1.230/c3560-ipservicesk9-tar.150-2.SE.tar

 OPTIONS USED
 /imageonly - Install only the IOS (.bin) image and
                      delete the Html files (Management Web Page)
 
 
Download & Install - Safe
============================================
Download from TFTP server and unpack tar
and install it (IOS and Html - Management Web Page).

Waits for new IOS to be downloaded successfully
before deleting the old IOS

archive download-sw /safe tftp://192.168.1.230/c3560-ipservicesk9-tar.150-2.SE.tar

OPTIONS USED
/safe - waits for the new IOS to be downloaded
           successfully before deleting the old IOS
        

Base On: https://cyruslab.net/2012/06/03/maintenance-ios-upgradedowngrade-with-archive-download-sw-command/

Tuesday, August 23, 2016

VMWare - Linked Clones Without vCenter (with vSphere Client)


As soon as you can create snapshots you have all the ingredients required to create linked clones.

This will walk you through the process of creating a bunch of linked clones from one master.
Only tools used are the vSphere client and a text editor on a Windows host.
First create the master VM.

It is recommended to use a thin disk ...

Give it a reasonable name - so that it stands out from the other VMs.
In the example I called the VM "dont_touch"

clip_image001
Install the new VM and when done reboot it and install VMware-tools.

Feel free to add more apps ... or sysprep the master VM ...

Once you are satisfied power down the VM.
Now create a snapshot with the vClient.

See the screenshot - the files that belong to the snapshot are hilighted.
From now on regard the directory "dont_touch" as readonly. Do not start the VM again.

clip_image002
Next use the datastore browser and download the two files hilighted in the next screen : the vmx and the snapshot-vmdk.

 clip_image003
On your Windows-host the two downloaded files should now look like this.

Don't worry - the datastorebrowser is a funny guy - he shows you two files but downloads three.
And ... he thinks this is helpful ;-)

clip_image004
First thing to do is edit the "dont_touch-000001.vmdk"
It now looks like :

# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=fa3d08b7
parentCID=fa3d08b7
createType="vmfsSparse"
parentFileNameHint="dont_touch.vmdk"
# Extent description
RW 25165824 VMFSSPARSE "dont_touch-000001-delta.vmdk"
# The Disk Data Base
#DDB
ddb.longContentID = "9b8da3d63cda1e5dbea7c0f4fa3d08b7"

As we want an absolute path for the parentFileNameHint parameter we edit the vmdk descriptor so that it looks like:

Note the yellow line ! It shows the edited path.

# Disk DescriptorFile
version=1
encoding="UTF-8"
CID=fa3d08b7
parentCID=fa3d08b7
createType="vmfsSparse"
parentFileNameHint="/vmfs/volumes/4ba3aca0-eca4fd60-312d-f4ce46af50b6/dont_touch/dont_touch.vmdk"
# Extent description
RW 25165824 VMFSSPARSE "dont_touch-000001-delta.vmdk"
# The Disk Data Base
#DDB
ddb.longContentID = "9b8da3d63cda1e5dbea7c0f4fa3d08b7"

Tip: to find out the absolut path look it up in the vmx file - the parameter sched.swap.derivedName also uses the absolut path.

sched.swap.derivedName = "/vmfs/volumes/4ba3aca0-eca4fd60-312d-f4ce46af50b6/dont_touch/dont_touch-aafe8f9c.vswp"

The part marked in yellow shows the absolute path that is required to adjust the vmdk-description.

Now is also a good time to delete that parameter from the vmx file. Don't forget that !
Now we can create several copies of the vmx-file.

Give every file a new name and adjust the display name parameter.

displayName = "2k3-clone-1"

Screenshot below shows several new copies of the vmx-file - each one has the display-name adjusted and the sched.swap.derivedName line removed.

clip_image005
Now back on the ESXi create several new directories for the clones.

clip_image006
Into each new directory copy the appropriate vmx-file plus the two vmdks.

Again - don't worry - you need to upload three files but datastorebrowser only displays two.

clip_image007
Now all is left to do is add the vmx-file to the inventory and make sure you click "I copied it" on first launch.
clip_image008
During first boot of the cloned VM it is advisable to unconnect the network-card.

On a Windows VM you may want to run newsid.exe, change the hostname and configure the network on first boot.

Then reboot and enable the nics.

Taken From: http://sanbarrow.com/linkedcloneswithesxi.html