Script for VMWare ESX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script for VMWare ESX
# 1  
Old 05-04-2010
Script for VMWare ESX

Hi

I would make a script for my ESX server. Unfortunately I'm beginner in shell scripting.

I will do the following:
# With the command vmware-cmd -l I can do a listing like this
File1.vmx
File2.vmx
File3.vmx
File4.vmx
File5.vmx

# Now with every single line of this output I will execute the following
# vmware-cmd <output line 1> create
# Example:
Code:
vmware-cmd File1.vmx create

Could you please help me with this script.

Best regards,
# 2  
Old 05-04-2010
Hi,

Create a file with your output
Code:
vmware-cmd -l > /path/outputfile

Then use the below code.

Code:
#!/bin/sh

while read OUTPUT_LINE
do

vmware-cmd $OUTPUT_LINE create

done < /path/outputfile

# 3  
Old 05-04-2010
Or alternatively:

Code:
vmware-cmd -l | xargs -I{} vmware-cmd {} create

Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Virtualization and Cloud Computing

solaris virtual machine vmware esx

Hi All How would you send a solaris virtual machine in vmware esx, a break signal? :confused: (0 Replies)
Discussion started by: jakerock
0 Replies

2. SuSE

SuSE 10 32bit Hardware interupts on VMWare ESX 4i

Hi! Does anyone know how a high percentage of Hardware Interrupts does affect a Linux system? any why does it generate hardware interrupts? The affected system is a SuSE 10.2 32bit running 2.6.16.60-0.33-vmi #1 SMP Fri Oct 31 14:24:07 UTC 2008 i686 i686 i386 GNU/Linux procinfo shows that... (2 Replies)
Discussion started by: Esaia
2 Replies

3. Solaris

VMware ESX 3.5

Hi, I am going to install solaris cluster 3.2 in vmware esx 3.5 for demo, for cluster we need two different network interfaces for private and pubic connectivity, but we have single ethernet controller how to create two different ethernet instance name with single ethernet controller in vmware... (1 Reply)
Discussion started by: rajasekg
1 Replies

4. Solaris

Solaris 10 Cluster on VMware ESX 3.5

Hello everybody, I'm trying to create a S10 cluster on ESX 3.5 servers but I have several problems. I use AMD Athtlon x64 CPU's on ESX servers and Solaris 10 U8 at my guest servers.. First and the most important problem, I dont know how to attach a RDM disk to Solaris 10. (Is it correct,... (1 Reply)
Discussion started by: shadowfaxxxx
1 Replies

5. Red Hat

Minicom with VMWare ESX Server

Hello! I have an ESX Server up and running. Now I want to connect a serial device to the COM Port. For that I need the minicom program. When I try "configure - make - make all" I get some errors. Can someone please explain to me, what the problems are: # ./configure checking for a... (3 Replies)
Discussion started by: Kickbit
3 Replies

6. BSD

import freeBSD into VMWARE (ESX 3.5)

hi howto import physical freeBSD 7.0 into VMWARE (ESX 3.5) as a guest/virtual server ? can I use VMware Converter ? greetings ccc (3 Replies)
Discussion started by: ccc
3 Replies
Login or Register to Ask a Question