Sponsored Content
Top Forums Shell Programming and Scripting Building a script in Ubuntu (Linux) from existing DOS .cmd Post 302380259 by m1xram on Monday 14th of December 2009 04:42:23 PM
Old 12-14-2009
Some notes

The 7z command has '-o"text"', does it require a space?

You might try single quotes around the vmx files. From the first error it appears to be dropping a parameter. Further debugging could be done with...
Code:
vmEngland="/home/administrator/vmware/Virtual Machines/VMs/England"
rmdir -p "$vmEngland"
mkdir "$vmEngland"
vmxorig="/home/administrator/vmware/Virtual Machines/VMs/XPVM/Windows XP Pro.vmx"
vmxclone="$vmEngland/pc1/pc1.vmx"
if [ ! -e "$vmxorig" ]; then
  echo "Error: can't find \"$vmxorig\" "
  exit 1
fi
# Should we test that the clone exists before overwriting? 
# Probably not because the directory was removed and recreated.
if [ -e "$vmxclone" ]; then
  echo "Warning: clone exists \"$vmxclone\" "
  read -p "Continue to overwrite? [n] or y> " ans
  if [ "${ans:0:1}" != "y" ]; then
    exit 2
  fi
  rm "$vmxclone"
fi
# This should FAIL unless the clone command can create 'pc1' path for 'pc1/pc1.vmx'.
# Lets make the pc1 directory..
mkdir -p "$vmEngland/pc1/"
/usr/bin/vmrun -T ws clone "$vmxorig" "$vmxclone" linked
if [ ! -e "$vmxclone" ]; then
  echo "Error: can't find \"$vmxclone\" "
  exit 3
fi
rpl "Clone of Windows XP Pro" "pc1" "$vmxclone"
if [ ! -e "$vmxclone" ]; then
  echo "Error: can't find \"$vmxclone\" "
  exit 4
fi
# You'll probably need to create pc2/ and pc3/ directories also.
vmxclone="$vmEngland/pc2/pc2.vmx"
mkdir -p "$vmEngland/pc2/"
# Repeat above script. This could be a lot better as a loop.
# Check a single section to see if I found the problem and 
# then let me know if you want a loop.

You would also need to check what happened to the leading '/' on the path for pc1.vmx. Did the 'rpl' script remove it?

Last edited by m1xram; 12-14-2009 at 06:50 PM.. Reason: eureka! found it
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

DOS Debug for linux

Hi guys. I'm in desperate need of a program that can allow me to write files to different sectors of a disk (floppy), in the same way the DOS Debug program can (with a command such as -w 100 0 0 1 to write the bootsector of the disk). Does anyone know any links or names of programs that could... (2 Replies)
Discussion started by: KrazyGuyPaul
2 Replies

2. Windows & DOS: Issues & Discussions

rediretion and pipes in DOS shell cmd interpreter

Hello, I am trying to accomplish the following. Send the output of a command to the screen (this happens by default) as well as capture the output of the screen to a log file. How can this be achieved in DOS command interpreter syntax. Any ideas/suggesstions/indicators are greatly... (2 Replies)
Discussion started by: jerardfjay
2 Replies

3. Shell Programming and Scripting

Building a Linux like LS for Unix

I'm trying to customize my environment at work in a Unix system. So I'm starting with the ls command... I'd like to make it run as the Linux ls... Even in color, if possible... My first problem is to make the file listing brake in columns... In fact, the actual ls from Unix does this, but... (3 Replies)
Discussion started by: 435 Gavea
3 Replies

4. Windows & DOS: Issues & Discussions

