VMware

« August 2009 | Main | October 2009 »

09/30/2009

VMware Studio - Adding RHEL 5.4 support in minutes.

Red Hat has recently released Red Hat Enterprise Linux (RHEL) 5.4. Here are the easy steps for enabling VMware Studio 2.0 to create VM or vApp for RHEL 5.4 Server i386 and x86_64.

Adding RHEL 5.4 i386 support structure based on the existing RHEL 5.3 i386 components:

  1. Log in to the Studio VM as root.
  2. Create the template profile, Studio runtime packages, and VMware Tools for the new OS:
    • cp -r /opt/vmware/etc/build/templates/redhat/5/3 /opt/vmware/etc/build/templates/redhat/5/4
    • cp -r /opt/vmware/lib/build/include/rhel/5/3 /opt/vmware/lib/build/include/rhel/5/4
    • cp -r /opt/vmware/www/vmware-open-vm-tools/redhat/5/3 /opt/vmware/www/vmware-open-vm-tools/redhat/5/4
  3. Edit and update /opt/vmware/etc/build/templates/redhat/5/4/build_profile.xml with the following content:
    • [line 25] <Product>Red Hat Enterprise Linux 5.4</Product>
    • [line 92] <vadk:url>http://[VADK.localIP]/vmware-open-vm-tools/redhat/5/4</vadk:url>
    • [line 208] <Description>Red Hat Enterprise Linux 5.4</Description>
    • [line 303] vadk:sourceDir="[VADK.vadkRoot]/lib/build/include/rhel/5/4/"
    • [line 306] <vadk:ISO vadk:path="file:///opt/vmware/www/ISV/ISO/rhel-server-5.4-i386-dvd.iso"
          vadk:md5sum="7a12ec6599527e4f3d1790b51eadbfed" vadk:containFiles=""/>
    • [line 309] <vadk:Distribution vadk:vendor="Red Hat" vadk:OSverMajor="5" vadk:OSverMinor="4"

Adding RHEL 5.4 x86_64 support structure based on the existing RHEL 5.3 x86_64 components:

  1. Log in to the Studio VM as root.
  2. Create the template profile, Studio runtime packages, and VMware Tools for the new OS:
    • cp -r /opt/vmware/etc/build/templates/redhat/5/3_x86_64 /opt/vmware/etc/build/templates/redhat/5/4_x86_64
    • cp -r /opt/vmware/lib/build/include/rhel/5/3_x86_64 /opt/vmware/lib/build/include/rhel/5/4_x86_64
    • cp -r /opt/vmware/www/vmware-open-vm-tools/redhat/5/3_x86_64 /opt/vmware/www/vmware-open-vm-tools/redhat/5/4_x86_64
  3. Edit and update /opt/vmware/etc/build/templates/redhat/5/4_x86_64/build_profile.xml with the following content:
    • [line 25] <Product>Red Hat Enterprise Linux 5.4 64bit</Product>
    • [line 91] <vadk:url>http://[VADK.localIP]/vmware-open-vm-tools/redhat/5/4_x86_64</vadk:url>
    • [line 208] <Description>Red Hat Enterprise Linux 5.4 64bit</Description>
    • [line 303] vadk:sourceDir="[VADK.vadkRoot]/lib/build/include/rhel/5/4_x86_64/"
    • [line 305] <vadk:ISO vadk:path="file:///opt/vmware/www/ISV/ISO/rhel-server-5.4-x86_64-dvd.iso"
          vadk:md5sum="04fe3c10202402d7b389528d2bad0210" vadk:containFiles=""/>
    • [line 308] <vadk:Distribution vadk:vendor="Red Hat" vadk:OSverMajor="5" vadk:OSverMinor="4"

And that's it. You will now see the RHEL 5.4 template profiles through the VMware Studio web interface. With the new template profiles, you may then create your customized build profile for building the desired RHEL 5.4 Server VM or vApp.

