Bundling a Windows Instance in the AppNexus Cloud
Bundling a windows instance is a little more complicated than bundling a Linux instance. The API recognizes two kinds of windows images, described below.
This is an image used for launching clones of an original system. I.e. you can use that image in order to launch an arbitrary number of independent instances. To create a standard image from an existing Windows instance in the AppNexus cloud perform the following steps:
1. Reset Administrator's password.
- Go to
Start -> Administrative Tools -> Computer Management -> Local Users And Groups -> Users.
- Right click on user
Set Password, push
OK, leave all input fields empty.
2. Prepare the OS on the original instance. This includes launching the exterior tool
- Go to
Start -> Find, find
deploy.cabto new folder, say
Reseal(leave other settings unchanged).
sysprep.exe completes, the instance will be automatically shut down from within.
4. Wait 1-2 minutes while instance's state is changed to
manage-instance list command will let you know it is offline.)
Important note: Once offline, the instance becomes totally unavailable. Even the
manage-instance restart command would not bring it to life. However, you can now easily bundle this instance. Also note that this statement only applies to standard instances.
5. Bundle the instance using
manage-instance bundle command. For example:
Note: You must use the
--username parameter to perform CLI commands or else store credentials in
rpc.cfg config file instead. Please, refer to API documentation section for details.
Now you can use your custom image in order to launch clones of original system. For example:
Note: You may use the
--admin-password option to set a custom password at launch time. If you do not do this, the API will set a password for you. See Launch a Windows Instance for details.
You can access the newly-launched instance via Microsoft's Remote Desktop Protocol (RDP).
6. Delete the original instance.
A backup image is used for the following purposes: restoring of the original system in case of failure, replacement of an original system, launching not a new independent instance. The following attributes on the newly started instance should necessarily be the same for original one:
cpu_units, memory, disk, IP address.
In order to create backup image you'll need to execute two CLI commands. Example:
To use a backup image you need to delete the original instance first via
manage-instance delete command. To restore the instance, issue the
manage-instance launch command, pointing the path option to backup image.
Note: An instance restored from a backup image always has the same Administrator's password as on the original instance, regardless of the auto-generated value displayed in the output of 'manage-instance list -v' command or a value passed via --admin-password optional parameter.