I encountered this problem yesterday working with a Windows 7 base image. I believe it's caused by a bug in Cygwin 1.7 which was recently released. Cygwin 1.7 is the version you get if you download setup.exe from the main cygwin.com page. There's a thread about the problem affecting 64-bit Windows:
http://sourceware.org/ml/cygwin/2010-01/msg01185.html

From what I've seen, the command will work via Cygwin/SSH if you run it without the .exe extension on cmd.exe. I'm assuming your attempting to create a 32-bit XP base image? I wasn't sure if the problem affected all Windows versions running Cygwin 1.7 or only affects Windows 7/64-bit/??? so this is good to know.

I would hold off on Cygwin 1.7 because of this problem and other things have changed. The options for mount and umount have changed causing cygwin-sshd-config.sh to display some warnings. 1.7 hasn't been tested and I don't know if anything else will cause problems.

I updated the Cygwin installation instruction with a big red warning:
http://cwiki.apache.org/confluence/pages/viewpage.action?pageId=4589006

Try this:
-Uninstall Cygwin. There may not be an entry in Add/Remove Programs. If not, just delete C:\cygwin.
-Download and install setup-legacy.exe which installs Cygwin 1.5:
http://cygwin.com/setup-legacy.exe
-Follow the same VCL Cygwin installation instructions.

The mix of slashes shouldn't be a problem. Cygwin should translate them correctly when the command is executed. The reason for the first backslash is because the C:\Windows part comes from the expansion of Cygwin's $SYSTEMROOT variable. Cygwin's bash shell has equivalent variables for the DOS/Windows environment variables, so %SystemRoot% is exposed as $SYSTEMROOT in Cygwin/bash. I try to use environment variables whenever possible rather than hard-coding 'C:\Windows'. The remaining forward slashes are from VCL code. It's easier to use forward slashes because backslashes can become an escaping nightmare.

Hope this helps,
Andy

Terry McGuire wrote:
On 2 Feb 2010, at 0807h, Andy Kurth wrote:

The problem has to do with SSH checking the known_hosts file.  Try adding the following 
to /etc/ssh/ssh_config before the "Host *" section:

Host vmguest-* vmhost-* 10.*
  UserKnownHostsFile /dev/null
  StrictHostKeyChecking no

This will cause SSH to ignore the known_hosts file for your VMs and VM hosts on 
the private network.  The host keys change often as computers are reloaded. 
Adjust the Host line to match your computer naming convention and private IP 
addresses.



Yay!  The above addition, tweaked for our setup, did the trick.  No more SSH 
warnings.

Now, I'm sorry to say, I've got a whole new group of warnings, starting with:

______________
2010-02-03 10:37:35|2273|1:13|image|utils.pm:run_ssh_command(6180)|executing 
SSH command on vmguest-1:
|2273|1:13|image| /usr/bin/ssh -i /etc/vcl/vcl.key  -l root -p 22 -x vmguest-1 
'$SYSTEMROOT/System32/cmd.exe /c "mkdir \"C:/Cygwin/home/root/VCL\""' 2>&1

|2273|1:13|image| ---- WARNING ---- |2273|1:13|image| 2010-02-03 10:37:35|2273|1:13|image|Windows.pm:create_directory(831)|failed to create directory on vmguest-1: C:/Cygwin/home/root/VCL, exit status: 126, output:
|2273|1:13|image| bash: C:\WINDOWS/System32/cmd.exe: Bad address
|2273|1:13|image| ( 0) utils.pm, notify (line: 737)
|2273|1:13|image| (-1) Windows.pm, create_directory (line: 831)
|2273|1:13|image| (-2) Windows.pm, copy_capture_configuration_files (line: 5908)
|2273|1:13|image| (-3) Windows.pm, pre_capture (line: 179)
|2273|1:13|image| (-4) Version_5.pm, pre_capture (line: 85)
|2273|1:13|image| (-5) vmware.pm, capture (line: 1202)
|2273|1:13|image| (-6) image.pm, process (line: 162)
______________

...and followed by other warnings that appear to be consequences of this one, 
and ending with failure.

The mix of slashes and a backslash in "C:\WINDOWS/System32/cmd.exe" looks wrong 
to me, and it seems connected to $SYSTEMROOT, but that's as far as I can take it.

Hoping the end of this tunnel arrives soon...

Terry

________________________________________________

Terry McGuire
Junior Analyst, Research Support Group
Academic Information & Communication Technologies (AICT)
University of Alberta
Edmonton, Alberta, Canada  T6G 2H1
Phone:  780-492-9422

This communication is intended for the use of the recipient to which it is 
addressed, and may contain confidential, personal, and/or privileged 
information.  Please contact us immediately if you are not the intended 
recipient of this communication.  If you are not the intended recipient of this 
communication, do not copy, distribute, or take action on it.  Any 
communication received in error, or subsequent reply, should be deleted or 
destroyed.

Reply via email to