09/22/2009

VMware Studio 2.0 GA - What's new?

VMware Studio 2.0 GA was announced at VMworld Developer Day. The GA release comes two months after Beta. It mainly focuses on product quality and usability improvements with few enhancements from the Beta feedback. One of the key features added was support for CD based updates for virtual appliances. This feature is critical for production appliances that are deployed behind firewall. Since these appliances cannot connect to ISV's web based update repository, GA version of Studio allows appliance authors to create CD based update repository alongwith web based version it supported since 1.0. The end-user web console allows users to configure updates to be received from CD or through the phone-home URL. The other key area where we spent a good time during GA release was ensuring support for various vCenter environments for building vApps and virtual appliances. You can have VC environments with distributed vSwitches, VC deployments integrated with Active Directory and specify them as provisioning target in Studio. GA version also allows the author to specify clusters and sub resource pools for provisioning hosts. It detects hosts that are in maintenance mode and prevents their use during provisioning. 

Minor features include support for web console footer customization, setting hostname explicitly in built vms and virtual appliances and control EULA acceptance on first boot amongst others. Disabling EULA acceptance is needed for build and test environments to enable running regression test suite on nightly appliance builds in automated fashion. With 2.0 GA release, VMware tools are optional and explicitly specified in the build profile similar to appliance packages. This makes it easy to update or replace the tools with the version preferred for your deployment environment.

Also check out the GA version of Eclipse Plugin. We have done few usability improvements here, ability to add individual packages instead of entire application package repositories, ability to automatically create application package repository when building an application package. Studio menu items in Eclipse are now context sensitive. VMware Studio 2.0 is a view in Eclipse. Try it out with your Java, J2EE, C++ perspectives and it should integrate seamlessly. Eclipse 3.5 was released just after Studio Beta and we have ensured Studio GA Plugin continues to work with 3.5 alongwith 3.4 version of Eclipse.

A common question seen in community forums is support for various guest Operating Systems. We plan to address it in a different form by making Studio build process agnostic of various Linux distros and enabling users to create their own templates. Expect this feature in near future. In the meanwhile we have various blog posts coming to describe how to create VMs with various guest operating systems that are not supported out of the box in VMware Studio. 

The GA version includes fixes that we encountered while creating large vApps. One of the exercises we conducted internally was creation of Sharepoint vApp using Studio. We successfully created the 3 tier vApp that has MSSQL database, Index server and Frontend. The Sharepoint vApp uses OVF properties to extract environment specific variables : computer names of each vm and domain to integrate into. On first boot it runs sysprep to complete the deployment process. It also asks for existing AD instance and integrates the vApp into the existing domain. The end result is a running sharepoint vApp integrated with AD. We plan to post the details around the same including first boot scripts, sysprep commands, etc in coming weeks. 

Below are part 1 and 2 of videos that show how to build vApps using VMware Studio. Download VMware Studio 2.0 GA release from here and give it a spin. We look forward for your feedback.

--From Studio Team

   
 

09/11/2009

OVF Localization

OVF packages are ideal for distributing complex software packages. As we saw in the post on "Inside the OVF Package", it is possible to tailor the same OVF package for different hypervisors using deployment options. Moreover, it is possible to add meaningful human readable descriptions to the different parts of the OVF descriptor, in places like product information, EULA sections and deployment options. This enables deployment wizards (like the vSphere client) to give the user a great experience when deploying an OVF package, since it can use specific messages relevant to a particular OVF descriptor. For example, the user can see messages about the intention of deployment options and properties, and how to use them. This blog post is about what to do about all that human readable metadata, when you want to distribute your OVF package in different countries and for different languages.

The OVF specification includes an internationalization section that describes how to localize an OVF descriptor. This lets you address the issue of translating all the human readable metadata in the OVF descriptor without having to keep multiple copies of the descriptor, each localized to a specific language. Obviously it does not make sense to localize everything in an OVF descriptor, since some information is only intended to be read by a machine. A rule of thumb is that you can localize all the elements that carry some kind of metadata which are useful to the deployer of the OVF package but not needed by the deployment platform. For a full list of elements that can be localized please see the list at the end of this blog post.

Example

Let us take a look at how the user experiences an OVF package that has been localized:

OVF deployment using default language.

Ovfdeploy_english 

OVF deployment using German localization.

Ovfdeploy_german

The vSphere Client attempts to use the localized messages from the OVF package which matches the locale of the users Windows installation. If a matching localization is not found, the default language of the OVF descriptor (English in the example) is used.

Localizing the OVF Descriptor

Let’s look at how to write an OVF descriptor that is localized to multiple language including both English and German as in the above example, but also Danish and Swahili:

<Envelope xml:lang="en-US">
  ...
  <VirtualSystem ovf:id="MyVM">
    ...
    <ProductSection>
      <Info>Information about the installed software</Info>
      <Property ovf:key="num_connections" ovf:type="string"
        ovf:userConfigurable="true">
        <Label ovf:msgid="num_connections.label">
          Number of connections
        </Label>
      </Property>
      <Property ovf:key="admin_address" ovf:type="string"
        ovf:userConfigurable="true">
        <Label ovf:msgid="admin_address.label">Administrator address</Label>
        <Description ovf:msgid="admin_address.description">
      Email address of the systems administrator
    </Description>
      </Property>
    </ProductSection>
    ...
  </VirtualSystem>
 
  <!-- German localized messages -->
  <Strings xml:lang="de-DE">
    <Msg ovf:msgid="num_connections.label">Zahl der Anschlüsse</Msg>
    <Msg ovf:msgid="admin_address.label">Verwalteradresse</Msg>
    <Msg ovf:msgid="admin_address.description">
      Email address des Systemverwalters
    </Msg>
  </Strings>
 
   <!-- Danish localized messages -->
    <Strings xml:lang="da-DK">
    <Msg ovf:msgid="num_connections.label">Antal forbindelser</Msg>
    <Msg ovf:msgid="admin_address.label">Administrator adresse</Msg>
    <Msg ovf:msgid="admin_address.description">
      System administratorens email-adresse
    </Msg>
  </Strings>
 
   <!-- Swahili localized messages -->
    <Strings xml:lang="sw">
    <Msg ovf:msgid="num_connections.label">Idadi ya connections</Msg>
    <Msg ovf:msgid="admin_address.label">Administrator anwani</Msg>
    <Msg ovf:msgid="admin_address.description">
      Barua pepe ya system administrator
    </Msg>
  </Strings>
</Envelope>

In this example, we are localizing the label of the "num_connections" property and the label and description of the "admin_address" property.

As you can see, it is pretty straight forward to localize an OVF descriptor to support multiple languages:

  1. First prepare the OVF descriptor for localization by adding an ovf:msgid attribute to each of the elements you want to be localized (see the list of possible elements in the last section of this blog entry) and give the ovf:msgid a unique value;
  2. Next you add a Strings section for each of the locales you want to support and specify the locale by using the xml:lang attribute;
  3. For each ovf:msgid attribute in the OVF descriptor create a Msg element in the Strings section with the same ovf:msgid value.

The human readable messages in the example ProductSection element are used as the default language and will be used if no appropriate locale is available in the descriptor. To specify the default language of the OVF descriptor (the language used in the default messages), set the xml:lang attribute on the top Envelope element level. In our example we have set it to US English (en-US).

The format of the locale is standard and is written as [language]-[country]-[variant]. It is not necessary to specify the full locale for a string bundle. For example, if we simply specify the German locale in the example as de it can then be used for several German speaking countries such as Austria (de-AT), Germany (de-DE), Luxembourg (de-LU) and parts of Switzerland (de-CH). If a user uses locale X on his computer, we select the locale in the OVF descriptor which matches the beginning or all of X. If two locales match X we chose the one that gives the longest match. This is why changing the locale from de-DE to de means that the localization can be used on the locales de-AT, de-DE, de-LU and de-CH, since de is a prefix of those.

