Die Foren-SW läuft ohne erkennbare Probleme. Sollte doch etwas nicht funktionieren, bitte gerne hier jederzeit melden und wir kümmern uns zeitnah darum. Danke!

Linux - hacker - Read ME

Hilfe bei Problemen mit der Installation und Benutzung der VMware Workstation und VMware Workstation Pro.

Moderatoren: Dayworker, irix

Benutzeravatar
UNSTERBLICH(R.I.P.)
Beiträge: 14759
Registriert: 09.08.2003, 05:41
Wohnort: sauerland
Kontaktdaten:

Linux - hacker - Read ME

Beitragvon continuum » 19.01.2006, 20:53

Hi
ich will meinen vmx-builder sowie den flatmaker auf Linux portieren.
Ich habe keine Ahnung von bash.
Ich habe keine Zeit ganz von unten anzufangen.
Ich brauche deshalb einen kleinen kick-start von euch.

Folgendes wird gebraucht:

Eine bash-echo arie die etwa so ein Bild erzeugt:
Bild
und je nach Auswahl eine kleine Text -Datei a la
ethernet0-options.vmx-part in einen temporaeren Ordner schreibt.
Am Schluss wird aus vielen kleinen Text-broeckchen die fertige VMX erstellt.
Brutal simpel - fast schon stumpf - aber gut:

Guckt euch mal meine batch an und schreibt mir einmal die 40 -100 Zeilen fuer ein Beispiel-parameter.

Ich habe es bis jetzt immer mit Bitten probiert - hat nie was gefruchtet.
Deshalb probier ich es jetzt mal als Befehl:


LINUX-KENNER ICH BRAUCHE DIESE PAAR BROCKEN BASH BIS SONNTAG - DAS IST EIN BEFEHL !!!!!!!!!!!!!!!!!!


Leute - das Know-How ist da - mit ein wenig Hilfe in Linux-scripts kann ich / koennen wir bessere VMs bauen - als das GUI erlaubt.

Flatmaker - ich brauche ebenso fuer die Diskerstellung per script ein Linuxanalog zu contig.exe - dd oder gibt es besseres ???

Lasst mich nicht haengen - es kommt allen zugute.

Ulli

Profi
Beiträge: 877
Registriert: 18.03.2005, 14:05
Wohnort: Ludwigshafen

Beitragvon Martin » 19.01.2006, 23:07

Hallo!

Ich hatte schon angefangen, mir ein paar Gedanken zum Flatmaker zu machen, aber dann kam doch noch zuviel Arbeit dazwischen.
Der ECHO Befehl funktioniert im Linux genauso, und CONTIG.EXE kann mit "Bordmitteln" ersetzt werden:
dd if=/dev/null of=xxxxxxx.vmdk bs=1 seek=(size-1) count=1

Das File ist danach zwar nicht unbedingt unfragmentiert, es wird aber nur die Zeit benötigt, um das letzte Byte im File zu schreiben :D

Martin

Benutzeravatar
UNSTERBLICH(R.I.P.)
Beiträge: 14759
Registriert: 09.08.2003, 05:41
Wohnort: sauerland
Kontaktdaten:

Beitragvon continuum » 20.01.2006, 00:02

Hi

in welcher Einheit gebe ich size ein?


Ich habe hier mal ein Stueck vom vmx-builder - wenn mir jemand dieses Broeckchen fuer bash umschreibt komme ich mit dem Rest glaube ich alleine klar.

Code: Alles auswählen

:FLOPPY
SET Choice=
echo.
echo     ---SANBARROW.COM-----------------------------------------------
echo.
echo.
echo.
echo.
echo      0 = floppy 0  enabled
echo      1 = floppy 0  disabled
echo.
echo      2 = floppy 0  present at boot-time
echo      3 = floppy 0  not present at boot-time
echo.
echo      4 = floppy 1  enabled
echo      5 = floppy 1  disabled
echo.             
echo      6 = floppy 1  present at boot-time
echo      7 = floppy 1  not present at boot-time
echo.
echo      x = done
echo.
echo.
echo.
echo     ---------------------------------------------------------------
echo.
SET /P Choice=
IF /I "%Choice%"=="0"    GOTO FLOPPY0
IF /I "%Choice%"=="1"    GOTO FLOPPY1
IF /I "%Choice%"=="2"    GOTO FLOPPY2
IF /I "%Choice%"=="3"    GOTO FLOPPY3
IF /I "%Choice%"=="4"    GOTO FLOPPY4
IF /I "%Choice%"=="5"    GOTO FLOPPY5
IF /I "%Choice%"=="6"    GOTO FLOPPY6
IF /I "%Choice%"=="7"    GOTO FLOPPY7
IF /I "%Choice%"=="x"    GOTO FLOPPYx