Awk script in DOS and Linux behaves differently :(

Hi, I have an awk script which performs simple operations of variable assignments and finally printing the variables in custom form. BEGIN {FS=OFS="\n"} { v1=substr($0,1,15) v2=substr($0,16,200) v3=substr($0,216,20) print v1 "|" v2 "|" v3 } The input file being processed... (2 Replies)
Discussion started by: vidyak
2 Replies

5. Windows & DOS: Issues & Discussions

How to connect SFTP(Linux) from Windows DOS

I need to write a batch script for file transfer from SFTP to Windows system. SFTP is on Linux system. I kept this code in batch file and executing it.. but not working.. Even i tried from Command prompt like this "open sftp.host.com" but getting error. Can anyone help with the code and tell me how... (15 Replies)
Discussion started by: mohantmk
15 Replies

6. IP Networking

Need to copy file from Linux to DOS.

I have two PCs with Ubuntu 10.4 and DOS 5.0, which are connected with a 9 pins serial cable. I need to copy some files from the Linux box to the DOS box. I tried UUCP but it's too difficult and i didn't found a working client for DOS. Can you help me? Thanks for any reply! (10 Replies)
Discussion started by: mghis
10 Replies

7. Shell Programming and Scripting

Building a DOS .bat file that will root my Droid 2 phone using adb

1. What I am doing? Building a DOS .bat file that will root my Droid 2 phone using adb commands in the .bat file. (Just for the fun of it and to help me learn "stuff".) 2. Problem: Here are the problem steps to accomplish this task manually in an adb shell: adb shell (Prompt is $) cd... (2 Replies)
Discussion started by: chrstdvd
2 Replies

8. Ubuntu

Copy existing Ubuntu to boot from USB

Hello all, I am looking for a way to copy the existing Ubuntu server 12.04 to a USB (with all the packages and such) and make it boot from the USB. I have seen other threads about copying the CD image to the USB, which is not exactly I am looking for. Before I start diving into anything I... (4 Replies)
Discussion started by: br1an
4 Replies
VMX(4)							   BSD Kernel Interfaces Manual 						    VMX(4)

NAME
vmx -- VMware VMXNET3 Virtual Interface Controller device SYNOPSIS
To compile this driver into the kernel, place the following line in your kernel configuration file: device vmx Alternatively, to load the driver as a module at boot time, place the following line in loader.conf(5): if_vmx_load="YES" DESCRIPTION
The vmx driver provides support for the VMXNET3 virtual NIC available in virtual machines by VMware. It appears as a simple Ethernet device but is actually a virtual network interface to the underlying host operating system. This driver supports the VMXNET3 driver protocol, as an alternative to the emulated pcn(4), em(4) interfaces also available in the VMware environment. The vmx driver is optimized for the virtual machine, it can provide advanced capabilities depending on the underlying host operating system and the physical network interface controller of the host. The vmx driver supports features like multiqueue support, IPv6 checksum offloading, MSI/MSI-X support and hardware VLAN tagging in VMware's VLAN Guest Tagging (VGT) mode. The vmx driver supports VMXNET3 VMware virtual NICs provided by the virtual machine hardware version 7 or newer, as provided by the following products: o VMware ESX/ESXi 4.0 and newer o VMware Server 2.0 and newer o VMware Workstation 6.5 and newer o VMware Fusion 2.0 and newer For more information on configuring this device, see ifconfig(8). MULTIPLE QUEUES
The vmx driver supports multiple transmit and receive queues. Multiple queues are only supported by certain VMware products, such as ESXi. The number of queues allocated depends on the presence of MSI-X, the number of configured CPUs, and the tunables listed below. FreeBSD does not enable MSI-X support on VMware by default. The hw.pci.honor_msi_blacklist tunable must be disabled to enable MSI-X support. LOADER TUNABLES
Tunables can be set at the loader(8) prompt before booting the kernel or stored in loader.conf(5). hw.vmx.txnqueue hw.vmx.X.txnqueue Maximum number of transmit queues allocated by default by the driver. The default value is 8. The maximum supported by the VMXNET3 virtual NIC is 8. hw.vmx.rxnqueue hw.vmx.X.rxnqueue Maximum number of receive queues allocated by default by the driver. The default value is 8. The maximum supported by the VMXNET3 virtual NIC is 16. hw.vmx.txndesc hw.vmx.X.txndesc Number of transmit descriptors allocated by the driver. The default value is 512. The value must be a multiple of 32, and the maxi- mum is 4096. hw.vmx.rxndesc hw.vmx.X.rxndesc Number of receive descriptors per ring allocated by the driver. The default value is 256. The value must be a multiple of 32, and the maximum is 2048. There are two rings so the actual usage is doubled. EXAMPLES
The following entry must be added to the VMware configuration file to provide the vmx device: ethernet0.virtualDev = "vmxnet3" SEE ALSO
altq(4), arp(4), em(4), netintro(4), ng_ether(4), pcn(4), vlan(4), ifconfig(8) AUTHORS
The vmx driver was ported from OpenBSD and significantly rewritten by Bryan Venteicher <bryanv@freebsd.org>. The OpenBSD driver was written by Tsubai Masanari. BSD
March 17, 2014 BSD
All times are GMT -4. The time now is 09:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy