Re: Base image capture failure

2010-03-18 Thread Andy Kurth

Hi Terry,
Sorry for the delay.  This information is helpful.  You're right, the root cause 
seems to be that sysprep_cmdlines.cmd isn't running.


I have seen the issue where you can't enter a password before.  This only seems 
to happen for the newer style logon screen, not the classic logon screen.  I'm 
not sure of the cause but you can get to the classic logon screen by pressing 
Ctrl-Alt-Del twice.  Under the VMware console, press Ctrl-Alt-Insert twice.


You can begin troubleshooting by examining C:\Windows\setuplog.txt file.  There 
should be a few lines that look like the section I have copied to the end of 
this message.  Search setuplog.txt for sysprep_cmdlines.cmd.  Does anything 
show up?


Next, examine the Sysprep files.  A copy of the same exact Sysprep files used 
when the image loaded should still be on the computer in 
C:\cygwin\home\root\VCL\Utilities\Sysprep.  This directory is copied to 
C:\Sysprep before an image is captured.  Sysprep automatically deletes 
C:\Sysprep when it finishes, so the VCL code copies everything to C:\cygwin\... 
and then makes an additional copy in C:\Sysprep so that the files are retained 
for troubleshooting.


The InstallFilesPath=C:\sysprep\i386 line is correct.  Within the Sysprep 
directory, there should also be the following file:

C:\cygwin\home\root\VCL\Utilities\Sysprep\i386\$oem$\cmdlines.txt

This InstallFilesPath line in sysprep.inf causes cmdlines.txt to be processed 
during minisetup.  Sysprep automatically calls the commands in cmdlines.txt 
before the computer boots Windows for the first time.  You should see a call to 
sysprep_cmdlines.cmd in cmdlines.txt.


So, make sure of the following:
-cmdlines.txt resides in the location noted above
-cmdlines.txt includes a line calling sysprep_cmdlines.cmd

You can troubleshoot this by manually running Sysprep.  But first, load your 
image by making an imaging reservation (Manage Images - Create/Update image) 
rather than a normal reservation.  The reason for this is because VCL configures 
the VM to run in persistent mode for imaging reservations and nonpersistent mode 
for normal reservations.  If the VM is running in nonpersistent mode and you 
reboot the machine, it will likely restart in the initial hard drive state saved 
in the .vmdk files rather than the state the VM before it was rebooted.  If 
running in persistent mode, the VM's hard drive state is saved when it is rebooted.


Manually run Sysprep:
-Log in as root
-Copy the entire Sysprep directory under C:\cygwin to C:\
-Copy the entire C:\cygwin\home\root\VCL\Drivers directory to C:\Sysprep
-Delete C:\cygwin\home\root\VCL\Logs to replicate the original state
-Run the command: C:\Sysprep\sysprep.exe /quiet /reseal /mini /reboot

You should see the computer reboot into the minisetup phase.  Towards the end of 
this phase, you should see some black command boxes appear then close.  This is 
when sysprep_cmdlines.cmd is being run.  It should then reboot again and 
automatically log on as root.


If you don't see the black boxes during minisetup and it doesn't autologon, try 
manually running the command contained within cmdlines.txt after Sysprep is done:

-Log in as root
-Delete C:\cygwin\home\root\VCL\Logs
-Open cmd.exe
-Run this command (1 line):
cmd.exe /c C:\Cygwin\home\root\VCL\Scripts\sysprep_cmdlines.cmd  
C:\Cygwin\home\root\VCL\Logs\sysprep_cmdlines.log 21


If things still aren't working, I'm wondering if it could be a permissions 
problem.  Make sure root is the owner of its home directory:

-Log in as root
-Open a Cygwin shell
-Run: chown -R root:Administrators ~/
-Try running Sysprep again

Hope this helps,
Andy



setuplog.txt section showing where sysprep_cmdlines.cmd was run:

03/12/2010 
15:08:14.155,d:\xpsp\base\ntsetup\syssetup\log.c,133,,SetUpVirtualMemory: loc 1
03/12/2010 15:08:14.155,d:\xpsp\base\ntsetup\syssetup\log.c,133,,Setup 
configured the system to place a 384 MB pagefile on drive C:.
03/12/2010 15:08:14.155,d:\xpsp\base\ntsetup\syssetup\log.c,133,,Crashdump was 
enabled.
03/12/2010 
15:08:14.155,d:\xpsp\base\ntsetup\syssetup\log.c,133,,SetUpVirtualMemory: EXIT (1)
03/12/2010 15:08:14.155,d:\xpsp\base\ntsetup\syssetup\syssetup.c,2725,,Power 
scheme: desktop.
03/12/2010 
15:08:14.155,d:\xpsp\base\ntsetup\syssetup\syssetup.c,2729,,SetActivePwrScheme 
succeeded.
03/12/2010 15:08:21.343,d:\xpsp\base\ntsetup\syssetup\log.c,133,,The external 
program cmd.exe /c C:\Cygwin\home\root\VCL\Scripts\sysprep_cmdlines.cmd  
C:\Cygwin\home\root\VCL\Logs\sysprep_cmdlines.log 21 returned exit code 0.
03/12/2010 
15:08:21.343,d:\xpsp\base\ntsetup\syssetup\syssetup.c,4034,BEGIN_SECTION,Fixing 
up hives
03/12/2010 
15:08:21.593,d:\xpsp\base\ntsetup\syssetup\syssetup.c,4041,END_SECTION,Fixing up 
hives


Re: Easy way to search mail archive?

2010-03-18 Thread Andy Kurth

Hi Mark,
There are a few archive tools listed on this page:
http://www.apache.org/foundation/mailinglists.html

I set up a MarkMail set to include messages from all vcl-* lists and anything 
containing VCL or Virtual Computing Lab:

http://markmail.org/set/jlmr2rdvup4w2

-Andy

Mark Gardner wrote:

Has anyone found an easy way to search the mail archive? I suspect that at
least some of my questions have been answered before but I am finding it
very tedious to check before I post.

Mark





RE: Reservation Error:

2010-03-18 Thread Kumar, Amit H.
Ah! .. I see. Seems like I started with a wrong assumption. 

I didn't not do the capture image process yet. I wanted to see if I can make a 
reservation for the already existing VM, that I built with the name 
'vmwarewinxp-base7-v0' and placed it under the Data-Store-Path on the VMhost 
that built it.

Yes you were right I was missing the IP address in the Data-Store Path: I will 
put in the VMhost IP here.
In that case shouldn't I generate-node-key's for all the VMhost's because it 
will try to SSH to it to get to the Data-Store-Path?