ECHO "%Choice%" is not valid. Please try again.
pause
GOTO FLOPPY
:FLOPPY0
echo floppy0.present = "TRUE" > %workdir%\floppy0.vmx-part
GOTO FLOPPY
:FLOPPY1
echo floppy0.present = "FALSE" > %workdir%\floppy0.vmx-part
GOTO FLOPPY
:FLOPPY2
echo floppy0.startConnected = "TRUE" > %workdir%\floppy0boot.vmx-part
GOTO FLOPPY 
:FLOPPY3
echo floppy0.startConnected = "FALSE" > %workdir%\floppy0boot.vmx-part
GOTO FLOPPY
:FLOPPY4
echo floppy1.present = "TRUE" > %workdir%\floppy1.vmx-part
GOTO FLOPPY
:FLOPPY5
echo floppy1.present = "FALSE" > %workdir%\floppy1.vmx-part
GOTO FLOPPY
:FLOPPY6
echo floppy1.startConnected = "TRUE" > %workdir%\floppy1boot.vmx-part
GOTO FLOPPY
:FLOPPY7
echo floppy1.startConnected = "FALSE" > %workdir%\floppy1boot.vmx-part
GOTO FLOPPY

:FLOPPYx 
GOTO DEVICES

Profi
Beiträge: 877
Registriert: 18.03.2005, 14:05
Wohnort: Ludwigshafen

Beitragvon Martin » 20.01.2006, 14:01

In meinem dd Beispiel habe ich bei bs (Blocksize) 1 (=1 Byte) angegeben. Alle weiteren Angaben beziehen sich immer auf die Blocksize. Wenn bei der Blocksize 1k oder 1M verwendet würde, könnte man die Filegröße nur auf 1kB oder 1MB genau angeben.

Member
Beiträge: 13
Registriert: 21.04.2006, 20:50

Beitragvon tobiasschulz » 21.04.2006, 21:09

continuum hat geschrieben:Hi

in welcher Einheit gebe ich size ein?


Ich habe hier mal ein Stueck vom vmx-builder - wenn mir jemand dieses Broeckchen fuer bash umschreibt komme ich mit dem Rest glaube ich alleine klar.

Code: Alles auswählen

:FLOPPY
SET Choice=
echo.
echo     ---SANBARROW.COM-----------------------------------------------
echo.
echo.
echo.
echo.
echo      0 = floppy 0  enabled
echo      1 = floppy 0  disabled
echo.
echo      2 = floppy 0  present at boot-time
echo      3 = floppy 0  not present at boot-time
echo.
echo      4 = floppy 1  enabled
echo      5 = floppy 1  disabled
echo.             
echo      6 = floppy 1  present at boot-time
echo      7 = floppy 1  not present at boot-time
echo.
echo      x = done
echo.
echo.
echo.
echo     ---------------------------------------------------------------
echo.
SET /P Choice=
IF /I "%Choice%"=="0"    GOTO FLOPPY0
IF /I "%Choice%"=="1"    GOTO FLOPPY1
IF /I "%Choice%"=="2"    GOTO FLOPPY2
IF /I "%Choice%"=="3"    GOTO FLOPPY3
IF /I "%Choice%"=="4"    GOTO FLOPPY4
IF /I "%Choice%"=="5"    GOTO FLOPPY5
IF /I "%Choice%"=="6"    GOTO FLOPPY6
IF /I "%Choice%"=="7"    GOTO FLOPPY7
IF /I "%Choice%"=="x"    GOTO FLOPPYx

