ls VM-Main, in its turn, provides the VM-Main content.Next, deploy the ls VM-Second command to acquire the VM-Second directory content.Just wait a bit until the command works out. Copy files from the source directory (VM-Main) to the target one (VM-Second) with the cp command.Īfter executing the cp command, the console won’t respond for a while.Afterward, execute the ls command to check the VM directory content.Next, use cd to move into to the recently created VM directory.This time, it serves for verifying a new directory creation. Now, I use this command to create a directory where VM files will be copied. To create a new folder with the specified name, enter mkdir.This command provides you with the directory content. Here, I navigate to the Datastore-f directory. In my case, there will be only one datastore listed: Datastore-f. To obtain the list of datastores, execute ls -lh vmfs/volumes.In my case, there is only VM-Main listed. To get the list of all registered VMs, execute vim-cmd vmsvc/getallvms.Just like in the previous part, you need to access the host using the root credentials first: The numbers in the text refer the number of the step in the screenshots.
I do not want the entire thing to appear kinda of a black box, so I briefly explain what each command actually does. In order to enable it, navigate via a web browser to the Services tab, select SSH, and press the Start button:īelow, I’ve provided several screenshots of the deployed commands. Click Power on to boot it:īy default, SSH is disabled on an ESXi host. For that purpose, go to Actions and press the appropriate button:
Well, that’s it! Settings say that the target VM uses the right *.vmdk file, so the source VM has been cloned:Įventually, rename the target VM before starting. PLEASE, NEVER REGISTER THE VM AND DON’T START IT UNTIL THE DISK IS COPIED, OTHERWISE YOU WON’T BE ABLE TO START IT!Īfterward, go to Edit Setting and check whether the recently copied *.vmdk is assigned to the target VM: How long will it take? Well, it depends on your hardware and virtual disk volume. Even if you clone the VM within the datastore, you should better have a break as that process may take a while. Please note that cloning always takes some time. You can check whether copying is over in Recent Tasks (the task must have the Completed successfully status). Next, click Datastore browser to find the disk itself:Ĭopy *.vmdk and *.vmx files from the source VM directory. In particular, find out where the source VM disk is located. In my case, there is only one VM (VM-Main), running on the host so I’ll clone it: Navigate to the Virtual Machines menu and select the VM you need to clone. You’ll need just a web browser and several clicks to have the job done.įirst, type your credentials and access the VMware ESXi server: Thanks to the familiar GUI, this is the easiest way to copy VM if VMware vCenter is unavailable. So, either consolidate them or get rid of them. Hey, where are the snapshots? VMware does not recommend cloning VMs with snapshots.
Eventually, the virtual disks are assigned to the target VM, and the clone gets registered and booted up. Next, the source *.vmdk and *.vmx files or disks are copied to the target’s folder. The gist of cloning a source VM in case something happened to your vCenter is creating a target VM with just the same resources assigned to it as the source VM has. I believe this to be essential for understanding what’s exactly going on in my article. Nothing more than that! Let’s break the cloning process without vCenter in detailīefore I go deeper, I want you to understand the stages that cloning process consists of. Just think through them and learn the right commands if needed. In fact, all operations you usually carry out in your environment via GUI can be performed with either the vSphere Web Client or PowerShell commands. You can view this scribbling as a thing about not only cloning VMs without vCenter but also as a principle in the wide sense. Today, I’ll discuss three workarounds allowing you to clone VMs when running unmanaged ESXi: This is usually done in vCenter but there are several other ways you can go if it becomes unavailable. Great and simple thing allowing you to deploy many identical virtual machines to a group – no need to repeat the same process all over again. One of them is virtual machine cloning provided by VMware vCenter Server. There are various tricks and hints we all use to make our daily system administration routines easier.