Create a virtual machine from an ISO with VMWare Player

copyed from another Blog:

Posted on December 28, 2008 in: how to, software, tools|Jump To Comments

Yeah, you heard me no CD/DVD burning in here. VMWare player lacks the ability to create new virtual machines by it self, this problem can be overcomed by using third party solutions or a blank virtual machine. However one small feature found on VMWare Workstation still missing which is the ability to install the operating system from ISO without having to burn in it into a CD/DVD first. Mostly it’s about reducing recordable media waste.

You can download a blank virtual machine ready for installation from this link.

You might also find this article interesting : How to Create a virtual machine with VMWare Player
Install from ISO

In order to make the virtual machine boot from the ISO you need to first edit the configuration ending with .vmx in this case named virtualmachine.vmx.

Add the following line to the configuration file.

ide1:0.fileName = "locationofiso.iso"

Locate and change the following line.

ide1:0.deviceType = "cdrom-raw"

To.

ide1:0.deviceType = "cdrom-image"

Close and save the configuration file. Now start the virtual machine and proceed with the regular installation.

After the installation is done change the values back to.

ide1:0.fileName = "auto detect"

ide1:0.deviceType = "cdrom-raw"

Save and enjoy your virtual machine.

Last revised on 02/04/2009

Get Ethernetcard working again in Linux under ESXi

After installing Ubuntu Server on Vmware ESXi, I couldn't find a NIC:

sudo /etc/init.d/networking restart

* Reconfiguring network interfaces...
eth0: ERROR while getting interface flags: No such device
SIOCSIFADDR: No such device
eth0: ERROR while getting interface flags: No such device
SIOCSIFNETMASK: No such device
SIOCSIFBRDADDR: No such device
eth0: ERROR while getting interface flags: No such device
eth0: ERROR while getting interface flags: No such device
Failed to bring up eth0.

Problem is that the ethernet MAC addresses are cached.

To remove the cache values:

sudo rm /etc/udev/rules.d/70-persistent-net.rules

Reboot, and it should work.

Other NIC files:
* /etc/hosts - change ip address and hostnames
* /etc/hostname - change hostname
* /etc/network/interfaces - change ip address

Install Vmware Tools on Linux

Under Debian necessary:
apt-get install autoconf automake make psmisc gcc
apt-get install linux-headers-`uname -r` build-essential

Short:
tar -xzvf VMwareTools-######.tar.gz
cd vmware-tools-distrib
./vmware-install.pl
vmware-tools-config.pl

Long:
Viclient, Connect to VM
Menu "VM/Install VMware Tools"
Tools are mounted to Cdrom
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
tar zxvf VMware-Tools-xxxxxx.tar.gz -C /opt/
cd /opt/vmware-tools-distrib
./vmware-install.pl

sed and awk Commandlist

sed -e :a -e 's/<[^>]*>//g;/</n;//ba'
(Entfernt Html)´

sed -e s/Stop.*$//
(Löscht Alles Nach Stop)

sed q
(Ausgabe Erste Zeile)

sed 's/[ \t]*$//'
Lösche Unsichtbare Zeichen (Leerzeichen, Tabulatoren) Vom Ende Aller Zeilen

sed 's/^[ \t]*//;s/[ \t]*$//'
Lösche Unsichtbare Zeichen Sowohl Am Anfang Als Auch Am Ende Jeder Zeile

sed '1d'
(Lösche Erste Zeile)

sed '$d'
(Lösche Letzte Zeile)

head -n -5
(löscht 5 letzten Zeilen)

sed 'n;n;s/\n/ /g'
(Fügt Drei Zeilen Die Untereinander Stehen Zusammen, Mit Leerzeichen)

sed '/pics[/]pix.gif/s/^/notRepl:
(fügt notRepl direkt an Anfang der Zeile hinzu wenn pic/pix.gif enthalten ist in der Zeile)

sed s/^.*http/http/
How Do You Delete The Text At The Beginning Of Every Line Until A Certain Word Using Sed?

sed -n '/Word1/,/Word2/p' File
(Gebe Alles Zwischen Word1 Und Word2 Aus)

grep -c Word File
(Zählt Wie Oft Das Wort Vorkommt)

tr -d '\015\032'
(Entfernt \n \t)

sed -e "/^ *$/d"
(Löscht Leerzeilen Aus Datei)

sed -e "s/[']&nbsp;//g"
(entfernt Ä&bnsp; am anfang)

sed 's/&nbsp;//g'
(entfernt &bnsp; am anfang)

echo -n
(ohne \n)

#! /bin/sh
test=2
test2='loginName='$test'&pass=
echo $test2
(Variable)

./wkw.sh loginname passwort
-d 'loginName='$1'&pass='$2'&x=0&y=0&logIn=1'
(Übergabe)

#! /bin/sh
if test -f tmp_sg_test > 0
then
echo "yes"
else
echo "no"
fi
(Existiert Datei?)

sed -e 's/[\]//'
(lösche \ am Ende)