ECHO "%Choice%" is not valid. Please try again.
pause
GOTO FLOPPY
:FLOPPY0
echo floppy0.present = "TRUE" > %workdir%\floppy0.vmx-part
GOTO FLOPPY
:FLOPPY1
echo floppy0.present = "FALSE" > %workdir%\floppy0.vmx-part
GOTO FLOPPY
:FLOPPY2
echo floppy0.startConnected = "TRUE" > %workdir%\floppy0boot.vmx-part
GOTO FLOPPY 
:FLOPPY3
echo floppy0.startConnected = "FALSE" > %workdir%\floppy0boot.vmx-part
GOTO FLOPPY
:FLOPPY4
echo floppy1.present = "TRUE" > %workdir%\floppy1.vmx-part
GOTO FLOPPY
:FLOPPY5
echo floppy1.present = "FALSE" > %workdir%\floppy1.vmx-part
GOTO FLOPPY
:FLOPPY6
echo floppy1.startConnected = "TRUE" > %workdir%\floppy1boot.vmx-part
GOTO FLOPPY
:FLOPPY7
echo floppy1.startConnected = "FALSE" > %workdir%\floppy1boot.vmx-part
GOTO FLOPPY

:FLOPPYx 
GOTO DEVICES


Hallo ihr alle.

Interessantes Projekt.

Ich habe mir mal erlaubt das zu übersetzten. Vllt. hilft's dir ja weiter.
GOTOs verwende ich nicht so gern. Das geht auch besser. Sonst wird das so ein ???-Code (wie heißen noch mal diese langen Nudeln?!?)
dein DEVICES-GOTO ist in dem obigen Code nicht enthalten. Musst du mal gukcen
Hier als BASH:


Code: Alles auswählen


function FLOPPY0 {
echo 'floppy0.present = "TRUE"' > $(pwd)/\floppy0.vmx-part
}
function FLOPPY1 {
echo 'floppy0.present = "FALSE"' > $(pwd)/\floppy0.vmx-part
}
function FLOPPY2 {
echo 'floppy0.startConnected = "TRUE"' > $(pwd)/\floppy0boot.vmx-part
}
function FLOPPY3 {
echo floppy0.startConnected = "FALSE" > $(pwd)/\floppy0boot.vmx-part
}
function FLOPPY4 {
echo floppy1.present = "TRUE" > $(pwd)/\floppy1.vmx-part
}
function FLOPPY5 {
echo floppy1.present = "FALSE" > $(pwd)/\floppy1.vmx-part
}
function FLOPPY6 {
echo floppy1.startConnected = "TRUE" > $(pwd)/\floppy1boot.vmx-part
}
function FLOPPY7 {
echo floppy1.startConnected = "FALSE" > $(pwd)/\floppy1boot.vmx-part
}
function FLOPPYx {
DEVICES
}

function FLOPPY {
export Choice=""
echo
echo     ---SANBARROW.COM-----------------------------------------------
echo
echo
echo
echo
echo      0 = floppy 0  enabled
echo      1 = floppy 0  disabled
echo
echo      2 = floppy 0  present at boot-time
echo      3 = floppy 0  not present at boot-time
echo
echo      4 = floppy 1  enabled
echo      5 = floppy 1  disabled
echo             
echo      6 = floppy 1  present at boot-time
echo      7 = floppy 1  not present at boot-time
echo
echo      x = done
echo
echo
echo
echo     ---------------------------------------------------------------
echo
read Choice
case $Choice in
"0") FLOPPY0; ;;
"1") FLOPPY1; ;;
"2") FLOPPY2; ;;
"3") FLOPPY3; ;;
"4") FLOPPY4; ;;
"5") FLOPPY5; ;;
"6") FLOPPY6; ;;
"7") FLOPPY7; ;;
"x") FLOPPYx; ;;
*)
echo "$Choice is not valid. Please try again."
echo -n Taste druecken
read dummy
FLOPPY
;;
esac
FLOPPY
}


   
FLOPPY




Member
Beiträge: 13
Registriert: 21.04.2006, 20:50

Beitragvon tobiasschulz » 21.04.2006, 21:11

Guten Tag, nur eine kleine Anmerkung :
Martin hat geschrieben:Hallo!
... "Bordmitteln" ersetzt werden:
dd if=/dev/null of=xxxxxxx.vmdk bs=1 seek=(size-1) count=1


Seitwann für sowas /dev/null?? Benutz besser /dev/zero, /dev/null erzeugt normalerweise nur 0 Byte Dateien. /dev/null ist nur zum reinschreiben (bzw. verwerfen) gedacht, man kann praktisch nichts herauskopieren. /dev/zero gibt nur 0 (=engl. zero) - Bytes aus.
Du kannst aber auch /dev/urandom verwenden, das verwendet beliebige (random) Zahlen, das ist aber langsam und unperformant.


Zurück zu „VMware Workstation und VMware Workstation Pro“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 0 Gäste