Create a command-line script VM install
I was looking for a way to the creation of vm of the script command line. Our environment is mostly RedHat 5.4 and esx 4.0. We wanted to be able to spin off the virtual machine from the command line, and then deploy the operating system with kickstart. I came across the following script, but still get this error when I try to run it:
vmodl.fault.InvalidArgument: a specific parameter was not correct.
Is it still possible to do so or if orders have been deprecated? Thanks in advance for any help that anyone can provide. Also, if I placed this question in the wrong place please advise and I will pass it to the appropriate place.
VM creation script #.
#Script version 1.1
#Author David E. Hart
#Date 10-05-06
#
#--------+
Goal |
#------
+---------------------------------------------------
This script will create a virtual machine with the following attributes:
Virtual Machine Name = ScriptedVM
Location of the Virtual Machine/VMFS/volumes/storage1/ScriptedVM =
Virtual machine Type = 'Microsoft Windows 2003 Standard '.
Virtual memory allocation Machine = 256 meg
#
#----------------------------------------+
#Custom variable section for editing.
#--------------------------------------
+-------------------#NVM is the virtual machine (NVM) name. No spaces allowed in the name
#NVMDIR is the directory that contains all the files of the virtual machine
#NVMOS specifies the VM operating system
#NVMSIZE is the size of the virtual disk to create
#--------------------------------------------------------------
###############################################################
Variable parameters by default - change that to your preferences
NVM = "ScriptedVM" # name of Virtual Machine
NVMDIR = "ScriptedVM" # specify only the name of the folder must be created; NOT the
full path
NVMOS = "winnetstandard" # Type of operating system for the Virtual Machine
NVMSIZE = '4g' # Virtual Machine disk size
VMMEMSIZE = default memory size # "256".
End Variable Declaration
mkdir/vmfs/volumes/storage1 / $ directory to create NVMDIR #.
exec 6 > & 1 # Sets up writing to file
Exec 1 > open the file # /vmfs/volumes/storage1/$NVMDIR/$NVM.vmx
write configuration
config.version = "" "6" "" ECHO # for ESX 3.x, the value is 8
virtualHW.version = "" "3" "" ECHO # for ESX 3.x, the value is 4
echo memsize = "" «$VMMEMSIZE»»»
echo floppy0.present = "" ' TRUE' "' # VM installation with diskette
echo displayName = "" "$NVM" "" # name of virtual machine
echo guestOS = "" «$NVMOS»»»
ECHO
echo ide0:0.present = "" «TRUE»»»
echo ide0:0.deviceType = "" "cdrom-raw»»"
echo ide: 0.startConnected = "" "false" "" # CDROM active
echo floppy0.startConnected = "" «FALSE»»»
echo floppy0.fileName = "" ' / dev/fd0»»»
echo Ethernet0.present = "" «TRUE»»»
Ethernet0.networkName = "" "VM" "" echo # default network
echo Ethernet0.addressType = "" «vpx»»»
ECHO
echo scsi0.present = "" «true»»»
echo scsi0.sharedBus = "" «none»»»
echo scsi0.virtualDev = "" «free»»»
echo scsi0:0.present = "" ' true' "' # virtual disk parameters
echo scsi0:0.fileName = "" "$NVM.vmdk»»»
echo scsi0:0.deviceType = "" 'scsi-hard drive»»'
ECHO
Close the file
Exec 1 > & -.
stdout of the make a copy of FD 6 (reset stdout) and close fd6
Exec 1 > & 6
exec 6 > & -.
Change the permissions on the file so it can be run by anyone
chmod 755 /vmfs/volumes/storage1/$NVMDIR/$NVM.vmx
#Creates 4 GB virtual disk
CD/vmfs/volumes/storage1 / $ NVMDIR #change for the directory of the virtual machine
vmkfstools - c $NVMSIZE $NVM.vmdk - a free
#Register VM
VMware-cmd - s register /vmfs/volumes/storage1/$NVMDIR/$NVM.vmx
>
In the attachment, you can find a version renewed your script (create - vm.sh), you must set the following variables for your environment:
NVM="ScriptedVM" # Name of Virtual Machine NVMDIR="ScriptedVM" # Specify only the folder name to be created; NOT the complete path NVMOS="winnetstandard" # Type of OS for Virtual Machine NVMSIZE="4g" # Size of Virtual Machine Disk VMMEMSIZE="256" # Default Memory Size STORAGEDIR="/vmfs/volumes/datastore1"
This script worked in my environment ESX4, but the resulting virtual machine has hardware version 4 (by default for ESX4 7)
If you have found this or other useful information, please consider awarding points to 'Correct' or 'useful '.
Tags: VMware
Similar Questions
-
Create the command line for the Dump file without having to install additional tools
I should automate the creation of dump files. It must to be command line and without installing tools such as ProcDumpTechNet.Microsoft.com/Sysinternals/dd996900, minidump or similar. I think that it is not a solution but if someone can help me.
This issue is beyond the scope of this site (for consumers) and to be sure, you get the best (and fastest) reply, we have to ask either on Technet (for IT Pro) or MSDN (for developers)* -
Join the host ESX to Virtual Center via the command line script
Question for the guru-, we are spinning up to our servers ESX 3.5 using HP OpsWare. It would be very helpful if someone could point me in the direction of a function/command line script that I could launch the ESX Server, allowing him to join a server VC.
Thanks in advance
Caisse hostops.pl included in the VIMA/vMA or the VIPerl Toolkit. Does exactly this.
-Matt
VCP, vExpert, Unix Geek
-
is there a way to provide command line arguments when calling the Profile Manager so that I can perfectly create a profile of an invocation? By the way the profile name and the location of the profile. I need to bypass the user interaction with the Profile Manager window. Thank you.
http://developer.Mozilla.org/en/docs/Command_Line_Options#User_Profile
-
Is it possible to "build" a custom component using a command line script?
Hi all
From time to time to replicate our environment in instances of development/sandbox sandbox, we need the current generation of custom components production.
What we do in general is - Component Wizard allows you to "build" each component one & then download the ZIPs. \
I wonder if there is some sort of command line to "build" a custom component?
That would allow me to write a script to quickly create all my custom components in a go, whenever necessary.
Kind regards
PrateekTo answer the original question, Yes, there is a command line tool to build, activate, deactivate and install the components (even with the preferences), her right here:
/ Data/Oracle/user_projects/Domains/my_domain/UCM/CS/bin/ComponentTool
Usage: ComponentTool [v |-vv] [t trace_section]--enable |-disable name
ComponentTool [v |-vv] [t trace_section]... - sync
ComponentTool [v |-vv] [t trace_section]... [- Install] path.hda: path.zip [-path.hda Preferences]
ComponentTool [v |-vv] [t trace_section]--check-depends name
ComponentTool [v |-vv] [t trace_section]... - name of the package
ComponentTool [v |-vv] [trace_section]...--list-enabled|--list-disabled|--list|--interact|--help t
The only thing is to compile the Java classes for you. For this you will need to an ANT script or something.
-
Groovy ODI command-line script
I've been playing with ODI 12 c groovy script for a while now and it is a very powerful tool, but did someone knows if it is possible to run the command-line groovy scripts?
I also think that the editor groovy in ODI is very limited. There are much better alternatives like InteliJ IDEA. Has anyone tried to use an external editor to write scripts groovy for ODI and how did you do?
concerning
Leon
If yes go to the following Oracle\Middleware\Oracle_ODI1\modules\oracle.jps_11.1.1 location
and get next to the jar jps - api .jar file and add it to your project / as appropriate classpath or search this jar file on your server ODI where the J2EE agent is installed
-
Run the command line script AfterFX
Hi all
I'm trying to run a script from the command line AfterFX.exe and I get the message: "unable to run the script at line 1. Syntax error.
If I run the same Script AE editor script file, it works perfectly
Here is the command line that I use:
"C:\Program Files\Adobe\Adobe after effects CS6\Support Files\AfterFX.exe" indefinite display - noui s 'D:\Product\Watermark\Rendering\WatermarkedSecuritySample.jsx '.
Someone has an idea of what may cause this error? I tried to run the script directly from the command line like
"C:\Program Files\Adobe\Adobe after effects CS6\Support Files\AfterFX.exe" indefinite display - noui s 'alert('1') '.
and it works very well for small script but mine is way big to do
As you can probably guess with the 'watermark' and 'Security' in the name of the file, I can't post here, the script file, all I can say is that line 1 is:
{
projectName = "D:\\Product\\WatermarkTemplate.aep"; var
I tried to replace the entire script 'alert('1')'; and it causes the same error when running it from the command line
Also, if anyone knows where I can find the command line arguments AfterFX.exe description, I'd be very happy... everybody talks about aerender.exe, but I need these options to AfterFX.exe
Thanks for your help
Have you tried using "-r" instead of "-s"?
("-s" argument is a script; and to "-r" argument is a path to the script)
-
How to create a command line user
I have a *.sql file. The content of this file is as follows:
create user newuser identified by eu1;
grant resources, connect to newuser;
commit;
I want that user that can key in user name entry and password in the command line. How to do this?
If I want to put this *.sql who can read the content of another text file. For example, the text file has following: tracking, webUserPassword
How to change the *.sql?1. no need to hire some DDL statements.
2. use &, for example:create user & username identified by & password;
Or look for the "accept" in the SQL command * over the reference of the user.
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14357/TOC.htm
-
Is there a way to generate a report via the command-line script or groovy?
I would like the option to generate a report (for example, model "Host physical load summary") from the command line, where I will provide the settings he needs. Is there a way to do in groovy?
Okay, maybe this constant is not declared in 5.5.8.2 yet. Just replace-1
-
How to create a 'command-line interface' for a game?
Hey people,
For a game that I have to make a similar command-line interface where the user has at least 3 options to respond with, anyone know how to on this subject?
I hope someone here can help me out!
Kind regards
Angela
I don't know what part of it, you are having trouble with. Imagine for a moment that instead of asking for your end user typing something into a text input field and monitor what they type (maybe), who instead of you provide 3 buttons on your stage. Answering a press of button in this scenario as respondent to typed user input - your film something is based on the interaction of the user. Enter the user entered text scenario, a text or field sprite can detect the key ENTER and examine the string that the user entered, something like:
on keyDown me if _key.keyCode = 36 then stopEvent sText = sprite(me.spriteNum).member.text case sText of "hack": -- do whatever you need to here "research": "wait": otherwise: end case else pass end if end
-
Command line PNTools on install
Hello
I try to install the msi pntools as an application of SCCM. Environment, we want to only install the kernel and the universal printer driver. I have been looking for documentation on how to achieve this goal, but have not found any so far. Can someone point me in the right direction?
TIA
Hello
If you look at the list of features in the MSI PNTools, you see the following characteristics:
USB_IT - virtual USB hubs
MMR - redirection of WMP
Required_Components - base
DNA - (required on WAN) latency reduction - part of Required_Components
FMMR - Flash redirect
MM_GA - acceleration of the existing graphics - part of Required_Components
Metaprofiles_IT - user profile management
PNShell - connection measurements - part of Required_Components
-Print_IT Universal printer Driver
So to install the kernel more UPS, you have Required_Components and Print_IT
I'm sure that (but not 100% sure) you need the following:
MSIEXEC /i pntools.msi ADDLOCAL = Required_Components, Required_Print_IT/SB /forcerestart
Kind regards
Rick
-
create the user from the command line
I use Windows 7, I don't have a password reset disk and don't remember the password. How to create a user account from the comand prompt I can change the passwords?
This has not answered my question. I could not connect. I found the answer and was able to activiate the account administrator hidden and solved the problem in this way.
Thank you
I'm intrigued by your answer, and here's why:
- The subject of your message is 'create the command line user '. The answer I gave you will certainly do so.
- If you had stated that you were unable to connect while I gave you a method to solve this problem.
- Find your own solution, but you chose to keep it to yourself, depriving other people who might read this thread for your answer.
If this happens again, then I recommend using a topic as "you forgot my password, can not connect" as this could summarize your situation in a sentence. Create an account from a command prompt has no relevance in your case.
-
Hello
I use shell, awk and php scripts to encapsulate sqlplus for html output requests
Simple question:
1 - What is the best (or fastest) way to generate an HTML output of a command line script (sqlplus, sqlcl, sqldeveloper)
Subsequently, I use sqlplus on a linux machine, because he does not expect 4 or 5 seconds for the launch of all java stuff on every single batch request, and does not expect the end user to the browser page
can 2 - I use other databases (of course with the related jdbc drivers) with sqlcl?
(with sqldeveloper, can interrogate data bases mysql or mssql)
Sorry for my English.
Thanks in advance.
Stone
Set html sqlformat
coil...
Run your query
If you don't like HTML, you might investigate our new SCRIPT function that lets you use javascript to work against your resultset - Kris examples on his blog.
SQLcl is only for the Oracle database
-
Manager command line tool extension works is not in Windows 10
Hi all
When we try to use the Extension (exmancmd.exe) Manager command-line tool to install a new Panel in Windows 10 his watch denied access message.
Also, when we try to see the details of command Exmancmd.exe line its says "this application cannot run on this PC.
Please find the screenshot.
Thank you and best regards,
Anoop
Maybe it's some setting (?) Windows security; works well on my Win10 systems.
-
Launch application from command line
ImageMagick is a graphics reportoire command line application. I wish I could control this (launch windows command line scripts) within Director.
Is this possible?
Thank youFree ShellXtra looks like Valentine's day a good fit for you:
Maybe you are looking for
-
I lost my contacts after software update and I do not use the icloud
-
iOS 9.3 update problems with links
Problem with update of the iOS 9.3 software. Links do not work in: Mail whatapp text messages Safari Did the following: Reset the phone settings hard power off. javascript disabled compared the parameters with the iPad (which was not new software upg
-
EU of Vista Multilingual User Interface Pack
I just read a story on Vista and change a display language. http://forums.computers.Toshiba-Europe.com/forums/thread.jspa?threadID=25723 Windows Vista supports other languages, EU Vista has Pack (Multilingual) user who allows to easily switch between
-
as hago cuando el don't welcome laucher no intensification
is sony vaio model PCG-2J3L
-
Run the C90, MXP We connect vidoe conference with an option to purchase at the rate of vc 1920 Kbps but Monitor 2.5 M flow to the PRTG program (on recive, transfer rate) Call rate rate of VC and flow in a network is any different? If it is different,