Académique Documents
Professionnel Documents
Culture Documents
This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
EN-000346-00
You can find the most up-to-date technical documentation on the VMware Web site at: http://www.vmware.com/support/ The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com
Copyright 20082010 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents. VMware is a registered trademark or trademark of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
VMware, Inc.
Contents
AboutThisBook
GettingStartedwithVMwareStudio
1 IntroductiontoVMwareStudio 13
Overview 13 WhatIsavApp? 13 WhatIsaVirtualAppliance? 14 AudienceforVMwareStudio 14 KeyFeatures 15 ArchitectureofVMwareStudio 16 VirtualApplianceManagementInfrastructure(VAMI) 16 BuildSystem 17 VMwareStudioPluginforEclipse 17 IntegrationwithVMwarevCenterUpdateManager 18 RoadmapofThisManual 18 LinuxandEclipseDevelopers 18 WindowsDevelopers 18 DevelopersPlanningtoBuildvApps 18 AutomatingBuildsfromtheCommandLine 18 ISVsShippingVirtualAppliances 18
2 DeployingandUsingVMwareStudio 19
Prerequisites 19 DeployingVMwareStudio 20 DeploymentOptions 20 SupportedDistributionFormats 21 DeploymentProcedure 21 SecurityofSelfSignedSSLCertificate 22 ModifyingtheNetworkandTimeZoneSettings 22 ChoosingBetweenDHCPandStaticNetworkAddresses 22 ConfiguringStaticIPAddresses 23 ConfiguringtheNetworkProxy 23 ConfiguringDHCP 23 SettingtheTimeZone 24 UsingVMwareStudioWebConsole 24 AccessingtheVMwareStudioWebConsole 24 ShuttingDowntheVMwareStudioAppliance 24 SettingTimeZoneintheWebConsole 24 NetworkConfiguration 24
3 BuildingVMsandvAppswithVMwareStudio 27
OutlineofVMBuildProcedure 27 OutlineofvAppBuildProcedure 27 AcquiringtheOperatingSystemISO 28 RequirementsforBuilding64BitVMs 28 OutputFormats 28
VMware, Inc. 3
DevelopingaLinuxBasedVM
4 CreatingaLinuxBasedVM 33
Overview 33 PrerequisitesOSandApplication 33 AccessingtheWebConsole 33 OperatingSystemISOImage 34 ISOofQualifyingCustomLinuxOS 34 FootprintReduction 35 ApplicationPackages 35 CreatingaVMBuildProfile 35 WebConsoleTabReference 37 DescriptionTab 37 HardwareTab 38 OSTab 39 ApplicationTab 40 ManagementTab 41 OutputTab 43 BuildSettingsTab 44 BuildingaVMfromtheBuildProfile 46 TestingtheGeneratedVM 46 ReiteratingtheBuildProcess 47 MigratingBuildProfilesfromStudio1.0or2.0 47 VMwareToolsInstalledinaGeneratedVM 47
5 PackagingaLinuxApplication 49
VMwareStudioMakePackage(mkpkg)Tool 49 OptionsoftheMakePackageTool 49 ExampleofCreatingaDEBPackage 50 ExampleofCreatinganRPMPackage 51 OperatingSystemNativeTools 52 DEBNativePackaging 52 RPMNativePackaging 52 TARArchiveasInputFormat 53 OperatingSystemFootprintReduction 54
6 AddingaLinuxManagementService 55
VMwareStudioVAMIService 55 DefaultManagementServices 56 ManagementServiceswithEclipse 56 CreatingaManagementService 57 service.xml 57 view.xml 57 CreatingaVanillaVM 58 UnderlyingCLI 58 ImportingaManagementService 58 CustomizingtheInitializationScript 59
VMware, Inc.
Contents
7 ManagingtheLinuxUpdateRepository 61
OverviewofUpdates 61 GeneratinganUpdate 62 UpdatesonCDROM 63 UpdatesRequiringReboot 64 DigitallySigninganUpdate 64 AddingYourEULAtoanUpdate 64 PublishinganUpdate 64 PublishinganUpdateRepositoryfromZIP 65 TestingAgainstaStagingUpdateRepository 66 DiagnosingFailedUpdates 66 UpdateRepositoryXML 67 SupportingCentralUpdateswithVMwarevCenterUpdateManager 67
8 UsingtheVMwareStudioPluginforEclipse 69
RequirementsofVMwareStudioPluginforEclipse 69 GettingStartedwithVMwareStudioPluginforEclipse 69 PackagingApplicationstoRunInaVirtualMachine 70 CreatingManagementServices 71 AdditionalEclipseFeatures 71 UninstallingtheEclipsePlugin 72 NewFeaturesinStudio2.1 72
DevelopingaWindowsBasedVM
9 CreatingaWindowsBasedVM 75
Overview 75 PrerequisitesOSandApplication 75 AccessingtheWebConsole 75 OperatingSystemISOImage 76 WindowsApplicationPackages 76 CreatingaVMBuildProfile 76 AdditionalFieldsforWindowsReference 77 OSTab 77 ApplicationTab 79 BuildingaVMfromtheBuildProfile 80 TestingtheGeneratedVM 80 ReiteratingtheBuildProcess 81
10 PackagingaWindowsApplication 83
AboutVMwareStudioPackageforWindows 83 RepositoryofWindowsApplicationPackages 83 CreatingaWindowsApplicationPackage 84 RegisteredExitCodes 85 EnvironmentVariableswheninstallingPackages 85
DevelopingavAppforvSphere
11 CreatingavAppfromVMBuilds 89
IntroductiontoBuildingavApp 89 Prerequisites 89
VMware, Inc.
CreatingavAppBuildProfile 89 WebConsoleTabReference 90 DescriptionTab 91 VMsTab 91 StartOrderTab 92 ResourcesTab 92 OutputTab 92 BuildingavAppBuildProfile 93 TestingtheGeneratedvApp 94 ImportingvAppProfiles 94
12 GuidelinesforCreatingVirtualAppliances 95
OutlineofVirtualApplianceBuildProcedure 95 VMwareRecommendations 95 VMwareReadyVirtualAppliances 96 ChoosingOVFVersion 96 ChoosingVirtualHardwareVersion 96 UserAccounts 96 IncludeUpdateAgent 96 PartitioningDiskforSystemandUserData 96 FootprintReduction 96 GuidelinesforAddingKernelExtensions 96
13 BuildingfromtheCommandLine 97
UsingtheCommandLine 97 ManagingBuilds 99 DiscoveryReports 99 OldBuilds 99 AddingSupportforaNewOS 99 Requirements 99 SupportFilesfortheNewOS 100 Fedora11AsanExample 101 SigningOVFFiles 101
14 BuildFromanExistingVM 103
ImportinganExistingVMUsingtheCLI 103 Prerequisites 103 HowItWorks 104 DiscoveringanExistingVM 104 TwoStepExistingVMDiscovery 104 ModifyingtheImportProfile 105 BuildingwiththeImportProfile 105 ExistingVMLimitations 106
Appendixes
A ManagementServicesWebAPI 109
RootObject 109 VAMIContainer 109 vami.container.navigate 109 vami.container.logout 109 vami.container.newHistoryItem 110 vami.container.isLogin 110
VMware, Inc.
Contents
vami.container.getUser 110 vami.container.getSessionID 110 VAMIContainerCallbacks 110 vami.container.registerOnShowCallback 110 vami.container.registerOnHideCallback 111 vami.container.registerOnNavigateCallback 111 VAMII/O 111 vami.io.httpGet 111 vami.io.httpPost 112 VAMILog 112 vami.log.info 112 vami.log.warn 112 vami.log.error 113
B SecuritywithSSHandSSL 115
InstallingSSHonWindows 115 VMwareWorkstationandVMwareServer1.0.x 115 VMwareServer2.0 116 CheckingVeracityofanSSLCertificateorSSHKey 116
C EditingXMLBuildProfiles 119
Introduction 119 StructureofVMXMLBuildProfiles 119 UsefulAttributesNotDisplayedintheVMwareStudioWebConsole CustomizingtheFooterintheWebConsole 129 CreatingVirtualDisks,Partitions,andVirtualDevices 129 UnmountingCDROMorISOAfteraBuild 131 ResourceAllocationSettingData 131 StructureofvAppXMLBuildProfiles 132 128
D Troubleshooting 135
ResolvingVMwareStudioIssues 135 ResolvingEclipsePluginIssues 139
Index 141
VMware, Inc.
VMware, Inc.
Revision History
Thisbookisrevisedwitheachreleaseoftheproductorwhennecessary.Arevisedversioncancontainminor ormajorchanges.Table 1summarizesthesignificantchangesineachversionofthisbook. Table 1. Revision History
Revision 20100713 20090828 20090629 20090205 20080905 Description MajorrevisionfortheVMwareStudio2.1release. FinalversionfortheVMwareStudio2.0release. RetitledDevelopersGuidetoBuildingvAppsandVirtualAppliancesforStudio2.0Beta. Correctionsmadetothefirstversion,butnonewmaterial. FirstversionoftheGuidetoBuildingandImplementingVirtualAppliancesforVMwareStudio1.0.
Intended Audience
Thisdocumentisintendedfordevelopers,independentsoftwarevendors(ISV),systemintegrators(SI),value addedresellers(VAR),hardwareappliancevendors(HAV),ITprofessionals,anddatacenteradministrators whowanttocreatequickstartingvirtualmachines,vAppsandvirtualapplianceswithVMwareStudio.For informationaboutdeployingvAppsandvirtualappliancescreatedbyVMwareStudio,seethecompanion manual,UsersGuidetoDeployingvAppsandVirtualAppliances.
Document Feedback
VMwarewelcomesyoursuggestionsforimprovingourdocumentation.Sendyourfeedbackto docfeedback@vmware.com.
Support Offerings
TofindouthowVMwaresupportofferingscanhelpmeetyourbusinessneeds,goto http://www.vmware.com/support/services.
10
VMware, Inc.
VMware, Inc.
11
12
VMware, Inc.
Thischapterincludesthefollowingtopics:
Overview
VMwareStudioisanintegrateddevelopmenttoolthattakesexistingsoftwareapplicationsandpackagesthem intovirtualmachinesandvAppsthatarereadytorunandoptimizedforVMwareproductplatforms. VMware StudiocanbuildbothLinuxbasedVMsandWindowsbasedvirtualmachinesandvApps,running singletierormultitierapplications. LinuxbasedvirtualmachinesthatVMwareStudiogeneratescontainaninguestmanagementagentwitha WebconsolethatanISVcanbrandandshipaspartofacustomizedvirtualappliance.VMwareStudioserves asanextensiontotheISVsbuildsystem,generatingautomatedbuildsofvirtualmachinesandvApps containingthelatestsoftwarebinaries.VirtualmachinesandvAppsgeneratedbyVMwareStudioareinan industrystandardformat,enablingthemtorunonmanyvirtualizationplatforms.
What Is a vApp?
VMwarerecentlyintroducedthevApp,asoftwaresolutionoptimizedforcloudcomputing.Alogicalentity composedofoneormorevirtualmachines,thevAppcanbemovedandmanagedasaunit.AvAppspecifies andencapsulatescomponentsofamultitierapplicationaswellastheoperationalpoliciesandservicelevels associatedwithit.ThevAppgivesapplicationownersastandardwaytodescribepoliciesforanapplication, whichdifferentdatacenterscanconsistentlyinterpretandrun.ThevAppisacategoryofvirtualapplications thatcanbebuiltbyISVs,systemintegrators,valueaddedresellers,andonsiteITadministrators. TheOpenVirtualizationFormat(OVF)standard1.0isemployedtorepresentasinglevirtualmachineor combinationofmultiplevirtualmachines.Asimplemented,draftOVFstandard0.9cannotrepresentmore thanonevirtualmachine.YoucandeployavAppthroughvCenterServerwiththevSphereClient,orwith ovftool.VirtualCenter2.5andESX/ESXi3.5supportedOVF0.9only.YoucanrunallorpartofavAppon ESX/ESXi3.5ifyoudeploythevAppthroughvCenterServer4. Seehttp://www.vmware.com/appliances/learn/ovf.htmlfordetailsabouttheOVFstandard(DMTFDSP0243). Fromamanagementperspective,avAppactslikeavirtualmachineobject.Ithaspoweroperations,networks, datastores,anditsresourceusecanbeconfigured.SeetheOVFandvAppchaptersofvSphereVirtualMachine AdministrationGuideforvAppmanagementinformation. Fromanimplementationperspective,avAppcontainerisaspecializedresourcepoolthatisextendedwith computeresources,productinformation,andimportability.IntheVMwarevSphereAPIReference,VirtualApp (themanagedobjecttypeforvApp)containsvirtualmachines.
VMware, Inc.
13
14
VMware, Inc.
Key Features
VMwareStudiohasinterestingcapabilitiesforISVsbuildingsingleormultipleVMappliancesandfor developerswhoplantocreateastandardizeddevelopmentenvironmentbypackagingtherightversionof applicationstackcomponentsandtoolsintoavirtualmachineorvApp.
Extendtheinguestmanagementframework. VMwareStudio1.0embeddedaninguestmanagementframeworkintoLinuxbasedVMs,andprovided anetworkproxyservice,andanupdateservice,aspartofthisframework.Virtualapplianceauthorscould rebrandandcustomizethelookandfeeloftheWebinterface. InVMwareStudio2.0,themanagementframeworkandWebconsoleinterfacebecameextensible,andin VMwareStudio2.1,piecesbecomeoptional.Youcanaddacustommanagementservicewhenbuildinga virtualappliance,asrequiredbyyourapplication.IfaservicehasanassociatedWebinterface,youcan makethisinterfacevisibleintheWebconsole.VMwareStudioprovidesthisabilitysoappliancevendors canhaveasingleWebbasedconsoleforapplianceandapplicationconfigurationandmanagement.The Webinterfacecancontainalinktotheapplicationthatyoupackageinthevirtualappliance.
VMware, Inc.
15
WelcomescreenandthevirtualmachineconsoleTodisplaywelcomemessages,configurenetworking, setthetimezone,andlogin(theCLIscreeninTable 12showsaloginsession). FirstbootEULApromptonthevirtualmachinesconsoleRequestsacceptanceoftheenduserlicense agreement(EULA). ManagementservicesincludingCIMandVAMISeeVMwareStudioVAMIServiceonpage 55. ManagementWebconsoleWebconsoleinterfacetoVAMIservices(asinBrowserscreenofTable 12). AppliancebootscriptsTobeexecutedduringfirstorsubsequentbootsofthevirtualmachine. VMwareToolsfortheOSVMwareToolsimproveoperationsoftheguestoperatingsystemrunningin avirtualmachine.FormoreinformationseeVMwareToolsInstalledinaGeneratedVMonpage 47.
VMware, Inc.
16
Build System
TocreateaVMoravApp,youformulateabuildprofileusingtheVMwareStudioWebconsoleorEclipse interface.ThebuildprofilespecifiestheISOimageofaLinuxorWindowsoperatingsystemandthesoftware applicationstorunonthatoperatingsystem.ForaLinuxbasedVM,thebuildprofilealsospecifiesinguest services,inotherwordsVAMI.TheleftsideofFigure 13showsinputstothebuildsystem. Figure 1-3. VMware Studio Architecture
BeforeyoubuildaVMorvApp,VMwareStudiovalidatesthebuildprofile.ToprovisionaVM,thebuild systemusesaVMwareproductplatformtocreateavirtualmachinefromtheoperatingsystemISOandthe applicationsetyouspecify.AsuccessfulVMbuildisexportedtoanetworkaccessiblelocationontheVMware Studioappliance.ThisVMcontainstheOSandapplicationpackagesasdefinedinbuildprofile.TheVMalso hasbootscriptsconfigured,theinguestmanagementframeworkembedded,andiscustomizedaccordingto specificationsofyourbuildprofile. OnVMwareproductplatformsthatsupportthevSphereAPI(formerlytheVIMAPI),thebuildsystemuses theovftooltocreateandtransporttheVM.OnVMwareproductplatformsthatdonotsupportthevSphere API,thebuildsystemusestheVIXAPItocreateandtransporttheVM. TocreateavApp,thebuildsystemtakesasetofVMbuildprofilesorsuccessfullybuiltVMs,andpackages themtogetherwithanOVFdescriptor.AsthedeveloperofavApp,youcanspecifystartorderandresource allocationfortheconstituentVMsandapplications,butmanyaspectsofthevAppremainflexibleuntilthe administratordecidesatdeploymenttime,includingwherevariouspartsofthevApprunandhowtheir networkconnectionsaremade.
VMware, Inc.
17
Windows Developers
WindowsdeveloperscancontinueinsteadwithChapter 9,CreatingaWindowsBasedVM,onpage 75. To createWindowsapplicationpackagesforinclusioninthisWindowsbasedVM,seeChapter 10,Packaging aWindowsApplication,onpage 83.
18
VMware, Inc.
ThischapterdescribeshowtodeployandconfigureVMwareStudio,andcontainsthefollowingtopics:
Prerequisites
TorunVMwareStudioandprovisionvirtualappliances,thefollowingarerequired:
PrerequisitesifyouareprovisioningwithVMwareWorkstation:
VMware, Inc.
19
PrerequisitesifyouareprovisioningwithVMwareServer1.0.x:
Approximately32GBofavailablestoragespacewhereyoudeployVMwareStudio. ThefollowingportsontheVMwareStudioapplianceareusedtoaccesstheWebconsoleandbuildVMs:
VMwareStudiorequiresthefollowingportstobeopenonthehostrunningtheprovisioningproduct:
Supportedbrowsers:
InternetExplorer7or8 MozillaFirefox3.x
Deployment Options
Forsimplicityofconfiguration,youcandeployVMwareStudioonthesamevirtualizationproductplatform thatyouplantouseforbuildingVMs.YoucanalsodeployVMwareStudioonadifferentvirtualization platformthantheoneusedforbuildingVMs.Forexample,ifyouarerunningVMwareStudioon32bit hardware,butyouarebuildinga64bitvirtualmachine,youcansettheprovisioningplatformtoaremote 64bitsystem.Asanotherexample,theremotesystemmightbelightlyloadedandcapableoffasterbuilds. Figure 21illustratesthesimplestsetupofVMwareStudio.Thevirtualizationplatformcouldbealmostany recentVMwareplatformproduct.Fordesktopproducts,onerequirementisanSSHserverontheplatforms hosttoallowSSHandSCPoperationsbyVMwareStudio.Forserverproducts,onerequirementisauserwith adequatepermissionsforprovisioning.SeeVMwarevSphereUserPrivilegesforProvisioningonpage 29. Figure 2-1. Single Host Setup of VMware Studio
20
VMware, Inc.
Figure 22illustratesadualhostsetupofVMwareStudio.ThevirtualizationplatformsforhostsAandBcould beanyofthosepermittedforasinglehost,andthevirtualizationplatformdoesnothavetobethesame. The requirementsforprovisioningthroughhostBarethesameasforasinglehost,exceptbothhostsmustbe networkconnectedsoVMwareStudioonhostAcanreadilyaccessthevirtualizationplatformonhostB. Figure 2-2. Dual Host Setup of VMware Studio
TodeployVMwareStudioon:
BothOVF0.9andOVF1.0oftheVMwareStudioappliancereferencethesameVMDKfile.
Deployment Procedure
TheprocedurefordeployingVMwareStudioisdifferentfortheOVForOVApackagethanfortheZIPfile. To deploy VMware Studio from OVF or OVA 1 TheOVForOVAformatofVMwareStudiocanbedeployeddirectlyfromtheVMwaredownloadWeb server.AlternativelytheVMwareStudioOVA,orOVFanditsassociatedVMDKfile,canbedownloaded toalocalWebserverorWindowsmachinewheretheVMwarevSphereorVMwareInfrastructureClient canaccessitfordeployingtheappliance.IfyoudecidetodownloadtheOVFformatofVMwareStudio appliancetoalocalmachine,placetheOVFanditsassociatedVMDKfileinthesamedirectory. ForVMwarevSphere4,runtheVMwarevSphereClientandselectmenuFile>DeployOVFTemplate. ForVMwareInfrastructure,runtheVMwareInfrastructureClientandselect File > Virtual Appliance > Import.Ineithercase,awizardguidesyouthroughdeployment. PowerontheVMwareStudiovirtualmachine.
VMware, Inc.
21
To deploy VMware Studio from ZIP 1 DownloadVMware_Studio-<version>.ziptothehostofVMwareServerorVMwareWorkstation, extracttheZIPfiletoadirectory,forexample /var/lib/vmware/VirtualMachines/VMware_Studio-2.0.0onaLinuxhostor C:\MyVirtualMachines\VMware_Studio-2.0.0onaWindowshost. InVMwareWorkstationortheVMwareServerConsoleapplication,selectmenuFile>Open. ClickBrowse,navigatetothedirectorywhereyouextractedtheVMwareStudiovirtualmachine,select VMware_Studio-<version>.vmxandclickOpen. PowerontheVMwareStudiovirtualmachine. ContinuewithStep 4oftheOVForOVAdeployment.
2 3 4 5
YouarenowreadytobegindevelopingwithVMwareStudio.
Ifthevaluesareincorrect,typenoandpressEntertodotheprocedureagain.
Configuring DHCP
IfyouconfiguredVMwareStudiotouseastaticIPaddress,butyoumustrestoretheconfigurationtoretrieve itsnetworkaddressfromaDHCPserver,dothefollowingsteps. To configure use of DHCP service 1 2 3 Fromthevirtualappliancewelcomescreen,selectConfigureNetworkandpressEnter. EnteryestotheUseaDHCPserverinsteadofastaticIPaddressprompt. EnteryesornoattheIsaproxyservernecessarytoreachtheInternet?prompt. Ifyouansweredno,pressEnter. Ifyouansweredyes,pressEnter.TypetheIPaddressandportnumberoftheproxyserver.PressEnter. Areviewofyourentriesappears. 4 TypeyesandpressEnterifthevaluesarecorrect.
Ifthevaluesareincorrect,typenoandpressEntertodotheprocedureagain.
VMware, Inc.
23
Thetimezoneissetandthewelcomescreenappears.
Tostopthevirtualappliance,clicktheShutdownbutton. Torestartthevirtualappliance,clicktheRebootbutton.
Network Configuration
ClicktheNetworktabintheWebconsole.Thistabofferspagesforthefollowingoperations:
24
VMware, Inc.
IfyousetastaticIPaddressanddisabledDHCP,youmustentervaluesinallthefollowingfields:
VMware, Inc.
25
26
VMware, Inc.
ThischapterprovidesanoverviewofbuildingVMsandvAppswithVMwareStudio,andcontainsthe followingtopics:
2 3
2 3
VMware, Inc.
27
Output Formats
Whenyouarefinishedtestingandpackaging,youcanmaketheVMandvAppbuildsaccessibletocustomers. YoucanprovideaVMorvAppinoneormoredistributionformats:
To assign a provisioning role to a user in vCenter Server 1 2 3 4 CreateanewuseronthesystemwherethevCenterServerisrunning. StartthevSphereClientandconnecttothevCenterServer. RightclickthevCenterobject(intheHostsandClusterstreeview)andselectAddPermission. IntheAssignPermissionsdialog,addthenewuseryoucreatedinStep 1totheUsersandGroupslist,and selectthenewrolecreated(forexamplevmstudio)asitsAssignedRole.
To assign a provisioning role to a user in ESX/ESXi 1 2 3 CreateanewuserontheESX/ESXihost.YoucandothiswiththevSphereClient.Connecttothehost, navigatetotheUser&Groupstab,rightclickAdd,andtypetherequiredinformationintothedialogbox. RightclicktheESX/ESXihostobject(intheInventorytreeview)andselectAddPermission. IntheAssignPermissionsdialog,addthenewuseryoucreatedinStep 1totheUsersandGroupslist,and selectthenewrolecreated(forexamplevmstudio)asitsAssignedRole.
ObviouslythesestepsdonotapplyifyouarecontenttoprovisionwithauserwhohasthevCenterServer Administratorrole,orESX/ESXirootpermission.
Datastore
HostLocaloperations
HostprofileView NetworkAssignnetwork
VMware, Inc.
29
Resource
vAppFullpermissions VirtualmachineFullpermissions
Datastore
Browsedatastore Filemanagement
HostLocaloperations
Createvirtualmachine Deletevirtualmachine
Resource
VirtualmachineFullpermissions
30
VMware, Inc.
Developing a Linux-Based VM
VMware, Inc.
31
32
VMware, Inc.
Creating a Linux-Based VM
Overviewonpage 33 OperatingSystemISOImageonpage 34 ApplicationPackagesonpage 35 CreatingaVMBuildProfileonpage 35 WebConsoleTabReferenceonpage 37 BuildingaVMfromtheBuildProfileonpage 46 TestingtheGeneratedVMonpage 46 ReiteratingtheBuildProcessonpage 47 MigratingBuildProfilesfromStudio1.0or2.0onpage 47 VMwareToolsInstalledinaGeneratedVMonpage 47
Overview
VMwareStudiosupportsthecreationofvirtualmachinescontainingaLinuxbasedoperatingsystem, userprovidedapplications,andtheVirtualApplianceManagementInfrastructure(VAMI)agent.Italso allowscustomizationoftheVAMIWebinterfaceifyouareshippingthevirtualmachineasavirtualappliance andwanttorebrandtheWebconsoleforyourvirtualappliance.
VMware, Inc.
33
http://cdimage.ubuntu.com/releases/ Ubuntu8.04.4 Ubuntu8.04.3 Ubuntu8.04.1 Ubuntu8.04 Ubuntu7.10 Ubuntu7.04 http://download.novell.com SLES11.0 32bit 64bit SLES10.2 32bit 64bit http://www.redhat.com RHEL5.4 32bit 64bit RHEL5.3 32bit 64bit RHEL5.2 RHEL5.1 http://centos.org CentOS5.4 32bit 64bit CentOS5.3 32bit 64bit CentOS5.2 32bit 64bit CentOS5.0 32bit CentOS5.4i386binDVD.iso CentOS5.4x86_64binDVD.iso CentOS5.3i386binDVD.iso CentOS5.3x86_64binDVD.iso CentOS5.2i386binDVD.iso CentOS5.2x86_64binDVD.iso CentOS5.0i386binDVD.iso 071e18754c2fb066c526672f9aea0515 92cab2977a58ce422130e5c655dc8513 997638cd72a559e38f9fd1955a368231 6d4fd59688ed8644514010316d6a5698 1539bad48e984ae1441052dc074c0995 644f9f63f208ebee36ae5e2cdcc58721 b5633ee6ee3b2e10d92672c74e594d75 32bit 64bit 32bit rhelserver5.4i386dvd.iso rhelserver5.4x86_64dvd.iso rhel5.3serveri386dvd.iso rhel5.3serverx86_64dvd.iso rhel5.2serveri386dvd.iso rhel5.2serverx86_64dvd.iso rhel5.1serveri386dvd.iso 7a12ec6599527e4f3d1790b51eadbfed 04fe3c10202402d7b389528d2bad0210 371c62851611fd32ead440df6f24a296 c5ed6b284410f4d8212cafc78fd7a8c5 b5af5c38856a331f95ac6ad40c085f9c 5390f9f703e083cf1470fb438ea49082 4380325824d389e2c202477c9d5b2855 SLES11DVDi586GMDVD1.iso SLES11DVDx86_64GMDVD1.iso SLES10SP2DVDi386GMDVD1.iso SLES10SP2DVDx86_64GMDVD1.iso 4958d4dde2575666355c8a1c5858bab0 50a2bd45cd12c3808c3ee48208e2586b 2b91efeb8a62e2824302bf9269080252 dab2c4b8fc9939b33535ab2d321f3f2e 32bit 32bit 32bit 32bit 32bit 32bit ubuntu8.04.4serveri386.iso ubuntu8.04.3serveri386.iso ubuntu8.04.1dvdi386.iso ef478e539e991dfa09c3b5b7c589aba6 f97b4abf0a91a6b260a0261a019c0e5e 5fddb647c1945b20055d751576dea8fc deprecated deprecated deprecated
34
VMware, Inc.
Footprint Reduction
YoucanreducethesizeofmostoperatingsystemsbyrunningtheVMwareStudiofootprintreductionscripts. SeeOperatingSystemFootprintReductiononpage 54fordetails.
Application Packages
VMwareStudiousesthenativepackagingmechanismforeachsupportedoperatingsystemtoinstalland updatesoftwareinthevirtualmachine.RHEL,CentOS,andSUSEuseRPMpackaging,whereasUbuntuuses DEBpackaging.VMwareStudioincludesthemkpkgcommandlinetoolforcreatingpackagesofeithertype, RPMorDEB.SeeChapter 5,PackagingaLinuxApplication,onpage 49forinformationaboutusingmkpkg. VMwareStudiosupportstheautomaticconversionofcompressedTAR(tar.gz,tgz)filesintoRPMorDEB files.YoucanusetheVMwareStudioPluginforEclipsetopackageyourapplicationinacompressedTARfile. SeeChapter 8,UsingtheVMwareStudioPluginforEclipse,onpage 69formoreinformation. AbuildprofilecontainsalistofApplicationPackageRepositorieswithpackagestobedownloadedfroman HTTPserverandinstalledinthevirtualmachine.YoucanincludeexternalHTTPservers,atsomepenaltyin reliabilityandperformance.Toincludeadditionalpackages,addeithertheURLofadirectorycontainingone ormorepackages(VMwareStudioresolvesinstallationorder),theURLofaRPMorDEBpackage,orthename ofacompressedTARfile. BeforecreatingaVM,makecertainthatyouhavealloftheappropriateoperatingsystemandthirdparty packagesthatyourapplicationrequires.Youcaninstallmultipleapplicationpackages,andyoucancontrol theinstallationordertodefinepriorityincaseofconflictingpackagefiles.Considerthesepointswhenyou assemblepackagesanddeterminedependencies:
VMwareStudioinstallspackagesintheorderyougiveintheApplicationPackageRepositorieslist (see Table 45)whileresolvingandinstallinganydependentpackages. IfyouincludepackagesintheApplicationPackageRepositorieslistthatdependonotherpackages, VMwareStudioresolvesdependenciesbetweenthemandpackagesincludedintheOSISO. IfyourapplicationdependsuponpackagesthatarenotavailableontheOSISO,identifythem beforehand.Dependentpackagesincludesystemsecurityupdatesandthirdpartypackages.Ifyour applicationdependsuponaspecificversionofapackagethatisnotpresentintheISO,obtainitseparately. Forexample,yourapplicationmightdependonthelatestversionofApache,buttheOSdistributionyou selectcontainsanolderversionofApache.Placethelatestversionintheapplicationpackagesdirectory beforestartingthebuildprocess.
URLoftheapplicationpackagerepositoryhttp://[VADK.localIP]/ISV/appliancePackages LocaldirectoryonVMwareStudioappliance/opt/vmware/www/ISV/appliancePackages
VMware, Inc.
35
To create a VM build profile 1 ObtaintheOSISOforoneofthesupportedoperatingsystems.SeeOperatingSystemISOImageon page 34forinformationaboutsupporteddistributions. YoucanuseapreviouslybuiltLinuxvirtualmachineasastartingpoint.TheOSISOimagestillmustbe present.SeeBuildingwiththeImportProfileonpage 105. 2 3 IntheVMstaboftheWebconsole,clickCreateProfile. IntheCreateaNewVMProfiledialogbox,specifyanameforyourVMbuildprofile,selectaLinuxprofile fromtheOStemplates,andclickCreateProfile. VMwareStudiosuppliespreconfiguredtemplatesforthesupportedoperatingsystems.Afteryoucreate yourownvirtualmachine,italsobecomesavailableasatemplatetocreatederivedvirtualmachines. 4 TheEditingpageappears,whereyoucreatethebuildprofileofyourVM.TheEditingpageorganizesthe buildprofileintothefollowingtabs:
DescriptionSpecifiesgeneralinformationaboutthevirtualmachineorvirtualappliance,including licenseagreement.SeeDescriptionTabonpage 37fordetails. HardwareSpecifiesvirtualhardwareconfigurationforthevirtualmachine,includingCPU, memory,networkadapters,CD/DVD,andvirtualdisks.SeeHardwareTabonpage 38fordetails. OSSpecifieslocationoftheOSISOimage,rootpassword,additionalusers,andbootscript customization.SeeOSTabonpage 39fordetails. ApplicationSpecifiestheapplicationpackagerepositoryandoperatingsystempackagestoinstall intothevirtualmachine.SeeApplicationTabonpage 40fordetails. ManagementSpecifiesVAMImanagementservicestoincludeinthevirtualmachine,anddetails abouttheoptionalupdateservicerepository.SeeManagementTabonpage 41. OutputSpecifiesthetypeofdistributionformat(OVF,OVA,orZIP)forthevirtualmachine. See OutputTabonpage 43fordetails. BuildSettingsSpecifiessetupofthebuildenvironment,suchasconnectioninformationtooneof manypossibleprovisioningplatforms.SeeBuildSettingsTabonpage 44fordetails.
Description Tab
Table 42describestheconfigurationpropertiesavailableontheDescriptiontab. Table 4-2. Description Tab Configuration Properties
Field Information ProductName Version Nameforthisvirtualapplianceorvirtualmachine.Theproductnameappearsinthe WebconsolefortheVMandonthewelcomescreen.RequiredforVMwareReady. Versionnumberforthisrelease.Thisfieldisimportantifyouareshippingthevirtual machineasavirtualappliance.Theversionnumberisusedtotrackupdatesand mustbeintheformatofmajor.minor.build.revision.Numberscanbeintherangeof 065535.Forexample,1.0.0.0forthefirstrelease.RequiredforVMwareReady. Thisfieldallowsyoutoentermoredescriptivetextforversion.Forexample,ifthe virtualapplianceisinthealphareleasestate,youmightenter1.0.0.0alphaversion. URLonyourcompanysWebsitethatprovidesinformationabouttheproduct. Enteryourcompanyname.Thisfieldisimportantifyouareshippingthevirtual machineasavirtualappliance. Descriptivetextaboutthevirtualmachine.forexample,thefeaturesprovidedorthe contentsofthevirtualmachine,andsoforth.PlacedintheOVFannotationelement. VendorURLtoyourcompanysWebsite.Thisfieldisimportantifyouareshipping thevirtualmachineasavirtualappliance. URLtoyourmainapplicationcontainedinthisvirtualmachine.Thisfieldis importantifyouareshippingthevirtualmachineasavirtualappliance.ThisURLin usedbothasatargetfortheApplicationURLLabel,andinthevSpheresummarytab toprovidealinktotheapplication.The${app.ip}keywordintheURLresolvesto theVMsIPaddress,afterdeployment,atruntime. Description
VMware, Inc.
37
Web Console Visual Customization LogoPath LocationoftheimagefileontheVMwareStudioappliancefortheiconthatdisplays intheWebconsoleforthisvirtualmachine.Thisfieldisimportantifyouareshipping thevirtualmachineasavirtualappliance. TheURLtousewhenthelogoisclickedintheWebconsole.Youcanspecifyyour companysWebsiteorasitethatcontainsinformationaboutthevirtualappliance. ThelinkshouldbeanhttporhttpsURL,forexample,http://www.example.com. ThelabelfortheURLintheApplicationLinkURLfield.Thisisthelabelthatappears intheWebconsoleforyourapplication.Forexample,ifyourapplicationisnamed Acme,youcanusethelabelAcmeHometopointtothehomeaddressofthe Acmeapplication. Tocustomizetheleftsidefooterandthemiddlefootertext,youcanedittheXML buildprofile.SeeCustomizingtheFooterintheWebConsoleonpage 129.
LogoLinkURL
ApplicationURLLabel
EULA
Thefulltextofyourenduserlicenseagreement.Theuserseesthiswhenrunningthe VMforthefirsttimeandmustacceptthislicenseagreement.Thisisimportantifyou areshippingtheVMasavirtualappliance.IfnoEULAisdefined,thentheVMboots withoutuseracceptance.IfaEULAisdefined,butyoudisablethecheckboxShow EULAonfirstboot,theappliancedoesnotpromptforEULAacceptanceduringits firstboot. IftheEnableLoginScreencheckboxisenabled,thevirtualappliancedisplaysthe WelcomeTextontheloginscreenafterthevirtualmachinebootsup. EnterinformationthatprovidesanintroductiontoyourVM.Youcansupply instructionsfortheuseronhowtoaccessyourapplicationontheVM,whichhelps improvetheuserexperienceiftheVMisshippedasanappliance.Youcanenterup to16linesoftextwithamaximumof79charactersineachline.Charactersoverthe maximumlinelengthorlinesafterthe16tharenotdisplayed.Variablesubstitutions areacceptedfor${app.name},${app.version},and${vami.url}.
LoginScreen WelcomeTextonLoginScreen
Hardware Tab
Table 43describestheconfigurationpropertiesavailableontheHardwaretab. Table 4-3. Hardware Tab Configuration Properties
Field VMware Hardware Version HardwareVersion SetsthevirtualhardwareversionfortheVM.Forinformationaboutvirtualhardware version,seetheKnowledgeBasearticle1003746athttp://kb.vmware.com.
Description
ShowsVMwareproductplatformscompatiblewiththehardwareversionselected.
38
VMware, Inc.
Partitions MountPoint MaximumSize Size(MB) Filesystem Mountpointforthepartition. Checktheboxtospecifythatthispartitionautomaticallyusesthemaximumsize available.OnlythelastpartitionofadiskshouldbemarkedasMaximumSize. Sizeinmegabytesofthepartition. Filesystemformat,eitherext3orswap. Onlyext3issupportedatthistime.Theswappartitionmustbeonthefirstdisk,for compatibilitywithunattendedinstallers. Bootable Checkthisboxifyouwanttobeabletobootfromthepartition.
OS Tab
Table 44describestheconfigurationpropertiesavailableontheoperatingsystemOStab. Table 4-4. Operating System Tab Configuration Properties
Field Operating System OSDistribution ISOURL Areadonlyfieldspecifyingtheoperatingsystemcorrespondingtothetemplateyou chosewhenyoucreatedthisvirtualmachine. ThelocationoftheOSISOimage.TheURLcanbeeitherafile://orhttp:// location.It isrecommendedtousefile://toalocalOSISOfile. IfVMwareStudiowarnsyouthattheISOLocationCannotbeVerified,download therequiredOSISOimageorNFSmounttheOSISOdirectory,thenclickthe Check NowbuttontoreverifytheISOimageatthisURL. ISOMD5 TheMD5checksumfortheOSISOimage.VMwareStudiocomparesthevalueinthis fieldwiththechecksumfortheISOimagetoensurethattheimageiscorrect. InVMwareStudio2.1youcaneditthisfieldtocorrectthechecksumafterupdating oralteringtheISOimage.Also,removingthechecksumentirelyskipsthechecksum validationstep.Thisisnotgenerallyrecommended,butcanbehelpfulifyouhavea customizedISOimage. Description
VMware, Inc.
39
AddUser
Ifthecheckboxisenabled,thefirstscriptrunsatinitialbootandtheotherscriptruns atsubsequentboots. Ascriptthatcontainsanyapplicationrelatedconfigurationthatshouldoccurwhen thevirtualmachineisfirstbootedup.Importantforvirtualapplianceswhere enduserconfigurationisrequiredaccordingtothedeploymentenvironment.For example,populatingadatabase,configuringsystemdatathattheapplicationneeds, orstartingvariousapplicationcomponents.Thisscriptisexecutedonlyonthefirst bootupofthevirtualmachine.Thisscriptcanbefoundinthevirtualmachineat /opt/vmware/etc/isv/firstboot. Ascripttorunonthesecondandsubsequentrebootsofthevirtualmachine.Youcan entercommandsforapplicationstartupinthisfield.Youcanlocatethisscriptinthe VMat/opt/vmware/etc/isv/subsequentboot.Importantforvirtualappliances.
SubsequentBootScript
Application Tab
Table 45describestheconfigurationpropertiesavailableontheApplicationtab. Table 4-5. Application Tab Configuration Properties
Field Application Packages ApplicationPackageRepositories AlistofApplicationPackageRepositories. Ifyouplacepackagesintothisdirectory,youneedtospecifyonlythedirectory, noteachpackageexplicitly. UsetheMoveUpandMoveDownbuttonstospecifytheinstallationorder. AddURL|Edit|Remove Toaddanapplicationpackageordirectoryofapplicationpackagestoyour VM,clickAddURL,entertheURLofthepackageordirectory,andclickOK. TochangetheURLofanapplicationpackageordirectory,clickEdit,modify theURL,andclickOK.Todeleteanentry,clickRemove. SeeApplicationPackagesonpage 35fordetailsaboutapplication repositories. VMware Tools Installbasepackages InstallpackagesforX Ifthischeckboxisenabled,theVMwareToolsatthelistedpackagelocation willbeinstalled. Ifthischeckboxisenabled,theVMwareToolsforX11windowsatthelisted packageslocationwillbeinstalled. Description
40
VMware, Inc.
Management Tab
Table 46describestheconfigurationpropertiesavailableontheManagementtab. VAMImanagementservicesexposemanagementfunctionalityastabsinthegeneratedappliancesVAMIWeb console.TheCoreserviceprovidestheVAMIuserinterfaceandserverframework.TheSystemandNetwork servicesprovidesbasicsysteminformation,timezonesettings,andnetworksettings.TheUpdateserviceis optionalandenablesupdatingoftheOSandapplicationpackagesfromaremoteupdaterepository. Table 4-6. Management Tab Configuration Properties
Field Management Services EnableManagementCIMOM Server core,network,system Ifyouenablethischeckbox,thesmallfootprintCIMbroker(SFCB)thatsupports VAMIisinstalled.SFCBisatypeofCIMOM(CIMobjectmanager). Ifthischeckboxisdisabled,asasideeffectthemanagementGUIisnotinstalled. Name,versionnumber,anddescriptionofincludedmanagementservices.Services appearastabsintheWebconsoleofaVMbuiltbyVMwareStudio,ifyouenablethe GUI.Youcandeleteservicesthatyoucreate,butbuiltinservicesaremandatory. Servicesaredefinedinthe/opt/vmware/var/lib/build/serviceshierarchy. LinuxManagementServicesarealsodisplayedundertheLibrary>Linuxtab,where youcanimportanewservice Add|Remove Toaddaservice,clicktheAddbutton,selectitscheckbox,andclickOK. Inparticular,youcanselecttheVAMIupdateservicehere. Toremoveaservice,selectitscheckboxandclicktheRemovebutton. Toreplaceaservicewithanewerversionoftheservice,firstremovetheoldversion, thenaddthenewversion. Someofthemanagementservicesarerequiredandcanbereplacedonlybya differentversionoftheservice. Management Web Server Settings EnableManagementServer (GUI) WebServerHTTPSPort CustomizeGUITabOrder Ifthischeckboxisenabled,managementservicesappearastabsintheVAMIconsole ofaVMbuiltbyVMwareStudio,availablewithHTTPS. ConfigurableHTTPSportnumberfortheVAMIWebconsole.Changethisnumberif theapplicationyouarebuildingrequiresthisportnumber.Defaultportis5480. YoucanmovethetabpositioninageneratedVAMIWebconsole. Description
VMware, Inc.
41
Update Service Repository Settings (Optional) Toenableupdateservice TheUpdateserviceenablesremoteupdatingofaVM.Itisdisabledbydefault,but recommendedwhendistributingvirtualappliancestoendusers.ToenableUpdate serviceandestablishanupdaterepository,followthisprocedure. UnderManagementServices,clickAdd,selecttheupdatecheckbox,clickAddagain, andfilloutallfieldsfortheupdaterepositoryservice. SeeChapter 7,ManagingtheLinuxUpdateRepository,onpage 61formore informationaboutupdaterepositories. CDROMupdates IfyouwanttocreateaCDROMcontainingupdatesforappliancesthatlackexternal networkaccess,clickthisbutton.YouwillbeabletodelivertheISOArchiveburned ontotheCDROM,andyourappliancewillbeabletoupdatefromtheCDROM. IftheSpecifyrepositoryoptionisselectedinsteadoftheCDROMupdatesoption, RepositoryURLspecifieslocationoftheupdaterepository.TheRepositoryURLgoes intothebuildprofileandgetsembeddedinthevirtualappliance,whichperiodically checkstheURLforupdates.Ifyouplantoprovideupdatesforavirtualappliance, theRepositoryURLmustpointtoanInternetaccessiblelocation,andyoushouldnot changetheURLafterabuild. Youmightplantouseastagingserverforinternaltestingandcopythecontentsof yourupdaterepositorymanuallytoanInternetaccessibleandexternallyvisiblesite whenthevirtualapplianceisreadytobeshipped. Username(optional) ThisusernameisusedtoauthenticatetoaWebserverattheURLfortheupdate repository.Tocomplywithlicensingrestrictions,thisfieldisrequiredforupdating anyvirtualappliancebasedontheRedHadEnterpriseLinux(RHEL)operating system.Allcustomersusethesameusernametodownloadupdates. Passwordforthespecifiedusername.Enterthesamepasswordtwicetoconfirm. ThispasswordisusedtoauthenticatetoaWebserverattheURLfortheupdate repository.Tocomplywithlicensingrestrictions,thesefieldsarerequiredfor updatinganyvirtualappliancebasedontheRedHadEnterpriseLinux(RHEL) operatingsystem.Allcustomersusethesamepasswordtodownloadupdates. VendorUUID AuniqueidentifierthatVMwarevCenterUpdateManagerusestoidentifyavendor. AllVMscreatedbyaparticularvendorshouldhavethesameVendorUUID.VMware recommendsthatthisbea128bitslongUUID(16bytes). AuniqueidentifierthatVMwarevCenterUpdateManagerusestoidentifya particularproduct.EachProductshouldhaveadifferentProductRID.VMware recommendsthatthisbea128bitslongUUID(16bytes). Descriptionforthisupdate.Forexample,aversionnumber,issuesfixed,orthe enhancementsprovidedbytheupdate.Updateinformationpresentedhereappears intheWebconsoleofthevirtualappliancewhentheupdateismadeavailable.
RepositoryURL
Password(optional)
ProductRID
UpdateDescription
42
VMware, Inc.
FileTransferPassword FileTransferPath
Repository Export Settings UpdateArchive EnablethisoptiontoexportanupdatearchiveasaZIPfile,andspecifyZIPFilename. Theexportedarchiveisplacedinthebuildinstancesdirectory.Youcanlatercopythis ZIParchivetoaWebserver. EnablethisoptiontoexportanupdatearchiveasaISOfile,andspecifyISOFilename. TheexportedISOimageisplacedinthebuildinstancesdirectory.Youcanlatercopy thisarchivetoaWebserver,ormorelikely,burnitontoCDROM.
ISOArchive
Output Tab
Table 47describestheconfigurationpropertiesavailableontheOutputtab. Table 4-7. Output Tab Configuration Properties
Field Distribution Format OutputFileName OutputFormat Thenameforthedistributionfileofyourvirtualmachine.Thisnameisusedwhen creatingthevirtualmachineOVF,OVA,orZIPpackage. Selectthetypeofdistributionfileforthevirtualmachine.ThedefaultformatisOVF. Youcanchoosemorethanoneoutputformat.
Description
Thedirectoryunderwhichfilesrelatedtoyourvirtualmachineshouldappearwithin thegeneratedZIPoutputfile.
IfthedistributionformatisOVF1.0orOVA,duringdeploymenttheuserisgiventhe optiontouseaDHCPserverforconfiguringthisVMsnetworking,whichwillbe automaticallyconfiguredbytheVAMIagent.VMwarerecommendsthatanIPpool beconfiguredonthevCenterServertoavoidawarningmessage,butanIPpoolis notrequiredforDHCP. IfthedistributionformatisOVF1.0orOVAanddeployingonvCenterServer,during deploymenttheuserisgiventheoptiontouseafixedortransientIPaddressforthis VM.TheVMsnetworkingwillbeautomaticallyconfiguredbytheVAMIagent. This requiresthatanIPpoolbeconfiguredonthevCenterServer.
OVFEnvironment
OVF Properties Add|Edit|Remove Key Label Description ClickAddtoaddanOVFproperty.ClickEdittochangeanexistingOVFproperty. ClickRemovetodeleteanOVFproperty. KeytoOVFProperty. LabelforOVFProperty. DescriptionofOVFProperty.
VMware, Inc.
43
ConnectionWizard
Build Environment Settings <Platform>Host ThehostnameorIPaddressofthevirtualizationplatformyouuseforprovisioning. Notallinformationitemsarerequiredfordifferentplatforms.Forexample,only VMwareWorkstationneedsthevmruncommand,andthebuilddirectorypathis neededonlyforhostedproducts. Port Theportforcommunicatingwiththeremotehostthatperformsprovisioning.For manyvirtualizationplatformsthisistheHTTPSport443.VMwareServer1.0.xoften usestheauthdorautomationport,usually902,sometimes904.VMwareServer2.0 hostedonWindowsprobablyusesport8333.VMwareWorkstationusesSSHonport 22forremoteprovisioning,soitdoesnotaskforaportnumber. Ausernameontheremotehostforauthenticationofvirtualmachineprovisioning. Passwordforthespecifiedusername.Youmusttypethepasswordtwicetoconfirm. (vCenteronly)DatacenternameasdesignatedintheVMwarevSphereinventory. ThisnameappearsintheleftsidebaroftheVMwarevSphereclientwhenconnected throughvCenterServer. Specifythedatastorewhereyouwanttostorethevirtualmachinefiles.Datastore namesappeartheVMwarevSphereclientSummarypage.
DatastoreName
44
VMware, Inc.
OnWindowsthiscouldbeC:\ProgramFiles\VMware\VMwareWorkstation. OnLinuxthiscouldbe/usr/bin.
BuildDirectoryPath
HostEnvironment
FileTransferProtocol FileTransferUsername FileTransferPassword FileTransferPathUsedbyVMwareStudioforuploadingthevirtualmachine beingbuilttotheHostPath.Touploadthevirtualmachineduringthe provisioningphasefromVMwareStudiotothehostrunningtheprovisioning platform,youmightneedtospecifytheFileTransferPathandHostPath differentlyforthescputility,althoughtheymustrefertothesamedirectoryon thehostrunningtheprovisioningplatform.Forexample,ifVMwareServerruns onWindows,SCPusestheOpenSSHserverinCygwin,sotheHostPathis c:\tmpbuttheFileTransferPathshouldbe/cygdrive/c/tmp.
IPAddress Netmask Gateway PreferredDNSServer AlternateDNSServer Bridgedmodeisthedefaultforcommunicatingwiththevirtualmachinebeing built.BridgedmodeisrequiredwhentheVMwareStudiovirtualapplianceand theprovisioningplatformarerunningondifferentcomputers. HostOnlymodeapplieswhenVMwareStudioisrunningonalocalinstallation oftheprovisioningplatform.ForHostOnlyprovisioningavirtualappliance mustbeconfiguredtouseHostOnlynetworkingbypoweringofftheVMware Studiovirtualapplianceandeditingitsvirtualnetworkadaptersettings.
NetworkConnection
ForVMwareWorkstationandServer1.0.x,specifyoneofthefollowingoptions:
VMware, Inc.
45
46
VMware, Inc.
Ifyouplantodistributethisvirtualmachineasavirtualappliancetoyourcustomers,seetheUsersGuideto DeployingvAppsandVirtualAppliancesforinformationaboutdeployingyourvirtualappliancefortesting.
IfyouhaveanexistingbuildprofilethatyouwanttobringintoVMwareStudioyoucanimporttheprofile. Howeveryoucannotuse,norsuccessfullyimport,aStudio2.0BetaprofileintoStudio2.0or2.1GA.Instead, youmuststartfromapreexisting2.0template,orimportaVMwareStudio1.0profile. To import an existing build profile 1 2 3 4 PlacethebuildprofileonthehostwheretheWebbrowserruns. OpentheVMwareStudioWebconsoletotheVMspageandclickImportProfile. Adialogboxappearswhereyouenteranamefortheprofileandlocationofthebuildprofiletoimport. ClicktheBrowsebuttontohelpfindthebuildprofileonyourcomputer. ClickImportProfile.VMwareStudiocreatesanewbuildprofilebasedontheimportedone,andaddsit totheVMList.YoucanselectthenewlyimportedVMandbuildit,oredititsprofile.
VMware, Inc.
47
48
VMware, Inc.
Thischaptercontainsthefollowingsections:
VMware, Inc.
49
Themkpkgcommandsyntax,withoptionsdescribedinTable 51,isasfollows:
mkpkg -t {rpm|deb} [-T] [-c ctrl] [-C file] [-P preinst] [-p postinst] [-R prerem] [-r postrem] <dir>
Thisisthesameasrunningmkpkgfromthestudioclifrontend.
studiocli --mkpkg -t {rpm|deb} [-T] [-c ctrl] [-P preinst] [-p postinst] [-R prerem] [-r postrem] <dir>
CreateaControlfilebyrunningthiscommand,whichproducesthemessagethatfollows.
mkpkg t deb T deb control file template has been created as control
Youcannowmodifythecontrolfileasneeded.
Package: hadoop-dfs Version: 1.00 Essential: yes Priority: extra Section: utils Maintainer: yourname@example.com Architecture: i386 Description: Hadoop is a distributed file system based on map-reduce.
NOTEThecontrolfilealsocontainsaDependssection.Ifyoudonothaveanypackagedependencies, makesureyouremovetheDependssection.
50
VMware, Inc.
Ifyourcommandsyntaxiscorrect,yougetamessagesimilartothefollowing:
109737 blocks dpkg-deb: building package hadoop-dfs in /<your_home>/hadoop-dfs-1.00_i386.deb
CopythegeneratedDEBfileto/opt/vmware/www/ISV/appliancePackageswiththecpcommand:
cp hadoop-dfs_1.00_i386.deb /opt/vmware/www/ISV/appliancePackages
CreateaControlfilebyrunningthiscommand,whichproducesthemessagethatfollows
mkpkg t rpm T -p postinst.sh rpm control file template has been created as control.spec
UnlikeforDEB,mkpkgforRPMplacesthepreinstallandpostinstallscriptswithinthecontrolfile. 3 Youcannowmodifythecontrol.specfileasneeded.
Summary: Sample SugarCRM package Name: SugarCRM Version: 5.1.0c Release: 11 License: Commercial Vendor: SugarCRM Group: System Environment/Daemons URL: http://www.sugarcrm.com BuildArchitectures: noarch #Requires: %description
ThefollowingisanexampleofaSugarCRMpackage:
%post #!/bin/bash chown -R wwwrun /opt/SugarCE-Full-5.1.0c/ # # Do not put anything below the %defattr line; the list of files # in this package is automatically written there. # %files %config /opt/SugarCE-Full-5.1.0c/config.php %defattr(-,root,root)
The%configsectionlistsconfigurationfilesthatyoudonotwantoverwrittenduringanupdate.
VMware, Inc.
51
Runmkpkgwiththecontrol.specfileyoujustedited.
mkpkg -t rpm -c control.spec SugarCE-Full-5.1.0c
Ifyourcommandsyntaxanddependenciesarecorrect,youseemessagessimilartothefollowingbefore yourRPMisgenerated:
109737 blocks Processing files: SugarCE-Full-5.1.0c Checking for unpackaged file(s): /usr/lib/rpm/check-files Wrote: /<your_home>/ sugarcrm_5.1.0c.0-11_i386.rpm
CopythegeneratedRPMfileto/opt/vmware/www/ISV/appliancePackageswiththecpcommand:
cp sugarcrm_5.1.0c.0-11_i386.rpm /opt/vmware/www/ISV/appliancePackages
Thecommandtogeneratethepackageisdpkg-deb.Becauseoffilepermissionissues,youusuallycallitfrom acommandcalledfakeroot,asinthisexample:
fakeroot dpkg-deb -b <directory-hierarchy>
ThecommandtogenerateRPMpackagesisrpmbuild,whichyourunasinthisexample:
rpmbuild -bb <controlfile> --buildroot <directory-hierarchy>
52 VMware, Inc.
Themanifest.xmlfilemustconformtothefollowingexample:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <package format="1.0" type="linux"> <name>packagename</name> <version>1.0.0.0-build1</version> <vendor>special apps</vendor> <depends>package1, package2, package3</depends> <arch>i386</arch> <short-description>Best special app</short-description> <description>A sample package the best app!</description> <preinstall>#!/bin/sh echo "Hello from the preinstall" </preinstall> <postinstall>#!/bin/sh echo "Hello from the postinstall" </postinstall> <preremove>#!/bin/sh echo "Hello from the preremove" </preremove> <postremove>#!/bin/sh echo "Hello from the postremove" </postremove> <configuration-files> <file>/opt/myapp/config.xml</file> </configuration-files> </package>
VMware, Inc.
53
54
VMware, Inc.
Thischapterexplainsthefollowingtopics:
VMwareStudiocontainsseveraldefaultmanagementservices,anditallowsyoutocreatenewones.
VAMIhasthefollowingcomponents:
HTTPServerAlightweightWebserverusingLIGHTTPDtohostthemanagementWebconsole. CIMBrokerThesmallfootprintCIMbroker(SFCB)actsasthemanagementagentfortheVM.CIMis astandardfromtheDistributedManagementTaskForce(DMTF);seehttp://www.dmtf.orgfordetails. VAMIUIFrameworkProvidesacontainerfortheVAMIserviceWebinterface,whichisshownasatab intheWebconsole. VAMIServicesVAMIservicesareusedtoexposeaWebinterfacetomanagetheVM.AVAMIservice cancontainaWebinterface,theCIMprovider,additionalfiles,andWebserverconfiguration.TheWeb interfacecanoptionallyuseaJavaScriptAPIforbetterintegrationwiththeVAMIUIframework. AuthenticationThepluggableauthenticationmodule(PAM)isusedtoauthenticateaccesstothe managementWebconsoleandCIMAPIs.Theauthenticationmodulecreatesasessionfileforeachuser, whichisstoredat/opt/vmware/var/lib/vami/core/sessionasafile.Thetimeoutforsessionsis controlledbytheenvironmentvariableVAMI_AUTHENTICATION_TIMEOUTandspecifiedinnumberof minutes.Thedefaultsettingisoneday(1440minutes).
vadk:LoginTTYThebluescreenserverconsole. vadk:ShowEULAEULAappearingonthevirtualmachineconsole. vadk:ManagementSrvWebservicesbackend(CIMobjectmanager). vadk:ManagementGuiWebuserinterfaceandHTTPserver,whichdependsonthebackend. vadk:RunBootScriptsBootscripts. vadk:VMToolsCoreandvadk:VMToolsXVMwareTools,usuallytheOSspecificpackage(OSP). vadk:UpdateSection_TypeTheupdateservice. vadk:InitScriptCustomizableserviceinitializationscriptruneachtimethevirtualapplianceboots. SeeCustomizingtheInitializationScriptonpage 59.
VAMIpackagesmayalsoincludeapplianceconfig,init,andservicebase.
56
VMware, Inc.
service.xmlContainsservicename,versionnumber,anddescriptionofthemanagementservice. Installedinthe/opt/vmware/var/lib/vami/${servicename}/directory. conf/lighttpd.confLIGHTTPDconfigurationsettingsforthisservice.Settingsareappendedtothe originallighttpd.conffileandinstalledin/opt/vmware/var/lib/vami/${servicename}/conf. provider/*.regCIMproviderregistrationfiles.Atbuildtime,VMwareStudioinstallsthisfileintothe /opt/vmware/var/lib/sfcb/stage/regs/directory. provider/*.mofCIMprovidermanagedobjectformat(MOF)files.Installedintothe /opt/vmware/var/lib/sfcb/stage/mofs/root/cimv2directory. provider/*.soCIMprovidersharedlibraries.Installedinto/opt/vmware/lib. system-root/*Contentoftheservicethatmustresidein(getcopiedto)thesystemrootdirectoryof theVMsoperatingsystem. view/view.xmlDescribesthetabtitletoshowintheWebconsole,containsinformationaboutthetabs content.Installedinthe/opt/vmware/share/htdocs/service/${servicename}/directory. view/*Allviewspecificfilesforthisservice.ContainsHTML,JavaScript,andimages.Installedinthe /opt/vmware/share/htdocs/service/${servicename}/directory. web-root/*TheviewdirectorycontainsservicespecificWebuserinterfacefiles.Additionalfilesthat mustbeplacedattheWebrootlevelofLIGHTTPD.Installedin/opt/vmware/share/htdocs.
Oftheabovefiles,onlyservice.xmlismandatory,andview.xmlisneededforitsassociateduserinterface.
service.xml
Thisfiledescribestheidentityanddependenciesoftheservice.Thefollowingcodeblockdescribesthe service.xmlformat:
<service> <name>ServiceName</name> <version>1.0.0.0</version> <description>This provides the build service to create new appliance</description> <requires> <packages>rpm_or_dep_package_dependencies separated by commas</packages> <services>other_service_dependencies separated by commas</services> </requires> </service>
view.xml
ThisfiledescribestheWebinterfaceproperties,includingthetabtitleandcontentsofthetab.Contentcanbe oftwotypes,urlorhtml.Whencontenttypeisurl,itisthelocationofthefilethatappearsintheUItab. Thefollowingcodeblockdescribestheview.xmlformatwhencontenttypeisurl:
<service> <title>ServiceTitle</title> <content type="url" url="index.html"/> </service>
VMware, Inc.
57
Creating a Vanilla VM
TodisablealltheoptionalVAMIservices,orasubsetofmanagementservices,changetheseelementsinthe XMLprofilesvadk:VAMISection_Typetofalse:
<vadk:ShowEULA>false</vadk:ShowEULA> <vadk:SetHostname>false</vadk:SetHostname> <vadk:SetNetwork>false</vadk:SetNetwork> <vadk:CreateSSHKeys>false</vadk:CreateSSHKeys> <vadk:RunBootScripts>false</vadk:RunBootScripts> <vadk:LoginTTY>false</vadk:LoginTTY> <vadk:ManagementSrv>false</vadk:ManagementSrv> <vadk:ManagementGUI>false</vadk:ManagementGUI> <vadk:VMToolsCore vadk:install="false" /> <vadk:VMToolsX vadk:install="false" />
Underlying CLI
Youcanrunthevamimanagercommandtoinstall,uninstall,extract,register,andunregisterservices.Theuser interfaceusesthevamimanagercommandtoimplementactions. Typevamimanageratthecommandlineforinformationaboutitsoptions.
LogintotheVMwareStudioWebconsoleandclicktheLibrary>Linuxtabs. ClicktheImportServicebutton.Browsetothelocationofthetarortar.gz filethatyoucreatedforyour managementservice.ClickImportService. Ifcorrectlycreated,yournewserviceappearsinthelist,withitsversionanddescription.VMwareStudio maintainsthemanagementservicesrepositoryunder/opt/vmware/var/lib/build/services. FollowinstructionsforcreatinganewVM,orforeditinganexistingVM. OntheManagementpageunderManagementServices,clicktheAddbutton,selectthenewservicefrom alist,andclickAdd. Optionally,clickCustomizeGUITabOrder,whichallowsyoutoadjusttheorderofthetabs. SaveandbuildtheVM.
VMware, Inc.
ThisserviceisinstalledasRPMorDEBpackageintheresultingVMandappearsasatab(ifitcontainsaUI component)intheVMmanagementWebconsole.
Launchanewbuildandtestyourchanges.
Thevaosservicestartsin19thpositionatrunlevelstwoandzero,asyoucanseein/etc/rc2.d.
VMware, Inc.
59
60
VMware, Inc.
Overview of Updates
Afteravirtualapplianceisbuiltandreleased,youmightneedtopublishanupdateforit.VMwareStudio definesanupdateasasetofRPMorDEBpackages.TheVMwareStudioupdaterepositorycontainsthese packagesandamanifestfilethatdescribesthecontentsofaparticularversionofthevirtualappliance.Inthe virtualappliancemodel,theISVcreatesandpublishesupdatestotherepository. Avirtualappliancedeployedatacustomersitecanphonehometoanupdaterepositorytoretrieveupdates, whichmightinclude:
OperatingSystemupdatesYoucandownloadOSupdatesfromtheOSprovidersWebsite. ApplicationupdatesYoucanprovideyourownapplicationupdates.
To update a virtual appliance 1 BuildyourfirstvirtualappliancesoitcanreceiveupdatesfromanupdaterepositoryhostedatanISVsite. InVMwareStudio(seeManagementTabonpage 41)enabletheupdateservicebeforeabuild.When youenableupdatesforaVM,VMwareStudiocreatesanupdaterepositoryaftertheVMbuild. Aftertheapplianceisshipped,monitorupdatesforitsOSinadditiontotheapplicationstackcomponents thatarepresentinyourvirtualappliance. Analyzethechangesandselectapplicableupdatesforyourvirtualappliance. Generatetheupdateintheformthatyourvirtualapplianceunderstands.Forgeneratingupdatesusing VMwareStudio,seeGeneratinganUpdateonpage 62. Testtheupdatestomakesurethatyourapplicationcontinuestoworkasbeforeinthevirtualappliance. Publishtheupdate.SeePublishinganUpdateonpage 64.Youhaveachoiceofseveralpublication methods,assummarizedinTestingAgainstaStagingUpdateRepositoryonpage 66.
2 3 4 5 6
VMware, Inc.
61
Figure 72showsthedifferentchannelswhereavirtualapplianceVMcanretrieveupdates.BoththeZIPfile andISOimagecontainthecompleteupdaterepositorythattheISVbuilds.TheZIPcanbedeployedtoalocal Webserverwithinthecustomerslocalareanetwork,whereastheISOcanprovideoffnetworkupdatesifthe VMisconfiguredwithaCDdrive. Figure 7-2. Virtual Appliance Update Retrieval
Generating an Update
Figureshowstheflowofcreatingavirtualapplianceanditsupdaterepository.Whentheupdatemanagement serviceforaVMisenabled,anupdaterepositoryiscreatedattheendoftheVMbuild.Anupdaterepository cannotbecreatedwithoutbuildingtheVM. Figure 7-3. Update Flow During VM Builds
Start
Build VM or vApp
Create Update?
End no
yes
62
VMware, Inc.
To generate an update from the VMware Studio Web console 1 2 3 4 LogintotheVMwareStudioWebconsole. IntheVMList,selectthevirtualapplianceforwhichyouwanttogenerateanupdate. UnderActions,clickEditProfile. IntheDescriptiontab,changetheversionnumberintheprofilefortheVM.Thisisthekeyindicatorthat anupdatewasgeneratedforanexistingvirtualappliance.TheVersionisanumberinN.N.N.Nformat, whereNmustbeanumberbetween0and65535. IntheManagementtab,clickAddandenabletheupdateservice.AnewUpdateServicesectionappears onthepage,withasectionforUpdateServiceRepositorySettings. ChooseandtypeaRepositoryURLtoestablishanupdatesiteforyourvirtualappliancesinthefield. The RepositoryURLshouldbeonapubliclyaccessibleWebsite. OntheVMs>ManagementpageunderUpdateServicesettings,youcanchangetheRepositoryURL. Whenavirtualapplianceupdates,itgetsthechangedRepositoryURL,sothefollowingtimeitchecksfor anupdate,itwilllookinthenewlocation.Rebootisnotrequired.Toenablethisfeature,theoldrepository mustcontainafinalupdatewiththenewrepositorylocation,andthenewrepositorymustcontainan initialupdate.Thefinalupdateandtheinitialupdatemaybethesameapplianceversion,ordifferent. NOTEChangingthevirtualappliancename,VendorUUID,orProductRIDinthebuildprofilewhile generatingupdatesmightaffectintegrationwithVMwarevCenterUpdateManager.SeeSupporting CentralUpdateswithVMwarevCenterUpdateManageronpage 67formoreinformation. 7 8 ProvideanUpdateDescriptionsotheenduserknowswhatthisupdatecontains.TheVendorUUIDand ProductRIDaremandatoryforusewithVMwarevCenterUpdateManager. CompletethedetailsforRepositoryServerSettings,wheretheupdatearchivegetscopiedafterabuild. Ifyouplantocopytheupdatefromastagingservertotheupdaterepositoryonanexternalproduction Website,makesuretheRepositoryURLpointstothatexternalproductionWebsite,nottotheinternal stagingserver.Afterthebuildcompletes,copytheentirestagingserverupdatetotheexternalproduction Website.Toeasethetaskofcopyingalltheupdatefiles,underRepositoryExportSettingsyoucanclick UpdateArchiveandspecifyaZIPFilename. VMwareStudiocreatesanewmanifestwiththenewversionnumberspecifiedinthebuildprofile,and updatestherepository.VMwareStudiomarksthenewversionofthevirtualapplianceasthelatestversion andcopiesthenewandchangedpackagestotheupdaterepository.Ifyouremoveapackagefromthebuild profile,thenewlygeneratedmanifestreflectsthisremoval.TheVAMIagentdoesnotdeletepackageswhen updatinganappliance,butyoucanaddapreupdateorpostupdatescripttoremovepackages.
5 6
Updates on CDROM
Ifyouarebuildinganappliancethatlacksexternalnetworkaccess,orifyourcustomersprefer,youcandeliver updatesonCDROM. To generate an update from the VMware Studio Web console 1 2 FollowthegeneralprocedureforGeneratinganUpdateonpage 62. InStep 6,selectCDROMupdatesinsteadofSpecifyrepository. FieldsforRepositoryURL,Username,andPasswordbecomedimmedout. 3 4 5 UnderRepositoryExportSettings,clickISOArchiveandspecifytheISOFilenametocreate. Afterthebuildsucceeds,theupdateiscopiedtotheFileTransferPathontheFileTransferHostname. BurntheISOFilenametoCDROMfordeliverytoyourcustomers. Alternately,youcanmaketheISOimageavailableatalocationonyourproductionrepositoryWebserver, andletcustomersdownloaditandburntheCDROMthemselves.
VMware, Inc. 63
Publishing an Update
Afterthefieldsaremodifiedinthebuildprofile,clickSaveandBuildtobuildyourvirtualappliancewiththe updates.Aspartofthebuildprocess,theupdaterepositoryisupdatedwithanewmanifest.Youcanseethat manifest-latest.xmlisupdatedtoreflecttheupdate,andadditionalpackagesarecopiedtotherepository. NOTEItisnotpossibletopublishupdatesforavAppinasingleunit.TheISVmustcreateaseparateupdate repositoryforeachconstituentVMinthevApp.
64
VMware, Inc.
TopublishanupdatefromtheZIParchivecreatedusingRepositoryExport,extractthecontentsofthefilein thedocumentrootoftheURLthatwasspecifiedastheupdateURL.Forexample,ifyousettheupdateURL tohttp://<your-server>/updates/andsetthedocumentrootintheWebserverto/var/www/htdocs/, thenyouwouldextractthecontentsoftheZIPfileinto/var/www/htdocs/updates/on<your-server>. VirtualapplianceenduserscouldnowretrieveandinstalltheupdatefromyourWebserver. ThefollowingexampleisforLinuxbasedWebservers. To publish an update from the ZIP archive 1 ConnectwithSSHtoyourproductionupdateserver,inthisexamplesupport.example.com:
ssh support.example.com
RunscptosecurecopyfromtheVMwareStudiovirtualappliance<vmwStudio>into/tmp:
scp root@<vmwStudio>:/opt/vmware/www/build/<buildNumber>/exports/zip/<exportFile>.zip /tmp
IftheproductionupdateserverhasHTTPaccesstoyourvirtualappliance,youcouldinsteadrun:
cd /tmp; wget --no-proxy http://<vmwStudio>/build/<buildNumber>/exports/zip/<exportFile>.zip
Ifyournetworkdoeshaveaproxy,wgettakesitfromthehttp_proxyenvironmentvariable. 3 CreateadirectoryforupdatesonyourWebserver:
mkdir -p /var/www/htdocs/updates/productXYZ cd /var/www/htdocs/updates/productXYZ
VMware, Inc.
65
RunthefollowingcommandstoextracttheupdatearchivecontentsintotheproductXYZdirectory:
unzip /tmp/<exportFile>.zip
FromaWebserveronthepublicInternet,calledProductionServerintheFigure 71diagram.IntheVM buildprofile,UpdateRepositoryURLreferstotheupdatelocationonthisWebserver. BydeliveringaZIPfiletoyourcustomers,whounziptherevisedsoftwareintotheupdaterepositoryon theirlocalWebserver,andsettheirvirtualappliancetoupdatefromtheURLoftheupdaterepositoryon thislocalWebserver.ThemiddleofFigure 72showsthisdeliverymechanism. BydeliveringaCDROMtoyourcustomers,whoplacethediscinaCDdriveaccessibletotheappliance andenableupdatefromCDROM.ThebottomofFigure 72showsthisdeliverymechanism.
Runthiscommandtocheckforupdateavailability:
/opt/vmware/bin/vamicli update --check
Runthiscommandtoinstalltheupdate.
/opt/vmware/bin/vamicli update --install latest
Runthedesiredteststoverifythattheexpectedupdatesoccurredintheappliance.
CheckingforupdatesrequirestheHTTP1.1protocolonyourupdaterepositoryWebserver.
66
VMware, Inc.
TheXMLcontainsupdatemetadataincludingintroduced-versionforVMwarevCenterUpdateManager (VUM)tomatch.LookfortheUpdateInfosection,whichyoucanedittosupportUpdateManager.
<vadk:UpdateInfoList> <vadk:UpdateInfo vadk:introduced-version="1.0" vadk:category="feature" vadk:severity="important" vadk:affected-versions="" vadk:description="" vadk:reference-type="vendor" vadk:reference-id="" vadk:reference-url=""/> </vadk:UpdateInfoList>
YoucanedittheXMLsectionExtendedConfigList,whichgetsplacedintothemanifestfile.
<vadk:ExtendedConfigList> < [edit this section] /> </vadk:ExtendedConfigList>
TheXMLprofilecanenableanddisabledigitalsignatures.SeeDigitallySigninganUpdateonpage 64.
VMware, Inc.
67
68
VMware, Inc.
TheVMwareStudioPluginforEclipsecanhelpyoupackageapplicationsanddevelopLinuxbasedvirtual appliancesandvApps.Thischaptercontainsthefollowingsections:
AccesstotheVMwareStudioforEclipseupdatesite,http://<StudioIPaddr>/eclipse/update/ TheVMwareStudioForEclipse-2.1.0.*.zippackagedownloadedfromVMware.com
VMware, Inc.
69
c d 3 4
5 6 7
VMware, Inc.
71
InEclipse3.4,selectHelp>SoftwareUpdates>InstalledSoftware. InEclipse3.5,selectHelp>AboutEclipse>InstallationDetails>InstalledSoftware.
2 3
SelectVMwareStudioPluginforEclipseandclickUninstall. RestartEclipsewhenprompted.
72
VMware, Inc.
Developing a Windows-Based VM
VMware, Inc.
73
74
VMware, Inc.
Creating a Windows-Based VM
ThischapterdescribeshowtocreateaWindowsbasedVMusingtheVMwareStudioWebconsole.
Overview
VMwareStudiosupportsthecreationofvirtualmachinescontainingaWindowsbasedServeroperating systemanduserprovidedapplications. WindowsbasedVMsbuiltbyVMwareStudiodonothavetheVirtualApplianceManagement Infrastructure (VAMI)agent.
VMware, Inc.
75
76
VMware, Inc.
DescriptionSpecifiesgeneralinformationaboutthevirtualmachine.SeeDescriptionTabon page 37fordetails.WebConsoleVisualCustomizationandWelcomeTextfieldsarenotsupportedin WindowsbasedVM.Theenduserlicenseagreement(EULA)issupportedonlywhenpackagingthe WindowsbasedvirtualmachineasOVForOVA,andisdisplayedatdeploymenttime. HardwareSpecifieshardwareconfiguration,suchasCPU,memory,anddisks,forthevirtual machine.SeeHardwareTabonpage 38fordetails.Usethedrivefieldtoassignadrivelettertoa diskpartition. OSSpecifiesinformationabouttheoperatingsystemforthevirtualmachine.SeeOSTabon page 39fordetails.(OperatingSystemConfigurationincluded,seeOSTabonpage 77.) ApplicationSpecifiesthelistofVSPforWindowsfilestoinstallintothevirtualmachine.See ApplicationTabonpage 79fordetails. OutputSpecifiesthetypeofdistributionformat(OVF,OVA,orZIP)forthevirtualmachine.ZIPis fordeploymentonolderVMwareproductplatforms.OVFisfordeploymentonESX/ESXihostsor VMwarevSphere,andOVAforVMwarevSphere.SeeOutputTabonpage 43fordetails. BuildSettingsSpecifiessetupofthebuildenvironment,suchasconnectioninformationtomany possibleprovisioningplatforms.SeeBuildSettingsTabonpage 44fordetails.
OS Tab
TheOSTabcontainsthebasicsettingstoinstallWindowsinunattendedmode.VMwareStudiocreatesan unattendedsetupfilewithsettingsfromtheOperatingSystemInstallationConfigurationsection,and providesittotheWindows. Table 92describesthenewconfigurationpropertiesintheoperatingsystemOStab.
VMware, Inc.
77
Description
ItisnotrecommendedtojoinadomainduringtheVMprovisioning,iftheVM isgoingtobedeployedmorethanonce.Itispreferredtojointhedomainduring theVMdeployment,whileusingtheSyspreptool. AdditionalUnattendedConfiguration VMwareStudioautomatestheOSinstallationbycreatingaWindows unattendedfilewithsettingsbasedontheVMbuildprofile. Additionalunattendedconfigurationcanbeprovidedtomergewiththe unattendedfilecreatedbyVMwareStudio.Thisisanadvancedfeaturetoallow additionalcustomizationoftheWindowsOSinstallation,suchasperforming installationorremovalofOScomponents Windows2003usestheunattend.txtformat.Foradditionalinformationsee http://support.microsoft.com/kb/155197 Windows2008usestheunattend.xmlformat.Foradditionalinformationsee http://technet.microsoft.com/enus/library/cc730695(WS.10).aspx#BKMK_2 Operating System Sysprep Configuration PerformSysprep Ifchecked,runSyspreptoolattheendofinstallation. TheSystemPreparationtool(Sysprep)isatechnologyprovidedbyMicrosoft toautomatethecloninganddeploymentofWindowsoperatingsystem.Using SysprepisrecommendedwhenaVMwillbedeployedmorethanonce,to preparethesystemforcloning. Foradditionalinformationseehttp://support.microsoft.com/kb/302577 ForWindows2003basedVMs,theSyspreptooliscopiedfromtheWindows 2003CD(deploy.cab)intotheVMlocalfilesystemundertheC:\Sysprep folder.TheSyspreptoolisalreadyinstalledaspartofWindows2008. GeneratenewSID SysprepCommand (Windows2003)Ifchecked,generateanewSecurityID(SID).Windows2008 alwaysgenerateanewSIDwhenusingSysprep. Sysprepcommandtoexecute.
78
VMware, Inc.
Application Tab
Table 93describestheconfigurationpropertiesavailableontheApplicationtab. Table 9-3. Application Tab Configuration Properties
Field Application Packages ApplicationPackageRepositories Add|AddURL|Edit|Remove AlistofApplicationPackageRepositorieswithVSPforWindowsfiles. UsetheMoveUpandMoveDownbuttonstospecifytheinstallationorder. YoucanincludeaVMwareStudioWindowsPackageforWindowseitherfrom theVMwareStudioapplianceWindowspackagesrepositoryorfromany MicrosoftNetworkFolder. ToaddanapplicationpackagefromtheVMwareStudioappliancepackages repository,clickAdd,AdialogboxshowsalistofpackagesintheVMware StudioapplianceWindowspackages(underthe/opt/vmware/depot/winrepo directory).SelecttheWindowspackageorpackagestobeincludedaspartof theVM,andclickAddinthedialog. VMwareStudiopackagescanbeinstalledfromanyMicrosoftNetwork Foldersbyspecifyingthesmbprotocol,asinthisexample: smb://appstorage/windows/sharepoint/sharepoint.vsp ToaddanapplicationpackageordirectoryofpackagestoyourVM,clickAdd URL,entertheURLofthepackageordirectoryonaMicrosoftNetwork Folder,andclickOK. TochangetheURLofanapplicationpackageordirectory,clickEdit,modify theURL,andclickOK.Todeleteanentry,clickRemove. SeeWindowsApplicationPackagesonpage 76fordetailsaboutapplication repositories. Application Installation Customization ApplicationPreInstallScript ApplicationPostInstallScript Scriptthatrunsafterinstallationoftheoperatingsystem,butbeforethe installationofapplicationpackagesduringvirtualmachineprovisioning. Scriptthatrunsaftertheinstallationofapplicationpackagesduringthevirtual machineprovisioningphase. Description
VMware, Inc.
79
80
VMware, Inc.
VMware, Inc.
81
82
VMware, Inc.
10
10
Thischaptercontainsthefollowingsections:
VMwareStudiocontainsaSambaservertoallowremoteaccesstotheWindowspackagesrepository.Using rootusercredentials,youcanaccessitforuploadingsetupfilesinthefollowingMicrosoftNetworkFolder:
\\<studio-address>\depot\winrepo
VMware, Inc.
83
4 5
WithintheCommand1section,definetheappropriateexecutableorscripttoinstalltheapplicationin silentmode.Severalcommandtypesaresupported.
Forexample,thefollowingcommandexecutestheFirefoxinstallerfromthepackagedirectory:
Firefox Setup 3.0.6.exe -ms
Asanotherexample,thefollowingcommandskicksoffanMSIbasedinstallation:
msiexec /i crm.msi ADDLOCAL=ALL /NoRestart /Passive
84
VMware, Inc.
PACKAGEDIRLocationofcurrentpackagefolder. ThisexampleshowsusinganabsolutepathtotheMSIfile:
msiexec /i %PACKAGEDIR%\application.MSI /Passive
REPOSITORYDIRLocationoftheVMwareStudioWindowspackagesrepository. ThisexampleshowsusingMSIfilefromanotherpackage:
msiexec /i %REPOSITORYDIR%\crm\application.MSI /Passive
VMware, Inc.
85
86
VMware, Inc.
VMware, Inc.
87
88
VMware, Inc.
11
11
ThischapterdocumentsuseoftheVMwareStudioWebconsoleforbuildingavApp.
Prerequisites
TobuildavAppyoumusthaveoneormorevirtualmachinebuildprofiles.Ifavirtualmachineisnotbuilt, thevAppbuildprocessattemptstobuildit.FordetailsaboutVMbuildprocedures,seeChapter 4,Creating aLinuxBasedVM,onpage 33orChapter 9,CreatingaWindowsBasedVM,onpage 75. TorunavApp,youneedavirtualizationproductplatformthatsupportsOVF1.0,suchasVMwarevSphere.
VMware, Inc.
89
ThevAppwizardappears,whereyoucaneditthebuildprofileofyourvApp.Thiswizardorganizesthe buildprofileintothefollowingtabs:
DescriptionGeneralinformationaboutthevApp.SeeDescriptionTabonpage 91fordetails. VMsThevirtualmachinestoincludeinthevApp.SeeVMsTabonpage 91fordetails. StartOrderStartorderofvirtualmachinesinthisvApp.SeeStartOrderTabonpage 92for details. ResourcesControlsvSphereresourcesforvirtualmachinesinthisvApp.SeeResourcesTabon page 92fordetails. OutputSelectsoutputformat,virtualmachinewhichholdstheApplicationURL,andOVFsettings. SeeOutputTabonpage 92fordetails.
3 4
5 6
7 8 9
Ifthebuildissuccessful,yournewvAppappearsinthelistofvAppprofilesunderthevAppstab.Ifthebuild fails,diagnosticmessagesappearintheBuildSummarydialogbox. NOTEAnyvAppmustberepresentedaccordingtotheOVF1.0standard.TheOVF0.9specificationdidnot allowmultiplevirtualmachinestoberepresentedinacollection. Applications in a vApp AvAppisaprebuiltsoftwaresolutionconsistingofoneormorevirtualmachines(VMs). YouincludeLinuxapplicationsbyspecifyingthemintheApplicationPackageRepositorieslistforoneofthe childLinuxVMsofthisvApp,asdescribedinApplicationPackagesonpage 35. YouincludeWindowsapplicationsbyusingtheLibrary>Windowstabtocreatepackagesforapplications, ortoimportexistingpackagesforoneofthechildWindowsVMsofthisvApp,asdescribedinCreatinga WindowsApplicationPackageonpage 84.
90
VMware, Inc.
Description Tab
Table 111describestheconfigurationpropertiesavailableontheDescriptiontab. Table 11-1. Description Tab Configuration Properties
Field Information ProductName Version FullVersion ProductURL Vendor Description NameofthevAppthatyouarebuilding.ThisnameisusedtoshowthisvAppinthe vSphereinventoryandintheSummarytabofvSphere. VersionofthevApp.ThisisshownintheSummarytabforthisvAppinthevSphere client. ArbitrarytextstringusedtodisplayversioninformationofthevApp,oftensimilar toVersion.ThisisshownintheSummarytabforthisvAppinthevSphereclient. URLonthecompanysWebsitewherecustomerscanfindinformationaboutthis vAppThisisshownintheSummarytabforthisvAppinthevSphereclient. CompanynameofthevAppvendor.ThisisshownintheSummarytabforthisvApp inthevSphereclient. DescriptionofthefunctionalitythatthisvAppprovides.Thedescriptiondisplays whenthevAppisimportedintoESXasanOVFandintheSummarytabforthis vAppinthevSphereclient. VendorURLtoyourcompanysWebsite.ThisisshownintheSummarytabforthis vAppinthevSphereclient. URLtotheWebconsolefortheapplicationprovidedinthisvApp.The${app.ip} keywordintheURLresolvestotheVMsIPaddress,afterdeployment,atruntime. IntheOutputpageforvApps,theApplicationURLConfigurationfieldcontainsa menuwhereyoucanspecifywhichVMyouwantrepresentedin${app.ip}. Description
VendorURL ApplicationURL
End-User License Agreements AddEULA EULA ClicktheAddEULAbuttontoaddanenduserlicenseagreement(EULA). ThefulltextofyourEULA.Theuserispresentedwiththislicensewhenrunningthe vAppforthefirsttimeandmustacceptthislicenseagreement.IfnoEULAisdefined, thenthevAppbootswithoutuserintervention. YoucanaddmorethanoneEULAbyclickingtheAddEULAbuttonagain.Youcan deleteaEULAbyclickingtheRemoveEULAlinkontherightaboveitsEULA.
VMs Tab
Table 112describestheconfigurationpropertiesavailableontheVMstab. Table 11-2. VMs Tab Configuration Properties
Field VM List ProfileName Location Build Nameofthevirtualmachineprofile. LocationoftheOVForOVAfilefromwhichthisvAppisbuilt. Thedropdownboxallowyoutoselectanexistingbuild,orrebuildfromitsprofile. TheBuildfromprofilechoicemeansthatVMwareStudiorebuildstheVMfromits profileeachtimeyoubuildthevApp. ClicktheRemovebuttontodeleteaVMfromthevApp. ClicktheAddVMsbuttontoaddaVMtothisvApp. Description
Remove AddVMs
VMware, Inc.
91
Resources Tab
Table 114describestheconfigurationpropertiesavailableontheResourcestab. Table 11-4. Resources Tab Configuration Properties
Field VM List CPUShares MemoryShares ThepriorityforthisvirtualmachinerelativetootherswhennonreservedCPUisavailable. Thepriorityforthisvirtualmachinerelativetootherswhennonreservedmemoryisavailable. Description
Output Tab
Table 115describestheconfigurationpropertiesavailableontheOutputtab. Table 11-5. Output Tab Configuration Properties
Field Distribution Format FileName OutputFormat NameofthevAppfile.ThisnameisvisibletouserswhentheydownloadtheOVForOVA package. UseOVFformatfordeployingthisvApponanyVMwarePlatform. UseOVA(archive)formatforfasterdeploymentbystreamingthevApp. Application URL Configuration ApplicationURLVM WhenyouspecifiedtheApplicationURLforthisvApp,theVMsIPaddressissubstituted intothe${app.ip}variableintheURL.BecauseavAppcanhaveseveralVMs,youmust specifywhichoftheVMscomprisingthevAppwillhaveitsIPaddresssubstitutedintothe ${app.ip}variable.SelecttheVMtowhichthevAppsApplicationURLshouldpoint. Description
92
VMware, Inc.
OVF Properties Key Label Description Type DefaultValue MaximumLength Range ValueMap UserConfigurable ovf:type ovf:value ovf:qualifiers vmw:qualifiers KeytoOVFProperty. LabelforOVFProperty. DescriptionofOVFProperty. ListofOVFpropertytypessupportedbyStudio.ThesetypesareenforcedbyVMware vSphereduringdeployment. String,unsignedinteger,stringchoice,Booleanvalue,orIPaddressofthisproperty. Maximumlengththatcanbespecifiedforastringproperty. Lowandhighvaluesthatcanbespecifiedforanintegerproperty. Listofpossiblevaluesforastringchoiceproperty. Whethertopromptusertoallowchangingofproperty. EachPropertyelementinaProductSectionmustbeassignedanovf:typeattribute.Valid typeslooklikeCIMdatatypesandarelistedintheOVFspecification. Optionalattributeovf:valueprovidesadefaultvalueforaPropertyelement. Optionalattributeovf:qualifersspecifiesCIMtypequalifiersforaProperty,with multiplequalifiersseparatedbycommas. Optionalattributevmw:qualifersgivesVMwarespecificqualifiersforaProperty.
BuildSummaryprovidesdetailsofthebuildprofileconfigurationandEULAs. VerboseLogprovidesadetailedlogofthevAppvalidationbuild.
EachvAppbuildisstoredinthefilesystem.YoumightwanttodeleteoldervAppprofileswhentheyareno longerneeded.Todoso,selectanoldbuildinthePreviousBuildslistandclicktheDeletebutton.
VMware, Inc.
93
To import an existing vApp profile into VMware Studio 1 2 3 4 5 PlacethevAppbuildprofileonthehostwheretheWebbrowserruns. IntheVMwareStudioWebconsole,clickthevAppstabandclicktheImportProfilebutton. AdialogboxappearswhereyoumustenterthenameofthevApp.YoucanclicktheBrowsebuttonto findtheprofileonyourcomputer. ClickImportProfile.VMwareStudiocreatesanewvAppprofilebasedontheimportedbuildprofile,and addsittothelistofvApps. VMbuildprofilesthatarereferencedbythisvAppbuildprofilemustbeimportedintoVMwareStudio beforeyoucanbuildthisvApp.
94
VMware, Inc.
12
12
OutlineofVirtualApplianceBuildProcedureonpage 95 VMwareRecommendationsonpage 95
3 4 5
6 7
VMware Recommendations
Theremainingsectionsinthischaptergivesuggestionsorrecommendationsforchoicesyoumakeduringthe creationofavirtualapplianceorvApp.Somechoicesareatradeoffofportabilityfornewfunctionality.
VMware, Inc.
95
User Accounts
VMwarerecommendsthatyounotgiveawaytherootoradministratorpasswordforyourappliance.Youcan modifythefirstbootscripttorequestthattheendusersupplyacustomrootpasswordatdeploymenttime. Alternatively,youcancreateadditionaluseraccountsthathavenonrootprivileges,andinformcustomers aboutthoseaccountstoenforcelimitedaccesstothevirtualappliance.
Footprint Reduction
VMwarerecommendsbothmethodsofreducingthesizeofgeneratedVMs:redundantpackageelimination andunnecessaryfileremoval.SeeOperatingSystemFootprintReductiononpage 54
13
13
VMware, Inc.
97
-h -i
--help --instance
-I
--importvm
-m
--mkpkg
--nomap -n --newos
-o -p
--output --profile
-P -t
--profiletype --validateprofile
98
VMware, Inc.
Managing Builds
Foreverybuildofavirtualmachine,VMwareStudiomaintainsabuildinstancenumberandthelogsforthat build.Forexample,buildinstance1storeslogsinthefollowingdirectory:
/opt/vmware/www/build/1/status/
Thisdirectorycontainsthreeimportantlogfilesforeachbuild:
BuildlogsareaccessibleusingtheStudioWebconsoletotroubleshootbuildfailures.
Discovery Reports
ThestudioclicommandgeneratesseveralreportfilesduringVMdiscovery,whichareavailableinthe followingdirectory:
/opt/vmware/www/build/<VM-name>.<instance>/discover
Old Builds
VMwareStudiostoresandlogsallthevirtualmachinesthatitbuilds.Unneededbuildinstancesshouldbe removedandolderbuildinstancesshouldbearchivedawaytorecoverfreediskspaceforVMwareStudio. Youcanobtainalistofallbuildsbyrunningthiscommand:
studiocli --buildstatus
Youcanobtaininformationaboutaspecificbuildbyspecifyingitsprofileorinstancenumber:
studiocli --buildstatus --profile myVirtualMachine studiocli --buildstatus --instance profileABC.7
Todeletejustoneinstanceofabuild,runthefollowingcommand:
studiocli --deletebuild --instance profileABC.7 --verbose
Forexampleinthefollowingcommand,SLES11SP1isastringtodescribetheguestOS,andthepathtofile build_profile.xmlidentifiestheprofileonwhichthenewguestOSisbased.
studiocli --newos --osdesc "SLES 11 SP1" --profile /opt/vmware/etc/build/templates/suse/11/0_x86_64/build_profile.xml
Requirements
VMwareStudiocurrentlysupportsonlyRPMbasedandDEBbasedoperatingsystems.Thesesystemscanuse anunattendedinstallerthatmaybeinvokedremotelythroughthenetwork,suchasAnacondaforRHELand CentOS,PreseedforUbuntu,orAutoyastforSLES.
VMware, Inc.
99
Inbuild_profile.xml,herearesomeimportantfieldstoverifyorupdate:
<Section xsi:type="vadk:JEOSSection_Type">
<Section xsi:type="vadk:ApplicationSection_Type">
<vadk:OSPackages>Operatingsystempackages. <vadk:ApplicationPackages>Applicationsoftwarepackages.
<Section xsi:type="vadk:VAMISection_Type">
100
VMware, Inc.
Fedora 11 As an Example
AftercreatingFedora11basedonRHEL5.4template,sometouchupisnecessary.
studiocli --newos --osdesc Fedora 11 --profile /opt/vmware/etc/build/templates/redhat/5/4/build_profile.xml
Youcanspecifythe-soptionwithanX500likeparameterforsigning,soopenssldoesnothavetoaskfor thatinformationinteractively.Forexample:
signovf -p mail.pem -s '/C=US/ST=Some-State/O=AnyCompany/CN=Self-Signed' appliance.ovf
VMware, Inc.
101
102
VMware, Inc.
14
14
Thischapterexplainsthefollowingtopics:
YoucanuseanysuccessfulLinuxVMbuildtocreateanewLinuxVM.TheexistingVMfeaturecansavetime whenchangingtheapplicationmixofanappliance,orwhendevelopingabaseapplianceforuseasapattern.
Prerequisites
Beforeyoubegin,notethefollowingrequirements:
YoumusthaveeitheraLinuxbasedvirtualappliancepackagedasZIP,OVF,orOVAonthelocalhost,or apoweredoffLinuxVMonaremoteprovisioningengine,eitherESX/ESXiorvCenterServer. AfterexistingVMimport,youneedtheISOfileofacorrespondingLinuxOStobuildthenewVM. TheVMwareStudioprovisioningagentmustbeinstalledintheinputVMfordiscovery. IftheinputVMwasbuiltusingVMwareStudio2.1withthevadk:removeAgentPackageattributesetto false(itsdefaultvalue),thentheVMcontainstheprovisioningagent.TheWebconsolehasthissetting. OntheBuildSettingspagetheRemoveagentafterprovisioningcheckboxisnormallyunchecked,so leaveituncheckedwhenbuildinganinputVM. IftheinputVMwasnotbuiltwithVMwareStudio2.1,youmustinstalltheprovisioningagentmanually. Thepackagesvmware-studio-provagent_*_i386.rpmandvmware-studio-provagent_*_all.deb areavailablein/opt/vmware/www/provagentontheVMwareStudioappliance.Installthesepackages ontheinputVMbeforestartingthediscoveryandimportphases.
TheinputVMmustbepoweredoff,ifitresidesonaprovisioningengine,asstatedabove.
103
VMware, Inc.
How It Works
Withtheimportoption,studioclicommandcallstheimport.plscript,andwiththenameoption,itcalls theimport_helper.plscript.Bothimportscriptsareinthe/opt/vmware/share/builddirectoryonthe VMwareStudioappliance.
Discovering an Existing VM
DuringthediscoveryphaseyoutellVMwareStudiowheretofindanexistingVM.Animportprofileresults. To discover an existing VM and create an import profile 1 Loginasrootandrunstudiocliwiththeimport,name(newVMinthisexample),andverboseoptions.
studiocli --importvm --name newVM -v
WhenaskedforthesourceVMlocation,typealocalfilepathname,orviforremoteVI(vSphere)locator. Localpathnamemaybe/opt/vmware/www/build/<VM>/exports/ovf/VM_OVF10.ovf,forexample.
3 4 5 6 7
Whenaskedfortheremoteenginetype,youcantypeeitheresxorvcenter.Forremoteengineversion, youcanacceptthedefault4forvSphere4.x. Whenaskedforhost,typetheIPaddressorDNSnameoftheremoteprovisioningengine.Forport,accept thedefault443unlessitwaschanged. Givetheusername.ForESX/ESXi,acceptthedefaultroot.ForvCenterServer,typeAdministrator. Thentypetheuserloginpassword,twice. WhentheCLIdisplaysresourcepool,youcanacceptthedefault. IfyouselectedVI(vSphere)locator,thescriptsaystochooseanexistingVM.PressTabtwicetoshowthe VMlist.TypethenameofanexistingVMfromthelist. Theimportscriptreadsthesnapshotlistandallowsyoutochooseanoldsnapshot,ifpresent.Thenitasks fortheLinuxOSvendor,majorversion,andminorversion.Afterthis,youcanchangetheresourcepool, datastorename,andnetworkname.
RunstudioclitoconverttheimportprofileintoabuildprofilethatappearsintheWebconsoleVMList.
studiocli --importvm --name newVM2 --profile /root/importp2.xml -v
104
VMware, Inc.
PackagesforX11are:
vmware-open-vm-tools-xorg-drv-display_* vmware-open-vm-tools-xorg-drv-mouse_* vmware-open-vm-tools-xorg-utilities_*
6 7 8 9
VMware, Inc.
105
Existing VM Limitations
WhenyoubeginwithanexistingVMoranyqualifyingLinuxOSinsteadofwithasupportedOSdistribution, VMwareStudio2.1offersbenefitsandimposeslimitationsasfollows:
106
VMware, Inc.
Appendixes
VMware, Inc.
107
108
VMware, Inc.
RootObjectonpage 109 VAMIContaineronpage 109 VAMIContainerCallbacksonpage 110 VAMII/Oonpage 111 VAMILogonpage 112
Root Object
TherootobjectvamihasoveradozenmethodstonavigatewithinaWebcontainer,communicatewiththe LIGHTTPDWebserver,andloginformationfordebuggingpurposes.Toobtainthevamirootobjectwithin JavaScript,calltheparent:
var vami = parent.vami;
VAMI Container
Thefollowingfunctionscanbecalledontherootvamiobject.
vami.container.navigate
Requeststhatthecontainernavigatetoapage.Returnstrueifthecontainerisabletonavigate.
boolean navigate(String token)
vami.container.logout
Logsoutthecurrentuser.
void logout()
VMware, Inc.
109
vami.container.newHistoryItem
Addsanewbrowserhistoryitem.
void newHistoryItem(String historyToken)
vami.container.isLogin
Checkstoseeiftheuserisloggedin.Returnstrueiftheuserisstillloggedin.
public boolean isLogin()
vami.container.getUser
Getsthenameofuserwhoiscurrentlyloggedin.Returnstheusernameofthecurrentlogin.
public String getUser()
vami.container.getSessionID
ReturnsthecurrentsessionID,whichisusedforauthenticationwithPAMortocommunicatewithsfcbd.
public String getSessionID()
ExampletoauthenticateauserontheserversideusingPython:
# import required libraries import sys sys.path.append('/opt/vmware/lib/python/site-packages/') import pywbem # returns true if we are able to authenticate def authenticate(user, sessionid): try: # connect to cimom with username and sessionid, make CIM call cliconn = pywbem.WBEMConnection('http://localhost:5488', (user, sessionid)) cliconn.EnumerateInstanceNames('VAMI_ComputerSystem') return True except Exception, e: return False
vami.container.registerOnShowCallback
RegistersacallbackfunctionwiththecontainerforexecutionwhentheServiceisdisplayed.Thecallback functionyoupasswillthenreceivethetokenforthecurrentpage.
public void registerOnShowCallback(JavaScriptObject callback)
110
VMware, Inc.
vami.container.registerOnHideCallback
RegistersacallbackfunctionwiththecontainerforexecutionwhentheServiceishiddenandtheusermoves toanotherService.Thecallbackfunctionyoupasswillthenreceivethetokenforthepagetobenavigated.
public void registerOnHideCallback(JavaScriptObject callback)
vami.container.registerOnNavigateCallback
Registersacallbackfunctionwiththecontainerforexecutionwhenthecontainernavigatestothecurrent Service.Thecallbackfunctionyoupasswillthenreceivethetokentoindicatenavigation.
public void registerOnNavigateCallback(JavaScriptObject callback)
Exampletoregisteracallbackfunction:
function myOnNavigate(pendingToken){ alert(token); } vami.container.registerOnNavigateCallback(myOnNavigate);
VAMI I/O
TheVAMIWebcontainerprovidesavami.ioobjecttocommunicatewiththeLIGHTTPDWebserver.
vami.io.httpGet
MakeanHTTPGETrequestfortheprovidedURL,andfeedtheresulttothecallbackfunction.Becauseof SameOriginPolicy(SOP)restrictions,thisAPIcannotmakecallstoanyotherserverotherthantheserverfrom whichthispageisloaded.
public void httpGet(boolean authenticate, boolean blocking, String description, String url, JavaScriptObject callback)
Parameters:
Exampletorequestafile:
vami.io.httpGet(false, false, 'Get XML file', '/VAMI.xml', alert);
VMware, Inc.
111
ExampletorequestaJavaScriptObjectNotation(JSON)objectandparsethatobject:
function evaluateJSON(json){ eval(json); } vami.io.httpGet(false,false,'Get JSON Object','/RESTInterface',evaluateJSON);
vami.io.httpPost
MakeanHTTPPOSTrequestfortheprovidedURL,andfeedtheresulttothecallbackfunction.Becauseof SameOriginPolicy(SOP)restrictions,thisAPIcannotmakecallstoanyotherserverotherthantheserverfrom whichthispageisloaded.
httpPost public void httpPost(boolean authenticate, boolean blocking, String description, String url, String content, JavaScriptObject callback)
Parameters:
Exampletorequestacalltothesfcb:
var cimXML; //fill cimXML with the CIM XML that you want to post to CIMOM vami.io.httpPost(true,false,'Making CIMOM Call','/cimom', cimXML, evaluateJSON);
VAMI Log
ToenableloggingforavirtualmachineWebconsole,use<webconsoleurl>?log=info&logwindow=true. Thisshowsasmallvisiblewindowthatdisplaysallmessagesthatareloggedusingvami.logobject.Other optionsforthelogparameterarewarnanderror.
vami.log.info
Logsaninformationalmessage.
public void info(String message, JavaScriptException exception)
Parameters:
messageMessagestringtolog. exceptionJavaScriptexception.Optional.
vami.log.warn
Logsawarningmessage.
public void warn(String message, JavaScriptException exception)
Parameters:
messageMessagestringtolog. exceptionJavaScriptexception.Optional.
112
VMware, Inc.
vami.log.error
Logsanerrormessage.
public void error(String message, JavaScriptException exception)
Parameters:
messageMessagestringtolog. exceptionJavaScriptexception.Optional.
VMware, Inc.
113
114
VMware, Inc.
Thisappendixcontainsthefollowingsections:
LaunchtheOpenSSHdaemonbyrunningthenetstartcommand:
net start opensshd
Disableanyfirewall,orpreferably,createanexceptionintheWindowssystemfirewalltoavoidblocking theSSHconnectionwithVMwareStudio(bothTCPandUDPprotocolsonport22).
Summaryofoptions:
RunthefollowingcommandtodisplaythefingerprintoftheSSH2orRSAkeyfortheSSHserver:
/usr/bin/ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub
Summaryofoptions:
-lList(show)fingerprint. -f <infile>Usethespecifiedfileasthesourcefile.
6 7
116
VMware, Inc.
To confirm with Interactive SSH 1 UsingyourchoiceofSSHclient(forexamplePuTTY0.60),orthesshcommandonLinux,connecttothe IPaddresswithintheURLthatyounoteddowninStep 1.TheSSHclientpromptsyoutoacceptorreject thekeypresented(inthecaseofPuTTY,a2048bitRSAkeyoverSSHv2). ComparethisfingerprinttotheSSH2orRSAfingerprintyougeneratedinStep 4. Ifthefingerprintsmatch,acceptatrustrelationship.Youcanchoosetocacheyourdecisionpermanently, ratherthanforthisSSHsessiononly. TheSSHclientproceedswithsessioninitiation.AftertheVMwareStudiomessage,arootshellappears.
2 3 4
To confirm with SCP or SFTP 1 UsingyourchoiceofSCPclient(forexampleWinSCP4.x),orthescpcommandonLinux,connecttothe IPaddresswithintheURLthatyounoteddowninStep 1.TheSCPclientpromptsyoutoacceptorreject thekeypresented(inthecaseofWinSCP,a2048bitRSAkeyoverSSHv2). ComparethisfingerprinttotheSSH2orRSAfingerprintyougeneratedinStep 4. Ifthefingerprintsmatch,acceptatrustrelationship.Youcanchoosetocacheyourdecisionpermanently, ratherthanforthisSCPsessiononly. TheSCPclientproceedswithsessioninitiation.
2 3 4
VMware, Inc.
117
118
VMware, Inc.
ThisappendixcanhelpyoueditXMLbuildprofiles.Itcontainsthefollowingsections:
Introductiononpage 119 StructureofVMXMLBuildProfilesonpage 119 UsefulAttributesNotDisplayedintheVMwareStudioWebConsoleonpage 128 CustomizingtheFooterintheWebConsoleonpage 129 CreatingVirtualDisks,Partitions,andVirtualDevicesonpage 129 UnmountingCDROMorISOAfteraBuildonpage 131 ResourceAllocationSettingDataonpage 131 StructureofvAppXMLBuildProfilesonpage 132
Introduction
VMwareStudiocreatesabuildprofilethatdefinesavirtualmachine. TheXMLschemasforthebuildprofilesarelocatedinthe/opt/vmware/etc/build/schemasdirectory insideVMwareStudio.Itisnevernecessaryorrequiredtolookattheseschemasfortheconstructionofbuild profiles.VMwarerecommendsthatyouusetheVMwareStudioWebconsoletocreatebuildprofiles.Once created,youcaneditthebuildprofileandbuildorrebuildtheVMorvApp. TheVMwareStudioWebconsolesavesbuildprofilesinthefollowinglocationsforaVMandavApp:
/opt/vmware/var/lib/build/profiles/<VMprofileName>.xml /opt/vmware/var/lib/build/vapp_profiles/<vAppProfileName>.xml
VMwareStudioincludespreconfiguredbuildprofiletemplates,locatedinthefollowingdirectories:
/opt/vmware/etc/build/templates/<OS>/<release>/<version>/build_profile.xml /opt/vmware/etc/build/vapp_template/vapp_template.xml
BuildprofilesconformtoanearlyversionoftheOVF0.9draftspecifications.FormoreinformationaboutOVF, seehttp://www.vmware.com/appliances/learn/ovf.html.
VMware, Inc.
119
120
VMware, Inc.
VMware, Inc.
121
122
VMware, Inc.
VMware, Inc.
123
124
VMware, Inc.
VMware, Inc.
125
VADKPackages
DHCP Static,whichnecessitatestheitemsbelow.
//ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningSettings/vadk:NetworkType IPAddressthestaticIPaddresstobeusedforthevirtualmachineduringprovisioning. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningSettings/vadk:IP NetmaskThenetmasktobeusedforthevirtualmachineduringprovisioning.Anetmaskenables therecipientofIPpacketstodistinguishthenetworkIDandhostIDportionsoftheIPaddress. Netmasksnormallyareoftheformat255.x.x.x. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningSettings/vadk:Netmask GatewayTheIPAddressofthedesignatedgatewayforthisnetwork. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningSettings/vadk:Gateway PreferredDNSServer(Optional)TheprimaryDNSservertobeusedforthevirtualmachineduring provisioning.AnameserverisresponsibleformappingIPaddressestonames. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningSettings/vadk:DNS1 AlternateDNSServer(Optional)ThealternateDNSservertobeusedforthevirtualmachineduring provisioning.AnameserverisresponsibleformappingIPaddressestonames. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningSettings/vadk:DNS2 HostName (provisioningplatform) ThehostnameorIPaddressofthevirtualizationplatformyouuseforprovisioning. Notallinformationitemsarerequiredfordifferentplatforms.Forexample,onlyVMwareWorkstation needsthevmruncommand,andthebuilddirectorypathisneededonlyforhostedproducts. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningEngine/vadk:VmhostLan/@vadk:hostname
126
VMware, Inc.
VMware, Inc.
127
OnWindowsthiscouldbeC:\ProgramFiles\VMware\VMwareWorkstation. OnLinuxthiscouldbe/usr/bin.
//ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningEngine/vadk:VmhostLan/@vadk:vmrunPath VirtualizationPlatform TheVMwarevirtualizationplatformforprovisioningyourvirtualmachine.Adropdownmenu displaysachoiceofplatforms.Asyouselectdifferentplatforms,buildenvironmentsettingschange. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:ProvisioningEngine/vadk:VmhostProduct vadk:name=""> PreInstallShellScript Shellscriptthatyoucanmodify,whichrunsontheprovisionedVMbeforeinstallationofapplication packages.ItmayremoveunneededOSorapplicationpackages. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:PreInstallShellScript PostInstallShellScript Shellscriptthatyoucanmodify,whichrunsontheprovisionedVMafterinstallationofapplication packages.Itmaydeleteunnecessaryfiles. //ovf:Envelope/Section[@xsi:type='vadk:BuildSection_Type']/ vadk:PostInstallShellScript EVMScripts ForinstallationofanexistingVM,andforpreinstallationofthenewVMbasedonit. //ovf:Envelope/Section[@xsi:type='vadk:ExistingVMSection_Type']/ vadk:EVMInstallScript //ovf:Envelope/Section[@xsi:type='vadk:ExistingVMSection_Type']/ vadk:PreInstallScript
Asshownintheexample,thefooterHTMLmustbeXMLencoded.Ifitcontainsanyimages,makesurethat theimagesareaccessibletotheWebconsoleofyourvirtualappliance.
Anexampleofaharddrivelookslikethis:
<Item> <rasd:AddressOnParent>1</rasd:AddressOnParent> <rasd:Caption>Harddisk 1</rasd:Caption> <rasd:HostResource>/disk/newdisk</rasd:HostResource> <rasd:InstanceId>5</rasd:InstanceId> <rasd:Parent>4</rasd:Parent> <rasd:ResourceType>17</rasd:ResourceType> </Item>
VMware, Inc.
129
Partition ThissectiondefinesthepartitionsonthedisksspecifiedintheDisksection.Forexample:
/ovf:Envelope/Section[@xsi:type='vadk:DiskPartitionSection_Type'] ... <vadk:Partition vadk:mount="/newdisk" vadk:fs="ext3" vadk:bootable="0" vadk:diskId="newdisk" vadk:size="grow"/>
vadk:mountTheplacewherethediskappearsonthevirtualmachinesfilesystem.Thisfieldisignored forpartitionsmarkedswap. vadk:fsThetypeofpartitiontomake.Astandardfilesystemwillhavethevalueext3;theothervalid valueisswaptodefineaswappartitiontoextendthevirtualmemoryofthevirtualmachine. vadk:bootableWhetherthispartitionisbootableornot.Thisflagissetonlyintherootpartition (controller0,disk0)andonlyonthebootpartition. vadk:diskIdTheovf:diskIdintheDisksectiontowhichthispartitionrefers. vadk:sizeSizeofthepartition.Normally,eachnewdiskhasonlyonepartition,specifyingtheentire disk.Thisisspecifiedwiththewordgrowinthisattribute.Otherwise,avaluemaybeenteredherethat specifiesthesizeofthepartitioninMB.Agrowpartitionshouldbethelastpartitionspecifiedinthedisk.
130
VMware, Inc.
VMware, Inc.
131
132
VMware, Inc.
VMware, Inc.
133
134
VMware, Inc.
Troubleshooting
Thisappendixcontainstwosections:
VMwareStudiotimesoutwaitingforIPinformation fromtheprovisioningVMduringbuild.
Thiscouldbeapermissionsproblem.Whennetworkshares servefilesanddirectoriesownedbydifferentusers,remotebuild transfercanfail.Trybuildingtolocaldiskinsteadofbuildingto anetwork.share. Youmustuse64bithardwaretoprovisionavirtualmachine with64bitguestoperatingsystem.IftheCPUisanIntelorAMD processor,itmustbecapableofexecuting64bitinstructions. IntelprocessorsmusthaveVT(virtualizationtechnology,which IntelcpuiddocumentationalsocallstheVMXbit)enabled. SometimesthissettingisintheBIOS.
VMware, Inc.
135
AStudiobuildfailswiththismessage: Provisioning Agent: failed to run script .post.sh WhilebuildinganUbuntuVMyoumayseeoneof thesetwopostinstall.logerrormessages: W: Conflicting distribution: http://10.20.30.123 stable Release. WARNING: The following packages cannot be authenticated! UnabletobuildUbuntuvirtualmachinesthat containmorethan15virtualdisks.
TheUbuntuinstallerlimitsyoutocreatingnomorethan15disks duringOSinstallationprocess,andVMwareStudiofollowsthis restriction.Toaddmorethan15disks,addthemaftertheVMis builtbyVMwareStudio. UsethenumericIPaddresstoconnecttotheprovisioningengine orupdaterepositoryserver. Ensurethatifyouassignapartitionwithsize=growthatitisthe lastpartitiononthedisk. Thisproblemcanbecausedbynotchangingtheversionnumber fortheupdatepackage.Thepackagehasnewcontent,butthe versionnumberisthesameasapreviouspackage.Whenyou createanupdatepackage,changetheversionnumber. Theproblemcanalsooccuriftheapplicationpackagesareofthe sameversion,butdifferentchecksum
Youcanignorethiserrormessage.VMwareStudiooverwrites theOSpackagevmware.drv.sowithavalidvmware.drv.so duringthebuildprocess. Theworkaroundistodeletetheorphanedvirtualmachinefrom theinventoryusingthevSphereClientconnectedtovCenter. Nexttime,provisionthroughtheESX/ESXihostsmanaging vCenterServertoavoidthisproblem. ProvisioningthroughESXiwiththefreeESXilicenseproduces thiserrorbecausetherequiredESXcapabilitiesforprovisioning arenotavailable.TheESXievaluationlicense(whichexpiresina givenperiod)orapaidlicensewillsolvethisissue. Checkthattherearenonetworkingrelatedproblembyrunning sshfromtheStudioappliancetotheWorkstationhost. MakesureyouenteredavalidPathtovmruncommand.For instance,enter/usr/binnot/usr/bin/vmrunforLinux,or enterC:\ProgramFiles\VMware\VMwareWorkstationnot C:\ProgramFiles\VMware\VMwareWorkstation\vmrun.exe forWindows. IfthesymptomwasthatthetransientVMcouldnotbepowered on,orthattheVMwasnotseenontheWorkstationconsole, verifythattheuserenteredintheBuildSettings(forWorkstation provisioning)matchestheuserwhoiscurrentlyrunningthe Workstationconsoleonitshost.IfthehostisrunningaLinuxOS, alsoverifythatthevadk:wsXDisplayinthebuildprofile (default":0.0")matchesthecorrectXwindowsDISPLAY environmentvariable.
136
VMware, Inc.
Appendix D Troubleshooting
MakesuretogiveAdministrativeprivilegestotheuseronthe hostrunningVMwareServer.Thisisthesameuserthatyou specifiedintheSetupTabinVMwareServerSectionduring buildprofilecreation,forauthenticatingtoVMwareServerand remotelycontrollingVMprovisioningusingtheVIXprotocol. Onecauseisthatduringdiscovery,disksizeswerecalculatedtoo small.Becauseofroundingerrorswhenconvertingfromdisk cylinderstoMB,virtualdisksizeissometimescalculatedoneor twoMBsmallerthanneeded.Thesolutionistoincreasethesize ofthedisksinthegeneratedbuildprofiletobematchwhatis required.ThesizeisrepresentedinMBintheovf:capacity attributeofDiskelementsintheDiskSection_Typesection. //ovf:Envelope/Section[@xsi:type="ovf:DiskSection_ Type"]/Disk/@ovf:capacity
Thebuildfailswithamessagelikethis: STUDIOABORT:Error:Unabletoinstallpackage pkg-name Troubleshooting VM Power-On VMwareStudioappliancedoesnotgetanIPAddress assigned. Duringthefirstbootofavirtualmachine,thevirtual machinestopsrunningbeforereachingthelogin prompt.Restartingthevirtualmachineresultsinthe FirstBootScriptbeingskipped. ALinuxVMcreatedbyVMwareStudioinOVF format,whenimportedintoVMwareWorkstation withtheWorkstationConversionWizard,failsto bootwithakernelpanicerror.Alogfilemightsay thattheBuslogicSCSIadapterisnotsupported. WhenyouprovisiononWorkstationorServer1.0.x andchecktheRetainTransientVMoption,which callsthedebugCLIflag,thetransientVMleftafter thebuilddoesnotbootupmanually.TheVMstarts, andtheprovisioningagentshowssignsofexecuting, buttheVMsoonpowersdownsoyoueffectively cannotdoanythingwithit. AfterprovisioningthetransientVMgoesoffline, looksforthepostOSinstallationlogfile,butdoesnot findit,sothebuildfails. AfteryousetanappliancetouseastaticIPaddress, itsIPaddressmightreverttotheDHCPsettingthat itusedpreviously.
ToworkaroundthisknownissueintheVMwareConverter versionthatsupportstheWorkstationConversionWizard,edit the.vmxfileoftheVMthattheConversionWizardcreated. Replacebuslogicwithlsilogiconthescsi0.virtualDev line,andpowerontheVM. Thecauseisthattheprovstart.isoimageisrequestedbutnot availabletothetransientVM,sotheprovisioningagentcannot executescriptsintheprovstart.isoimageatboottime.A workaroundistoreconfiguretheVMsoitsCDROMconnectsto thephysicaldriveinsteadofprovstart.iso,rebuildandreboot theVM.Iftheprovisioningagentdoesnotseeprovstart.iso, theVMwillbootandfunctionasyouexpect. Thecausecouldbeatemporarylossofnetworkconnectivity,or slowserverresponse.Runthebuildagain. Onecauseispersistenceofthedhclientprocess,whichcould changethenetworksettingswhenitsDHCPleaseexpires. Thesolutionistologintotheapplianceasroot,killthedhclient process,andrunthe/etc/rc.d/networkrestartcommandto resetnetworking.
VMware, Inc.
137
138
VMware, Inc.
Appendix D Troubleshooting
Resolution
Youhaveachoiceoftwoworkarounds:
RestartEclipse.
VMware, Inc.
139
140
VMware, Inc.
Index
Numerics
32-bit operating systems 34, 76 64-bit requirements 20, 28, 135
A
application install on Windows 76, 84 application package repositories 49 DEB or RPM format 49 location of appliancePackages 35 mkpkg command 49, 53 specification order 35 winrepo package depot for Windows 84 audience 9, 18 developers building vApps 18, 89 ISVs shipping virtual appliances 18, 95 Linux and Eclipse developers 18, 33, 69 release build automation 18, 97 Windows developers 18, 75
digital signatures for updates 64 digital signing of OVF files 101 discovering and importing a VM 104 discovery reports for a VM 99 disk partitioning for system and user 96 disk size and partitioning, virtual 39
E
Eclipse plugin 17, 69 download and install 69 management services 71 packaging applications 70 proxy for network access 69 requirements for 69 troubleshooting 139 uninstalling 72 ESX/ESXi platform support 19, 28 EULA localization and customization 38, 64, 120 existing VM as input 103
B
build profile building a Linux VM 35, 46 building a Windows VM 76, 80 debugging build summary and logs 46, 80 migrating from earlier versions 47 procedure to build a vApp 27, 89, 93 XML structure and syntax 119 build system in VMware Studio 17
F
field updates, See updates to virtual appliances footprint reduction, packages and files 54
G
guest operating system support 34, 76
I
ISO image of operating system 28 for Linux 34 for Windows 76 network access with NFS 28
C
CIMOM (CIM object manager) 41, 55 command-line options reference 97 Common Information Model (CIM) 16, 55, 105 CPU and memory, virtual 38 creating DEB or RPM packages 50
L
Linux kernel extensions, adding 96
D
DEB package creation 50, 52 debugging by watching build provisioning 46, 80 with build summary and logs 46, 80, 99 with vamisupport script 66, 138 deploying VMware Studio from OVF or OVA 21 from ZIP 22 multiple hosts and single host 21
M
management service, creating and importing 57 migrating build profiles from earlier versions 47 mkpkg command options 50
N
network settings proxy through firewall 23, 25 static IP or DHCP 22, 23, 25 new OS support with studiocli command 99 NFS mount on VMware Studio appliance 28
VMware, Inc.
141
O
old builds, removing 99 open-source VMware Tools 47 operating system image, See ISO image of OS OSP file format for VMware Tools 47 OVF and OVA distribution formats 21, 28, 96 OVF standard (DMTF DSP0243) 13
P
ports to open for VMware Studio 20 prerequisites for running VMware Studio 19 privileges for provisioning on vCenter Server and ESX/ESXi 29 on VirtualCenter and ESX/ESXi 30 product key for Microsoft Windows 78 ProductRID 42, 63, 67 provisioning agent for existing VM 105
generating (building) an update 62 publishing updates 64 reboot requirement 64 retrieving an update 62 staging server and production server 62 testing your updates 66 VMware vCenter Update Manager 67 web delivery of updates 63 XML description of repository 67 ZIP archive for updates 65 user privileges, See privileges for provisioning
V
vamisupport script 66, 138 vanilla (VAMI reduced) VM 58 vaos_init.sh initialization script 58 vApp build and deliver workflow 14 definition 13 requirements and components 89 VendorUUID 42, 63, 67 virtual appliance best practices for development 95 definition 14 updates from update repository 61 Virtual Appliance Management Infrastructure (VAMI) 16, 55 APIs for container, I/O, and log 109 components including CIM 56 creating a management service 57 importing a management service 58 service.xml description 57 services for system, network, update 56 view.xml description 57 virtual hardware version, choosing 96 VirtualApp, vApp managed object 13 VMware Ready program 37, 96 VMware Studio features and architecture 15 ports to open 20 requirements to run 19 storage needed 20 troubleshooting 135 VMware Tools in generated appliances 47 VMware vCenter Update Manager 18, 67 VMware virtualization platforms 21 ESX/ESXi 28 Player 28 VMware Infrastructure 3 21, 28 VMware Server 21, 28 VMware vSphere 4 21, 28 Workstation 21, 28
Q
qualifying Linux distributions 34
R
reboot the VMware Studio appliance 24 removing old builds 99 requirements for running VMware Studio 19 roadmap for reading this manual 18 RPM package creation 51, 52
S
security of root account on Linux 96 security of self-signed SSL certificate 22, 116 shut down the VMware Studio appliance 24 signovf for digital signature of OVF 101 size (footprint) reduction scripts 35 SSH, installing on Windows hosts 115 storage needed for VMware Studio 20 studiocli command options 97
T
technical support resources 10 testing a generated appliance 46, 80 time zone 22 changing to local 24 for a generated Windows VM 78 troubleshooting the Eclipse plugin 139 troubleshooting VMware Studio 135
U
unmounting CDROM after a build 131 Update Manager, VMware vCenter 18, 67 updates to virtual appliances 61 CDROM delivery of updates 63 creating updates 61
142
VMware, Inc.
Index
W
Web API for management services, VAMI 109 Web console for VMware Studio 16, 24, 33, 75 Application tab 40, 79 Build Settings tab 44 Description tab 37 Hardware tab 38 Management tab 41 OS tab 39, 77 Output tab 43 Windows application packaging 76 error and exit codes 84, 85 InstallShield 83 JScript support 84 library create package 84 LOGDIR environment variable 85 Microsoft installer (MSI) 83, 84 PACKAGEDIR environment variable 85 REPOSITORY environment variable 85 VMware Studio package (VSP) 83 winrepo package depot 84 workflow to build and deliver vApps 14
X
XML build profile, structure and syntax 119 XML format for update repository 67
Z
ZIP distribution format 21, 28, 43, 65
VMware, Inc.
143
144
VMware, Inc.