VMware Cloud Community
demhyt
Contributor
Contributor

Install SQL Server after clone VM

Hi All,

I have a little trouble here, I create workflow for automation deploy vm from template.. I'm using sysprep template and join domain everything working fine..I just confuse how to install SQL server / oracle / any application in vm after those clone process done...Because I have user which use many different applications, I want to automate that so it's will reduce my time for deploy new vm Smiley Happy...I have a step by step but maybe you can give me advice if my step is wrong or you have another method

1. Clone VM using customization (sysprep)

2. After clone done, mount iso to VM

3. Execute sql installlation using powershell from powershell host

4. Restart vm

That's my thought about step by step sql installation but I'm not powershell guru or maybe orchestrator have another way about this?...I'm not using template which have sql server installed on them, only windows template without any application installed...Thank you very much

0 Kudos
10 Replies
tschoergez
Leadership
Leadership

Hi,

here is an example how to mount an iso file http://manuelpaeth.blogspot.de/2013/06/vcenter-orchestrator-mount-iso-image.html

And have a look at this package Guest script manager package , the tutorial Leveraging the Guest Script Manager package

It allows you to call scripts within the guest operating system via vmware tools. So there is no need to use the powershell plugin (and configure it for each new VM that you deploy).

With that it should be quite straight forward to run the installation command.

Cheers,

Joerg

demhyt
Contributor
Contributor

Hi tschorgez,

I already success mount ISO..but I'm little confuse about how to install application from ISO files...

0 Kudos
mcfadyenj
Hot Shot
Hot Shot

You would be better off putting the ISO content on a fileshare as MSI which is the predominate installation source in this case will always set source pointers back to the original source media. Therefore installing from that ISO that is mounted will set the MSI sources to the ISO. This in turn means you will always need the ISO mounted for access to MSI related functions.

As such any self healing operations from the MSI's will then request that you insert your source media again. You can override this functionality with the [SourceList] property for an MSI. However in the case of SQL there is about 20 MSI's which are all bootstrapped with the setup.exe file.

By using a UNC share for the source your workstation / server will be able to access the source media directly supporting that functionality better.

you next step would be to create the unattended.ini file for SQL. Depending on the version SQL you are using will depend on how you create that. From 2008 onwards which I will assume you are using the very last page of a manual installation sequence will make reference to an ini file that can be used to replay the installation of the solution you just implemented on another machine.

I believe the commandline from memory will be something along the lines of

setup.exe /configurationFile <path to ini file>

you will need to use this command line in the guest script manager as indicated by the previous poster.


0 Kudos
demhyt
Contributor
Contributor

Hi All,

I success create workflow for automated install sql server....I use execute command in guest for SQL silent install and it's work smoothly...thank you very much for all of your suggestion

0 Kudos
AEsansun2
Enthusiast
Enthusiast

Maybe you can share your success.

I get this in my log when i try to run it

[2014-09-22 16:57:05.025] [I] Program running (vm=xx; cmd='"c:\windows\system32\cmd.exe" /c  U:\Software\Microsoft\SQL2014Dev\Setup.exe -q  /ConfigurationFile="U:\Software\Microsoft\SQL2014Dev\ConfigurationFile.ini" '; pid=664; timeout=950; interval=1)

[2014-09-22 16:57:06.410] [I] Program running (vm=xx; cmd='"c:\windows\system32\cmd.exe" /c  U:\Software\Microsoft\SQL2014Dev\Setup.exe -q  /ConfigurationFile="U:\Software\Microsoft\SQL2014Dev\ConfigurationFile.ini" '; pid=664; timeout=950; interval=1)

[2014-09-22 16:57:06.429] [I] Program finished (vm=xx; cmd='"c:\windows\system32\cmd.exe" /c  U:\Software\Microsoft\SQL2014Dev\Setup.exe -q  /ConfigurationFile="U:\Software\Microsoft\SQL2014Dev\ConfigurationFile.ini" '; pid=664; timeout=950; interval=1) (ExitCode=1)

when i copy and paste the same command in the vm , it runs fine.

really wierd.. any ideas ?

0 Kudos
Burke-
VMware Employee
VMware Employee

First thing that comes to mind is: "Did you disable UAC"? What could be happening is the OS may be waiting for confirmation for User Access Control...

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
0 Kudos
AEsansun2
Enthusiast
Enthusiast

Thank you for responding and trying to help.

Yes, UAC has been disabled. .

Let me know if you have any other suggestions.

0 Kudos
AEsansun2
Enthusiast
Enthusiast

here is how i solved. it.

i run a copy from the network drive to a local drive of the sqlcd

and then i execute the setup via vco and it works.

seems to be that you can't install off network drive via VCO.

0 Kudos
demhyt
Contributor
Contributor

Thats great...so you can't install using unc path?....why you not place iso to datastore and mount that?....

0 Kudos
AEsansun2
Enthusiast
Enthusiast

actually, you gave me the idea and it worked !!

i was first mapping a drive and then using the drive letter to execute.

so i switched it to use \\UNC and it works !

0 Kudos