7 Replies Latest reply on May 11, 2017 6:30 AM by spankedurmom

    How to instal vim-cmd and vmkfstools in my linux machine ?

    xmac123 Lurker

      Hi

      I have a script which converts a .iso to a vm image.

      The script makes use of vmkfstools and vim-cmd commands .

      When I execute the script in my linux machine, I get an error

      -bash: vmkfstools: command not found

      and

      -bash: vim-cmd: command not found

       

      So now I need to install these two commands.

      I tried searching over google and looks like it is not much documented.

      Please help on how to install these tools in my linux command line.

       

      Thank you

      Mac

        • 1. Re: How to instal vim-cmd and vmkfstools in my linux machine ?
          Marcelo Soares Virtuoso

          Have you created this script on an ESXi shell? Does it work there?

          • 2. Re: How to instal vim-cmd and vmkfstools in my linux machine ?
            Abhilashhb Virtuoso
            vExpertVMware Employees

            Hi,

             

            vim-cmd and vmkfstools are ESXi commandline which are used to modify certain parameters on ESXi using command line. You cannot install them on Linux machine. It does not make sense. And i have been following your previous thread. You need to first install this ISO file on a VM and then take the OVA package of that VM. What is this ISO you talk about? Is it an OS ISO image?

            ------------------------------------------------------------------------------------------------------------------------------------
            If you find this or any other answer useful please mark the answer as correct or helpful.
            Abhilash HB
            | Blog : http://vpirate.in | Twitter : @abhilashhb |

            • 3. Re: How to instal vim-cmd and vmkfstools in my linux machine ?
              xmac123 Lurker

              HI,

              I have not tried the script in a ESXi shell. I have only tried with a linux machine anticipating it might work there.

              Abhilash, This ISO is a webserver app built on top of linux kernel. we have this iso image, but we need to convert into ova file.

              I will try your suggestions and come back.

              • 4. Re: How to instal vim-cmd and vmkfstools in my linux machine ?
                Marcelo Soares Virtuoso

                As Abilash said, vmkfstools and vim-cmd are tools exclusively for ESXi. You will not be able to run in on any other OS - unless remotely, using vSphere CLI or vMA.

                • 5. Re: How to instal vim-cmd and vmkfstools in my linux machine ?
                  Abhilashhb Virtuoso
                  vExpertVMware Employees

                  OK now create a VM, Install that linux OS onto it. And then export that VM as a OVA/OVF package. Do you have an ESXi server to put this VM on? If not download VMware workstation and do it. Let me know if you need any help regarding that.

                  ------------------------------------------------------------------------------------------------------------------------------------
                  If you find this or any other answer useful please mark the answer as correct or helpful.
                  Abhilash HB
                  | Blog : http://vpirate.in | Twitter : @abhilashhb |

                  • 6. Re: How to instal vim-cmd and vmkfstools in my linux machine ?
                    AmrithaJayadev Lurker

                    Hi,

                    I am using vSphere CLI 6.0 and I am facing the same issue. I cannot find vim-cmd installed by default. I have vmkfstools though.

                    • 7. Re: How to instal vim-cmd and vmkfstools in my linux machine ?
                      spankedurmom Lurker

                      I know this is an old post but I had to do this recently and figured I would share some information with the community.

                       

                      We needed to come up with a solution to rebuild hundreds of systems in an aging environment.  The

                      environment does not have a PXE server or DHCP server and we were going to install them either.

                      The solution we came up with is briefly detailed below.

                       

                      1.  Create a VM.

                                Give it the desired hardware and settings.

                                Attach an iso image located on a datastore to the VM.

                      2.  Export the VM from step 1 as an OVF templatel.

                                Choose the option to include attached images with the OVF template.

                      3.   install the ovftool from the bundle file provided by VMware on a file server.

                      4.  Create an Autoyast template on the file server.

                      5.  Copy the contents of the SLES install DVD to directory on the file server.

                      5.  Create SLES repositories on the file server.

                      6.  Create a mini iso and copy its contents to a directory on the file server.

                      7.  Write a script that accepts options to set parameters for the VM like hostname, IP, CPU's,  RAM, etc.

                           The script should be able to use the supplied options to:

                                Create an Autoyast profile for the VM.  (Profile can be stored on the server or added to the iso)

                                Create a mini iso with a modified boot line giving the VM:

                                      The correct IP address

                                      The URL to the location of the install DVD on the file server.

                                      The URL to the Autoyast profile to use if you did not include it with the iso image.

                                Create a new OVF template for the VM with the created iso being included with the template.

                                Use the ovftool to deploy the created OVF template to vCenter and power it on

                       

                      Notes:

                      We make copies of the disk files from the OVF that was exported in step 2 to use as the disks for new OVF templates.

                      The files are small because the disks are blank so the templates we create are 60MB which is the size of the iso.

                      The iso needs to be created before the ovf so you can replace size parameter with the output of $(du -b <isofile>).

                      The total time to create, deploy, and power on the templates is about 15 seconds.  When the OVF is powered on it

                      boots from the iso, then uses the network settings provided by the iso to download the Autoyast profile from our file

                      server.  The autoyast profile defines the repositories to use as installation sources and also holds all of the configuration

                      settings for the VM.  When the installation is complete the VM reboots into the new operating system on the hard disk.

                      One of the rpms we install contains a startup script that registers the system with our patch server, makes sure the system

                      is fully patched, configures some additional settings that cannot be set with Autoyast, and creates a Nagios configuration file for

                      the VM and uploads the Nagios config to our monitoring server.  When these things have been done it unistalls itself and exits.

                       

                      Hopefully this will be of use to someone.