On 18 Mar 2010, at 0742h, Andy Kurth wrote:

> 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.

Weirdly, sometimes I need the classic logon, sometimes I don't.  Whatever.  I 
use it when I need to.

> 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?

Yes, just like in your example, except it returns an exit code of 1.  That's 
bad, right?  Except, skipping ahead a bit, all is well when I apply the 
sysprep_cmdlines.cmd fix I figured out, exit code 0.  Keep reading.

> 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.

Ah, that explains the InstallFilesPath=C:\sysprep\i386" bit.

> 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

This all looks good.

> 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.

Same results - autologin doesn't happen.

> 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 2>&1

Logging in manually after running sysprep manually, I still don't have the log 
folder.  Running sysprep_cmdlines manually, entered exactly as you have it 
here, I get "The system cannot find the path specified."  Hmm.  If I manually 
create a Logs dir, then rerun the command, stuff happens.  Looking at the 
resulting sysprep_cmdlines.log file, it exits with a status of "0".  Ok, I then 
restart.  More promising looking things happen.  Autologin, many black boxes, 
then autologout.

I did examine the permissions for root, and all looked good.  I even applied 
the chmod as you suggested, but the problem persisted.  I've now tweaked the 
image to have the Logs folder pre-created, and things seem to work fine.  
Autologin, many black boxes, and, when I make a reservation, it makes it all 
the way to "Connect!" without manual intervention.  However, unfortunately, I 
still can't login with RDC.

Manually logging back in again via the console, and looking at the post_load 
log, I see it's exited with a 1.  Looking more closely, 
configure_networking.vbs is exiting with an "errorlevel: 1".  Looking at its 
log, I see this:

configure_networking.vbs beginning to run: 3/23/2010 12:53:50 PM
Windows Version: 5.1.2600
12:54:26 PM
Printing routing table, command: cmd.exe /c %SystemRoot%\system32\route.exe 
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 50 56 00 00 00 ...... AMD PCNET Family PCI Ethernet Adapter #3 - 
Packet Scheduler Miniport
0x10004 ...00 50 56 00 00 01 ...... AMD PCNET Family PCI Ethernet Adapter #4 - 
Packet Scheduler Miniport
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
       30       1      30       30      30       30       30       30      30       30      1       1
Default Gateway:
Persistent Routes:
Printing routing table successful, exit code: 0
12:54:27 PM
12:54:27 PM
Running ipconfig /all, command: cmd.exe /c %SystemRoot%\system32\ipconfig.exe 

Windows IP Configuration

An internal error occurred: The file name is too long.

Please contact Microsoft Product Support Services for further help.

Additional information: Unable to query host name.

Running ipconfig /all successful, exit code: 0
12:54:28 PM
*** AMD PCNET Family PCI Ethernet Adapter (Index: 1) ***

Adpater name: AMD PCNET Family PCI Ethernet Adapter
Ignored adpater name section: 
Ignored adpater description section: 
IP address:
Matching VCL private address section: 
Matching non-public address section: 
* PUBLIC_NAME          = Local Area Connection
* DHCP enabled         = True
* PUBLIC_IP            =
* PUBLIC_DESCRIPTION   = AMD PCNET Family PCI Ethernet Adapter
*** AMD PCNET Family PCI Ethernet Adapter (Index: 4) ***

Adpater name: AMD PCNET Family PCI Ethernet Adapter
Ignored adpater name section: 
Ignored adpater description section: 
IP address:
Matching VCL private address section: 
Matching non-public address section: 192.168
IP address is not a public nor valid VCL private address:
12:54:29 PM
PRIVATE_NAME          = 
PRIVATE_IP            = 

PUBLIC_NAME           = Local Area Connection
PUBLIC_IP             =

Failed to retrieve private and public network configuration, returning exit 
status 1

Which looks bad to me.  Poking around a bit, it seems that 
configure_networking.vbs expects my private lan to be 10.x.x.x, but I've got it 
as 192.168.x.x, as per other documentation.  Is this relevant?

To summarize this round of glitch-squishing, the sysprep_cmdlines.cmd issue, 
with the symptom of the failure to autologin after running sysprep, seems to be 
solved, or at least worked around, by the pre-creation of the Logs folder.  But 
the inability to connect via RDC after the reservation is made persists, which 
may be due to something going wrong with the configure_networking.vbs script.

Back to you, Andy (with continued gratefulness for your help).


Reply via email to