sort
(sortiert)

uniq
(wenn sortiert alle zeilen untereinander löscht es doppelte zeilen)

grep
(-A anzahl zeilen nach match, -B anzahl zeilen bevor match)

sed -e 's/<\/a><\/li><li>/test/g'
(</a></li><li>)

var1=$(echo $1 | sed s/@/%40/g)
(wandelt $1 email in unicode um in $var1)

| sed s/ä/ä/g | sed s/ö/ö/g | sed s/ü/ü/g
(ä und ö und ü ändern)

#! /bin/sh
while [ "$1" ]; do
echo "$1"
shift
done
( parameterübergabe ans skript: ein parameter nach dem nächsten abarbeiten)

date '+%y/%m/%d %H:%M:%S'
(Ausgabe Jahr, Monat, Tag, Stunde, Minute, Sekunde)

test.sh
#! /bin/sh
. config.var
name=animexx
echo $tmp$name
tmp=$tmp$name
echo $tmp
echo $client

config.var
tmp=./tmp/tmp_
client='"Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)"'
( config file mit zentralen parametern aus config.var )

VARIABLE=`date +"%y%m%d"`
Die ` sind Backticks, also Umschalt+Taste neben Backspace auf einer deutschen Tastatur.
Einfacher zu lesen und zu schreiben ist die $() Variante: VARIABLE=$(date +"%y%m%d")

while read line
do
echo $line
done < mydatafile
(read file line by line and DO echo them)

sed -e 's/.\{7\}$//'
( letzten 7 zeichen loeschen )

Eisfair Configuration

Service List to Install \ Configure:

Inet Service: SSH Port
Certs Service: -
Apache2 Webserver: Web Port, Log Settings
MySQL Server: Mysql Port, Log Settings, Network Enable, Cache Sizes
Squid proxy: Cache off
Minicom Service: -
LPRng: -
Samba: Create Users and Configure Shares and Network
Dyndns: Configure DynDns Services
MINI_HTTPD: Port, SSL, Special Configuration
Netdate Service: Configure NTP Server
teamspeak: Configure superadmin, admin
streamripper: -
RSYNC: Configure Backup Shares and User
Power Button: -

Firewall:
/etc/hosts.allow
---------------------------------
#----------------------------------------------------------------------
# /etc/hosts.allow file generated by '/tmp/install.sh'
#
# Creation date:  10.02.2005  root
#
# Do not edit this file directly, create a '/etc/hosts.allow.package-name'
# file and re-run the 'update-hosts.allow' command to update.
#----------------------------------------------------------------------

ALL:ALL

Ramdisk:

/etc/init.d/ramdisk

#! /bin/sh
#----------------------------------------------------------------------------
# /etc/init.d/ramdisk - ramdisk secrets.tdb            vscan-fprotd.conf
#roup.old       mib.txt         secrets.tdb.samba.bak  vscan-fsav.conf
# Creation:     19.07.2003  fm  securetty              vscan-icap.conf
# Last Update:  20.07.2003  fm  security               vscan-oav.conf
#osts.allow     motd            services               vscan-sophos.conf
# Copyright (c) 2003 Frank Meyer <frank@eisfair.org>   vscan-trend.conf
#ttpd           mtools.conf     shadow                 wgetrc
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#----------------------------------------------------------------------------

case $1
in
start)
/bin/mount -t ramfs log /var/log -o maxsize=2000
/bin/mount -t ramfs www-log /var/www/log -o maxsize=2000
#/bin/mount -t ramfs none /var/squid/log -o maxsize=2000
# modprobe usb-storage   >/dev/null 2>&1
# insmod sd_mod          >/dev/null 2>&1
# insmod usb-uhci        >/dev/null 2>&1
# insmod usb-ohci        >/dev/null 2>&1
;;
stop)
umount /var/log
umount /var/www/log
#umount /var/squid/log
;;
esac

chmod +x

SymLinks in /etc/rc2.d/K37ramdisk, S37ramdisk

Local

/etc/init.d/local

#! /bin/sh
#----------------------------------------------------------------------------
# /etc/init.d/local - rc script for gerneral purpose
#
# Creation:     19.07.2003  fm
# Last Update:  20.07.2003  fm
#
# Copyright (c) 2003 Frank Meyer <frank@eisfair.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#----------------------------------------------------------------------------

case $1
in
start)
# mount /dev/hdc /hdd -t ext3
# hdparm -d1 /dev/hdc # DMA an
# hdparm -S 30 /dev/hdc # Spindown
# hdparm -y /dev/hdc # Sofort Spindown

#/pvpgn/sbin/bnetd
;;

stop)
# umount /hdd

#killall bnetd
ethtool -s eth0 wol g
;;
esac

Base, Special User:

 vi /home/USER/.profile
 exec /bin/bash -r

 vi /home/USER/.bashrc
 alias bash='echo "syntax error"'
 alias unalias='echo "ooh, arent you a clever boy!"'
 alias alias='echo "nice try"'

HTTPD:

1.  /etc/httpd/mini_httpd.conf
pidfile=/var/run/mini_httpd_base.pid
pidfile=/var/run/mini_httpd.pid

2.  vi /etc/adminlog.conf
Inhalt: *.* /var/log/log.admin
3.  vi /usr/local/htdocs/adminlog.cgi mit Inhalt
#!/bin/sh
#------------------------------------------------------------------------------
# syslog.cgi - show the syslog-file
#
# Creation: 28.10.2003 mgh
# LU : 02.08.2004 opi
#
# 02.08.04 add missing end tags on error exits
#
#------------------------------------------------------------------------------

SEC_REALM='logs'
SEC_ACTION='view'

. sec-lib.cgi

# Parse variables...
eval "`proccgi $*`"

echo "Content-Type: text/html; charset=iso-8859-1"
echo "Cache-control: no-store" # HTTP/1.1 (or no-cache?)
echo "Pragma: no-cache" # HTTP/1.0
echo "Expires: `date -Ru`" # Expires now!
echo
echo '<html><head>'
echo '<LINK REL=STYLESHEET TYPE="text/css" HREF="main.css">'
echo '<title>Syslog</title>'
echo '</head><body bgcolor="#FFFFFF" text="#000000">'

if [ ! -f /etc/adminlog.conf ]
then
echo "<h1>Error</h1><p>Keine /etc/adminlog.conf
vorhanden!</p></body></html>"
exit 1
fi

set -f # disable pathname expansion
if [ "$FORM_target" = "" ]
then
FORM_target='*.*'
fi

while read a b
do
if [ "$FORM_target" = "$a" -a -f "$b" ]
then
printout=$b
fi
done < /etc/adminlog.conf
set +f

if [ "$printout" = "" ]
then
echo "<h1>Fehler</h1><p>Keine Datei des Adminlog-Ziels $FORM_target
gefunden!</p></body></html>"
exit 1
fi

echo "<h1>Adminlog</h1><p>Datei: $printout ($FORM_target)<pre>"
sed '1!G;h;$!d' $printout
echo '</pre></body></html>'

exit 0

4. Es wird in der Datei /etc/httpd/menu unter
e sr.cgi Serverswitch
eine zusätzliche Zeile
e serverswitch.cgi Serverswitch
angelegt (die ins Leere zeigt).

5. mini_http Port 81

Eisfair von ESXi auf CF

- ESXi Export für Workstation / Player
- Erweitere Template mit VMXBuilder um IDE Festplatte, size minimum the SCSI HDD
(Vorsicht, IDE:0:0!, CD Laufwerk auf IDE:0:1 setzen!)
- Booted VM mit "Ultimate Boot CD", starte Tool "g4u" V1.17
- Kopiere SCSI Disk auf IDE Disk
- Editiere Template: Entferne SCSI HDD
- Boote mit "Ultimate Boot CD", DamnSmall Linux
- mount /dev/hda2
- sudo vi /etc/fstab: /dev/sda1 und /dev/sda2 auf /dev/hda1 und /dev/hda2 ändern
- umount
- boot

Bootloader
---------------------------------
---------------------------------

/etc/lilo.conf
---------------------------------
disk = /dev/hda
bios = 0x80
boot = /dev/hda
read-only
prompt
timeout = 50
vga = normal
image = /boot/kernel
root = /dev/hda2
label = eis
initrd = /boot/initrd.gz
append = "ide=nodma acpi=force"
---------------------------------

Anschließend "lilo -v"

- wenn Eisfair läuft, neustarten
- Boot auf CD Image Acronis Home
- Image erstellen und auf Netzlaufwerk speichern

Am neuen PC
- Installiere Eisfair auf dem neuen Datenträger / CF
- wenn Eisfair läuft, neustarten
- Boot auf CD Image Acronis Home
- Image von hda2 aus dem Netzlaufwerk wiederherstellen
- booten
- Anschließend "lilo -v"

fertig

Netfinity 8500R "DragonMother" (23.08.2008)

DragonMother is the latest addition to my little PC farm.

Its an IBM Netfinity 8500R X-Series Server.

At the moment it contains 2 Pentium III Xeon 700 Mhz Processors and 2 GB of 100 Mhz ECC Sdram.

Additionally it makes use of an IBM ServeRaid (SCSI) and an Fastrak Promise Ultra 100 (IDE) Controller to support multiple Harddisk Drives and an 3Com 10/100 XT Fast Ethernet Card.

It is powered by 3 redundant, hotplugable Power Supply Units - but acutally I use only one ( I don't need redundance at the moment, so I only use one for less power consumption).

It is planed to buy an additional Daughterboard to support another 4 Cpus and fill up the 2 open Cpus Slots on Board A. So - six IBM Xeon 700 Mhz Proccessors and one Daughterboard- please.

At the moment it uses Ubuntu Server Edition and Knoppix - but in futher we may upgrade to an Windows 2000 Advanced Server to use multiple Cpus.