External String Bundles

Often when managing multiple locales it is impractical to keep them in the same file. For this purpose the OVF specification allows you to extract all the Strings elements and put them in separate files. From the example OVF descriptor we have used, we can take all the three different localizations and put them in separate files (we will call these files string bundles):

<Envelope>
  <References>
    <File ovf:href="MyVM-de-DE.msg" ovf:id="msgs1"/>
    <File ovf:href="MyVM-da-dk.msg" ovf:id="msgs2"/>
    <File ovf:href="MyVM-sw.msg" ovf:id="msgs3"/>
    <File ovf:href="MyVM-disk1.vmdk" ovf:id="file2" ovf:size="9580544"/>
    ...
  </References>
  ...
</Envelope>

The files are then referenced in the beginning of the Reference section in the OVF descriptor (important: String bundles must be listed first in the reference section):

File: MyVM-de-DE.msg

<!-- German localized messages -->
<Strings xml:lang="de-DE">
  <Msg ovf:msgid="num_connections.label">Zahl der Anschlüsse</Msg>
  <Msg ovf:msgid="admin_address.label">Verwalteradresse</Msg>
  <Msg ovf:msgid="admin_address.description">
    Email address des Systemverwalters
  </Msg>

</Strings>
 

File: MyVM-da-DK.msg

<!-- Danish localized messages -->
<Strings xml:lang="da-DK">
  <Msg ovf:msgid="num_connections.label">Antal forbindelser</Msg>
  <Msg ovf:msgid="admin_address.label">Administrator adresse</Msg>
  <Msg ovf:msgid="admin_address.description">
      System administratorens email-adresse
  </Msg>

</Strings>
 

File: MyVM-sw.msg


<!-- Swahili localized messages -->
<Strings xml:lang="sw">
  <Msg ovf:msgid="num_connections.label">Idadi ya connections</Msg>
  <Msg ovf:msgid="admin_address.label">Administrator anwani</Msg>
  <Msg ovf:msgid="admin_address.description">
    Barua pepe ya system administrator
  </Msg>

</Strings>

In the above example we created three files, one for each locale. The OVF specification allows multiple Strings elements in the same file next to the OVF descriptor, so it is not necessary to create a file per locale as we did. However, by keeping the locales in separate string bundles it become easy to extend the supported locales simply by adding more string bundle files.

Further Reading

To learn more about localization, check out section in the OVF 1.0.0 specification: http://www.dmtf.org/standards/published_documents/DSP0243_1.0.0.pdf

List of Localizable Elements

The text in the following elements can be localized:
  • Info element on VirtualSystem and VirtualSystemCollection
  • Name element on VirtualSystem and VirtualSystemCollection
  • Info element on AnnotationSection, DeploymentOptionSection, DiskSection, EulaSection, InstallSection, NetworkSection, OperatingSystemSection, ProductSection, ResourceAllocationSection, StartupSection and VirtualHardwareSection.
  • Annotation element on AnnotationSection
  • License element on EulaSection
  • Description element on NetworkSection
  • Description element on OperatingSystemSection
  • Description, Product, Vendor, Label, and Category elements on ProductSection
  • Description and Label elements on DeploymentOptionSection
  • ElementName, Caption and Description sub-elements on the System element in VirtualHardwareSection
  • ElementName, Caption and Description sub-elements on Item elements in VirtualHardwareSection
  • ElementName, Caption and Description sub-elements on Item elements in ResourceAllocationSection


About VMware vApp Blog

  • In this blog, we will dig into the details of OVF, vApps, and virtual appliances and how they can be put to practical use - both by IT administrators and virtual appliance authors. If you are wondering about the technical details and how to apply OVF in practice, this is a good place to learn more.

Subscribe