4.5 Modifying a Virtual Machine after Checking In

After a VM has been checked into the warehouse, you can check it out again to make changes to the properties and storage data. You can then check the VM back into the warehouse to create the next version of the VM.

4.5.1 Checking Out a Virtual Machine

To check a VM out of the warehouse, right-click the VM and select Check Out. Checking a VM out moves a copy of the VM into the Workspace section of the VM Management interface. When it is there, you can modify the VM. For information on the VM Management interface, see Workspace View.

4.5.2 Modifying Virtual Machine Properties

When a VM is in a Checked Out status, it can be modified and edited. There are two different types of edit you can perform on the VM in the VM Management interface:

  • Edit: Allows you to change elements of the metadata on the VM.

  • Edit Image: Allows you to create a copy of the VM that is put elsewhere on the drive, so you can open the VM Image and change its inherent metadata, processor architecture, initial hard disk properties, memory properties, and so forth.

To start the edit process:

  1. Select the VM you want to edit.

  2. Do one of the following.

  • Select the Edit or Edit Image options in the File menu.

  • Click the Edit or Edit Image icons in the toolbar.

  • Right-click the VM and select Edit or Edit Image

When you click Edit, the VM Builder Wizard opens again, allowing you to change elements of the metadata of the VM. When you click Edit Image, a version of the VM is saved to a selected directory, where you can open it and make changes to the image itself.

Using the Edit Tool to Edit Virtual Machine Metadata

When you right-click on a VM in the Workspace, you can choose Edit to open the VM Builder Wizard. If the VM has the status of Defining, you can edit any of the initial VM Builder fields. The VM has not yet been built, so you can still add things to the overall metadata for the VM. If the VM has been installed or checked out, you can change only the following:

  • The VM description

  • Any additional arguments

  • VM crash instructions

  • Number and priority weight of processors

  • Startup and maximum memory allocations

  • Graphic mode (if you have fully virtualized the VM)

  • Additional hard disks and CD or DVD disk drives

  • Additional NICs

  • Virtual Network Interface Details

  • Server Name information

Editing the Virtual Machine Image

Click Edit Image to actually edit elements beyond the VM metadata. A dialog box displays that tells you where the image is located so you can open it and modify the VM image.

Figure 4-11 VM Image Location Dialog Box

4.5.3 Modifying and Adding Applications to a Checked-Out Virtual Machine

A VM behaves as if it is a single, physical machine. While it is running, you can add any application to the VM you need. If these applications are made on the first hard disk, the applications are saved as part of the VM image and are called upon when the VM is started again.

One of the specific modifications you might want to make to a VM is to install the Orchestrator VM Agent Pattern in YaST, so the VM is available to ZENworks Orchestrator. For instructions on installing the Orchestrator Agent on a VM, see Installing the Orchestrator Agent on VMs in the Novell ZENworks Orchestrator 1.2 Installation and Getting Started Guide.

4.5.4 Assuring Sufficient Loopback Devices to Allow for Virtual Machines

The Linux kernel allows for a set number of loopback devices, the default is eight. When you run a VM, the Orchestrator Server requires one of those loopback devices for the VM Prep job. The VM Prep job is a shared part of the provisioning adapters. It is used to personalize a VM (that is change identity and network configuration—the so-called autoprep facts). It works by mounting the VM disk over loopback and then modifying configuration files in the VM disk image (via the mount). For more information on the provisioning adapters and their function, see Section 5.3.1, Provisioning Actions from the Right-Click Menu.

When you use the Orchestrator Server to launch a VM you need to be sure that there are enough allowable loopback devices to support the VM. If, for example, the VM has seven mounted loopback devices a VM host machine must have at least nine allowed loopback devices to allow for the seven for the VM and the one for the VM Prep job. If the VM host machine is using a loopback device this device will also count against that total. You can create a VM without a loopback device which will not count against that total.

The default setting for the allowed number of loopback devices can be changed in the kernel.

Setting Up Loopback Devices in the Virtual Machine

You can designate loopback devices by running the VM and mounting the ISO or software you want to have as a mounted loopback device using mount -o loop command just as you would on a physical machine. The number of loopback devices in the VM do not count against the total allowable loopback devices of the host machine.

Changing the Number of Allowed Virtual Machines

In order to change the VM hosts in your data center grid, be sure to have already discovered your VM hosts and your VMs. For information on discovering VM hosts and VMs, see Section 3.2, Building and Discovering Virtual Machines. To change the number of allowed VMs on a VM host machine open the Orchestrator Console:

  1. Open the grid containing the VM host you want to change.

  2. Select Resources in the tree menu.

  3. Select all.

  4. Select the VM host machine.

  5. On the Info page change the Max Hosted VMs to a number equal to one less than your Linux kernel’s allowed number of loopback devices, or as many as the VM host machine’s hardware allows.

4.5.5 Testing a Virtual Machine Modification

One of the benefits of modifying a VM before checking it into the VM Warehouse is the opportunity to test the VM configuration. You can continue to make changes throughout the test process until the VM meets your company’s standards for VMs. Test the VM by keeping it active until you have finished your testing. When you are finished, shut the VM down and check it into the Warehouse.

4.5.6 Checking In an Edited Virtual Machine

When you have made a modification, and at any point during your testing cycle, you can check a VM back into the VM Warehouse. Check it back in as you did the first time you checked the VM into the Warehouse. See Section 4.4.1, Checking In a Virtual Machine for more information on checking in a VM. The newly checked-in VM receives the next version number for that VM. Any version can be checked back out, modified, and checked back in to increment to the next version number.

4.5.7 Changing the Gold Master Designation

The first time you check a VM into the VM Warehouse, it is designated as Version 1, which is also the Gold Master version. After you have moved one or more modified versions of the VM back into the VM Warehouse, they are listed in the edit view in the order they were checked in, along with their parent versions.

When a version you have created has passed necessary testing, you can designate it as Gold Master by doing the following:

  • Right-click the version, then select Make Gold Master.

  • Click File > Make Gold Master.

  • Click the Make Gold Master icon on the toolbar.

The Gold Master is the version of the VM discovered by the Orchestrator Server. It is launched when the VM is used as a resource to receive joblets.