ESXi

How to clone a virtual machine on VMware ESXi

Once you have established SSH connection to the server, you need to create a directory for the virtual machine you want to create in the Data Store, which should be here: “/vmfs/volumes/datastore1 /”.>

Type the following command
: mkdir /vmfs/volumes/datastore1 /<name on your new VM>
We will now use vmkfstools to clone our virtual machine. In the example below, we show how to clone a Windows 2003 Server 32-bit, in our file structure.

/Vmfs/volumes/49be35b9-b234a901-5406-002219b69217 # /sbin/vmkfstools-i “/ vmfs/volumes/49be35b9-b234a901-5406-002219b69217/Windows-2003-32-bit/WindowsServer-2003 Serverx32.vmdk” ” /vmfs/volumes/datastore1/namn on the system’s directory/name of systemet.vmdk ” Disk Cloning
Clone: 100% done.
 
The virtual machine should now be cloned. All that remains now are two simple steps.
1st > Sign in with VMware vSphere client and select <Make a new VM on this server>.
2nd > Select “Custom” and then when you get to choose disk when the VM is created, you browse the data store and select the newly named vmdk file.

Enable SSH for ESXi

By default SSH is not enabled in ESXi. Follow the steps below to enable it

  1. At the ESXi console, press alt+F1
  2. Type: unsupported
  3. Enter the root password
  4. At the prompt type “vi /etc/inetd.conf
  5. Look for the line that starts with “#ssh”
  6. Remove the “#”
  7. Save “/etc/inetd.conf” by typing “:wq!” or “ZZ
  8. Restart the management service “/sbin/services.sh restart” or reboot the host