VMware {code} Community
jrackliffe
Hot Shot
Hot Shot
Jump to solution

WinPE Guest PreBoot Environment

Looking to leverage the guestSDK if at possible to help with this workflow.

I have to provision new VMs in a VC managed ESX hosted environment. This environment is a static IP only space. I would like to "no-touch" the deployment by leveraging a couple aspects of the VC and Guest SDKs.

Generate a VM in VC

Add a DynamicProperty to the VM that holds the target static IP of the VM

Boot to WinPE and using the GuestSDK access the VC with no network connectivity and extract the stored IP. I can take it from there.

This is no short order I understand. Can someone let me know if this is even feasible via the Guest SDK?

Reply
0 Kudos
1 Solution

Accepted Solutions
arent_t
Hot Shot
Hot Shot
Jump to solution

This is the way I do it.

\-. provision the VM (VI SDK)

\-. Attach the winPE ISO

\-. Startup the VM

\-. As I dont have DHCP available and so have to use static IP addresses, part of the process I create a vflop containing a winbom.ini file which contains the IP settings and get red and applied at the factory process of winPE. (I attach the vflop about 5 seconds later then the power-on of the VM to make sure it boots of the ISO and not the vflop).

Once in winPE, it kicks off the windows installation. This entire process has been scripted and the vmtools have been integrated into WinPE. (check here http://blogit.nu/content-10.html for integrating the vmtools in your winpe build). ps. at the time I had to use winPE 2005, nowadays your probably using winPE 2.0. To integrate the tools in winPE 2.0, you have to load the registry of your PE build, add the registry changes, unload and build your final ISO.

Hope this helps.

View solution in original post

Reply
0 Kudos
10 Replies
hrobinson
VMware Employee
VMware Employee
Jump to solution

I can tell you how to do this with vmware tools. How you connect this to WinPE is outside my comfort zone.

1) Set a value for a guestinfo variable.

For the VI SDK, you set a property in VirtualMachine.config.extraConfig.

see attached perl code for an example.

Note that the variable should start with "guestinfo." which is the namespace that is shared to the VM. Let's say you name it "guestinfo.x"

The variable is non-persistent. It goes away if you power down a VM.

2) From the guest, you use vmwareservice.exe -cmd "info-get guestinfo.x"

This will work for you.

Reply
0 Kudos
jrackliffe
Hot Shot
Hot Shot
Jump to solution

I will take a look around on if anyone has successfully integrated the tools as part of their WinPE release. Because the tools do some integration I am thinking this won't be trivial.

Looking at the GuestSDK doco some more I still am only seeing performance metrics of the VM on the Host, but nothing about the use of extraConfig properties. If that is currently not exposed via the GuestSDK I would heartily recommend adding that to the lib as that should be far easier to integrate than the heavier tools service.

Will post back if I have success.

Reply
0 Kudos
arent_t
Hot Shot
Hot Shot
Jump to solution

This is the way I do it.

\-. provision the VM (VI SDK)

\-. Attach the winPE ISO

\-. Startup the VM

\-. As I dont have DHCP available and so have to use static IP addresses, part of the process I create a vflop containing a winbom.ini file which contains the IP settings and get red and applied at the factory process of winPE. (I attach the vflop about 5 seconds later then the power-on of the VM to make sure it boots of the ISO and not the vflop).

Once in winPE, it kicks off the windows installation. This entire process has been scripted and the vmtools have been integrated into WinPE. (check here http://blogit.nu/content-10.html for integrating the vmtools in your winpe build). ps. at the time I had to use winPE 2005, nowadays your probably using winPE 2.0. To integrate the tools in winPE 2.0, you have to load the registry of your PE build, add the registry changes, unload and build your final ISO.

Hope this helps.

Reply
0 Kudos
jrackliffe
Hot Shot
Hot Shot
Jump to solution

That is some great info. Integrating the tools into a PE instance \[1.6 or 2.0] would be the optimal case to simplify the interchange, but using the Floppy as a dynamically generated intermediary is an awesome idea should I have some issues.

Thanks for the link which has some fantastic info as I will unashamedly save my self hours of toying with build scripts and use the work already been done.

Thanks again this will be a huge help

J

Reply
0 Kudos
jrackliffe
Hot Shot
Hot Shot
Jump to solution

Reporting back on results.

Following the specified directions from the link below I was able to generate a WinPE 1.6 ISO w VMTools included. I was then able to use the VC SDK as noted above to create a new instance in the extraConfig array and access it in the loaded VM.

This is a huge win for us and I appreciate the assistance. I also like the idea of the CD & Floppy combo and while the tools method is great for this environment that model is a great method for our physical space via the iLo management devices.

Only feedback I could add would be for VMWare to provide a supported and documented WinPE patch \[1.6, 2.0+] for new vmtools releases as the linked user did. This way it will be trivial for customers who use WinPE in their virtual management space to leverage this sort of functionality in their build logic.

Reply
0 Kudos
jrackliffe
Hot Shot
Hot Shot
Jump to solution

As another note.

The info-set functionality allows for a deterministic way to let a monitoring application know when to unmount the ISO after it is loaded.

I and I know others have had the blinking cursor issue with booting off an ISO after booting it once. I am investigating the fdisk /mbr functionality to see if that will allow the CD to be booted over and over w/o compromising an existing install should one exist on the box.

Reply
0 Kudos
arent_t
Hot Shot
Hot Shot
Jump to solution

J, not sure if I do understand correctly but the reason I integrated the tools into the pe build is to know when I can unmount the ISO image. PE gets loaded into the RAM, after it has been loaded I start the vmtools and there is another process that keeps monitoring the status of the VM, as soon tools are started it will unmount the ISO image.

Two other possibilities you have is to use the vmback tools to disconnect the ISO, or in addition to integrating the vmtools also integrate XML which allows you to use vbscripts to target the webservice and do whatever you need to do. Only drawback of the last method is that you leave your username and password to connect to the webservice somewhere in your PE build ...

Reply
0 Kudos
jrackliffe
Hot Shot
Hot Shot
Jump to solution

Sorry we have an entire outside workflow process that manages the end-to-end provisioning of the virtual instance. I needed the vmtools as a solution for a non-volatile data store. I could use the floppy as noted before, but the vmtools allows me to access data I wouldn't otherwise be able to do w/o the complexities of managing IMGs etc. I can just get this data via the "get" function as part of my provisioning.

The "set" allows me to send a flag that CD is done which allows that process to move on. I could use the vmback tools as you note, but doing it via VC is just as easy for me. I am using the VC SDK in that instance to do the unmount as well as all of the other stuff.

Yeah I did integrate the XML support for use in vbscripts to improve the toolkit while in PE.

Currently I get an exception on my -cmd calls because the tools are on a readonly vol and it can't rewrite tools.conf. It is easy to parse out the error, but I didn't know if you had any success getting the cmwareservice to function on a readonly vol w/o throwing an err?

Reply
0 Kudos
arent_t
Hot Shot
Hot Shot
Jump to solution

use the ramdrive or just use the vista version (pe 2.0) so you have the "Scratch Space"

Reply
0 Kudos
jrackliffe
Hot Shot
Hot Shot
Jump to solution

Yeah those were some of my thoughts too.

Wish I could just suppress the messages, but se la vi!

Reply
0 Kudos