9 Replies Latest reply on Aug 9, 2013 11:48 AM by joelcbennett

    Adding individual hosted virtual machines

    Master
      I think I understand this process, but it is so insanely tedious and awful that I'm hoping that I'm missing something...

      I manage a very large VMWare enviornment with multple clusters and numerous physical hosts.  The nature of our environment requires us to patch systems on a very tight schedule and we have to carefully specify what systems get patched when.  A patching cycle for us is a fairly manual process and uses dozens of separate machine groups and schedules.  As a result of all of this we have to add VMs to machine groups individually instead of just selecting all VMs under a specific Virtual Center.  So what I am doing is running a PowerCLI command to find out what physial host my VM is currently sitting on, going in to the Hosted Virtual Machines tab in the Machine Group, selecting the Virtual Center that the physical host is part of, and then scrolling through the list of hosts to find that physical host, expanding it and finding my VM and finally adding the VM to the group.  If this was just a few VMs this would be fine, but I am having to do this for hundreds of VMs every patching cycle!  I don't understand why the physical host comes in to this at all?  From what I can tell Shavlik only tracks the Virtual Center's name and doesn't do anything with the physical host when I add the VM to the machine group.  I can setup my machine group then VMotion all of the VMs to different physical hosts and Shavlik is still able to snapshot and patch the VMs without issue.

      Am I missing something here?  Is there a better way of dealing with this?

      Thanks
        • 1. Re: Adding individual hosted virtual machines
          Master
          Are you patching the VM's offline or while powered on? If they are powered on when patching them you can use the other methods in Protect to add the VM's into a machine group (i.e. by IP addresses, machine names, etc.). Powered off VM's and templates require that they are added under the "Hosted Virtual Machines" tab. Unfortunately with such a large virtual environment you may need to go through the list as you described to add the VM's into the machine group if you're on the hosted VM's tab.
          • 2. Re: Adding individual hosted virtual machines
            Master
            The machines are powered on.  I understand that I can add them by other mechanisms, but if I use any other mechanism I appear to be unable to then take advantage of the snapshot before patching options in the deployment template.  In other words, if I create a new machine group and add a virtual machine it by hostname or similar and then deploy patches using a deployment template with snapshotting enabled the VM is not snapshotted.  If, however, I do the same thing but by going through the painful process I described in my above post the VM is snapshotted prior to patching.  Is there some other mechanism of forcing Shavlik to snapshot?

            Don't suppose I could get some sort of documentation on how Shavlik stores it's hosted VMs in the database?  If I had a clear understanding of what all occurs in the DB when you create a new machine group and add hosted VMs to it then I could probably create a Powershell script to do this outside of the Shavlik interface.

            Also, any chance of getting a feature request added to remove the Physical Host level of the hosted virtual machines and instead have Shavlik just display the VMs (perferably with a search)?  Even better would be the ability to add VMs from a list file like you can with regular physical machines.  Hopefully now that VMWare owns this product VMs won't be treated in such a bizarre and second class manner.

            Thanks!

            • 3. Re: Adding individual hosted virtual machines
              Master

              I think that right now you're basically hitting limitations of what Protect can do in how you would like to use it. I do apologize for that, but we are continuing to improve features with every release. For the time being we are still using this site for any feature requests that you would like to submit: http://shavlik.featureidea.com. Please feel free to submit any feature you would like to see added or changed.

              The way that we currently perform the snapshot actually just creates and stores it on the host server so it's not in our database or stored on the Protect server.

              I hope this helps!

              • 4. Re: Adding individual hosted virtual machines
                Master
                Understood, and thanks for the support.  I created a PowerCLI script yesterday that takes a machine group as input and then connects to the Shavlik database, queries all hosts that are part of the specified machine group, uses WMI to determine which hosts are VMs, and then snapshots them.  It is not as efficient as just having Shavlik perform the snapshot immediately prior to patching, but it will get the job done for now.
                • 5. Re: Adding individual hosted virtual machines
                  Master
                  I may miss a few things as I don't handle VMs myself (jsut using the one provided by another team), but won't you be able to achieve what you need by considering it the other way?

                  What I mean is:
                  1. create a custom deployment template for those VM
                  2. use the "Custom Actions" tab
                  3. add a new action with the following settings:
                  • All deployements using this template
                  • Before any patches / After all patches / After reboot (choose the most appropraite)
                  • <command line to run a script that do what you want to do>
                  My 2 cents.

                  Loïk
                  • 6. Re: Adding individual hosted virtual machines
                    Master
                    Well the question is what would the script to execute be and where would it live?  The script would need to run on a box that has PowerCLI installed and it would need to know the hostname of the machine that is currently being considered for patching so that it could verify if the machine was a VM and snapshot it.  I was unable to find a way of accomplishing this from the custom actions settings in the deployment templates.

                    If there is any interest from other Shavlik users this is a link to my workaround script:

                    http://www.dairysteer.com/2011/12/20/creating-snapshots-prior-to-patching-with-shavlik/
                    • 7. Re: Adding individual hosted virtual machines
                      Master
                      I usually use OU group to manage dynamic sets of machines but it may not be suitable to your environment.

                      On my side the environment is a small one (100- servers and 1000- workstations) and is really easy to keep it structured which explain that I'm alway able to use this tool in a way that comply with my needs.

                      I think I won't be able to help you more on this topic.
                      • 8. Re: Adding individual hosted virtual machines
                        Master
                        But OUs are not an option for hosted virtual machines.  When dealing with physical systems Shavlik has a variety of mechanisms for populating the machine groups and is quite excellent.  I don't understand why these options do not exist for hosted virtual machines so you are stuck with either selecting absolutely everything (in which case, why not just use WSUS?) or going throug the very painful process of selecting each system one at a time by Physical Host.

                        I'm hoping that this is something that VMWare fixes quickly...
                        • 9. Re: Adding individual hosted virtual machines
                          Rookie

                          Yes, totally agree.  The way it forces you to carve out the VMs in the console create hefty administrative overhead.  I submitted a feature request this morning in regards to this topic.