Thank you Andy for the help ... I will give image capture a try first.
Amit


 -Original Message-
 From: Andy Kurth [mailto:andy_ku...@ncsu.edu]
 Sent: Thursday, March 18, 2010 10:56 AM
 To: vcl-dev@incubator.apache.org
 Subject: Re: Reservation Error:
 
  376 |16651|5:5|new|  WARNING  ^M
  377 |16651|5:5|new| 2010-03-17
 13:02:45|16651|5:5|new|DataStructure.pm:_automethod(675)|corresponding data 
 has not
 been initialized for get_computer_preferredimage_id: 
 $self-request_data-
 {reservation}{5}{computer}{preferredimage}{id}^M
  378 |16651|5:5|new| ( 0) utils.pm, notify (line: 737)^M
  379 |16651|5:5|new| (-1) DataStructure.pm, _automethod (line: 675)^M
  380 |16651|5:5|new| (-2) Autoload.pm, __ANON__ (line: 80)^M
  381 |16651|5:5|new| (-3) new.pm, process (line: 106)^M
  382 |16651|5:5|new| (-4) vcld, make_new_child (line: 594)^M
  383 |16651|5:5|new| (-5) vcld, main (line: 341)^M
 
  # Not sure if I am missing something here.
 
 This isn't a problem.  It occurs because computer.preferredimageid isn't set 
 in
 the database.  It should get set automatically after a successful reservation 
 is
 made on the computer.
 
  475 2010-03-17 
  13:02:46|16651|5:5|new|utils.pm:run_ssh_command(6180)|executing
 SSH command on resxi-2:^M
  476 |16651|5:5|new| /usr/bin/ssh -i /etc/vcl/vcl.key  -l root -p 22 -x 
  resxi-2 'cat
 currentimage.txt' 21^M
  477 2010-03-17
 13:02:47|16651|5:5|new|utils.pm:run_ssh_command(6262)|run_ssh_command 
 output:^M
  478 |16651|5:5|new| cat: currentimage.txt: No such file or directory^M
 
  # currentimage.txt : Is this something that we have to create at 
  anytime? I am
 thinking it is created automatically when a image is loaded for the first 
 time.
 
 This appears to be a problem.  You never have to manually create/alter
 currentimage.txt.  It should be created automatically during the image capture
 process and saved within the image.  This file is used when a reservation is
 made to determine if the correct image is loaded on the computer in order to
 know if the computer needs to be reloaded or not.  The computer will be 
 reloaded
 every time a reservation is made if the file is missing or incorrect, even if
 the correct image is loaded.
 
 Check if currentimage.txt exists in root's home directory on that computer.  
 You
 should be able to shell into it from the management node via:
 ssh -i /etc/vcl/vcl.key -l root -p 22 -x resxi-2
 
 Then run ls -l ~.  What do you see?
 
 If you still have the vcld.log output from the image capture process, search 
 it
 for currentimage.txt to see if anything went wrong.
 


  516 2010-03-17 
  13:02:47|16651|5:5|new|utils.pm:run_ssh_command(6180)|executing
 SSH command on /install/image/nfs1:^M
  517 |16651|5:5|new| /usr/bin/ssh -i /etc/vcl/vcl.key  -l root -p 22 -x 
  /install/image/nfs1
 'ls -1 /golden 21' 21^M
 
  # This is where my real issues are: I realized reading the README for 
  esx and
 esxthin, that I need to have a VCL mount point and a subdirectory /golden for 
 my images
  But what I am missing here is why is it trying to ssh -x 
  /install/image/nfs1 which is
 actually the Data Store path. Isn't it supposed to ssh to my VMhost machine.
  Also when does VCL code use the esxthin.pm, as opposed to esx.pm?
 
 The previous two questions are related.  I'm not too familiar with the esx.pm
 module but you cannot ignore this.  From looking at the code, the warning is
 being displayed because there's a problem with your VM host profile's data 
 store
 path value.  It's looking for this setting to be in the format:
 IP address:datastore path
 
 Check this setting:
 Virtual Hosts  VM Host Profiles  Configure Profile  Data Store Path
 
 I'm guessing it doesn't include the IP address where the golden images reside 
 or
 a colon.  The ls -1 SSH command above is being incorrectly assembled because
 of this.  It's inserting /install/image/nfs1 where the IP address should go.
 Once the data store path is changed to include IP address:, the command
 should be assembled correctly as:
 /usr/bin/ssh -i /etc/vcl/vcl.key -l root -p 22 -x IP address 'ls -1
 /install/image/nfs1/golden 21'
 
 The rest of the SSH errors are occurring because it's attempting to connect to
 the computer with the address /install/image/nfs1.
 
  518 ^M
  519 |16651|5:5|new|  WARNING  ^M
  520 |16651|5:5|new| 2010-03-17
 

Re: Reservation Error:

2010-03-18 Thread Andy Kurth
Yes, the management node needs to be be able to SSH to the VM hosts before 
attempting the image capture, or any other VM operations.  Assuming password 
authentication is still enabled on the VM hosts, you can run gen-node-key.sh 
IP for each of them.  I wouldn't try the VCL image capture process until this 
works:

ssh -i /etc/vcl/vcl.key -l root -p 22 VM host IP

-Andy

Kumar, Amit H. wrote:
Ah! .. I see. Seems like I started with a wrong assumption. 


I didn't not do the capture image process yet. I wanted to see if I can make a 
reservation for the already existing VM, that I built with the name 
'vmwarewinxp-base7-v0' and placed it under the Data-Store-Path on the VMhost 
that built it.

Yes you were right I was missing the IP address in the Data-Store Path: I will 
put in the VMhost IP here.
In that case shouldn't I generate-node-key's for all the VMhost's because it 
will try to SSH to it to get to the Data-Store-Path?


Thank you Andy for the help ... I will give image capture a try first.
Amit