You need to implement a standard supported infrastructure to achieve what you want, otherwise you are going to create a bundle of hacks.
If your VM needs to run 24/7, what have you done to cater for hardware failure? This isn't just a situation of "I need to make a backup copy", it should also be "I need to cater for maximum uptime".
A full VMware kit, two hosts, shared storage, HA etc will cater for all of this. Hell, you might even be able to use VMware's Fault Tolerance feature which would permit hardware failure without skipping a beat.
If you were to implement a correct infrastructure, you could then utilise products such as Veeam Backup. This and similar products backup from the outside while the VM is running with no interruption.
If you want to just ensure you have backup copies (which you could restore elsewhere) and have a tight budget, might I recommend Veeam Endpoint Backup which is free. Install this into the VM and backup to an external device like a NAS. You could restore back onto another machine. This isn't as elegant, but there is obviously a significant difference in price here.
Last note - if you are going to design and implement a redundant infrastructure, PLEASE use a certified VMware Reseller who has certified VMware Engineers. Don't use someone who hasn't been trained as they (in my experience) will implement single points of failure (ie: two servers, shared storage and ONE SWITCH).
This question is too broad. Just like there's a million ways to back up any computer there's a million ways to back up a VM.
A basic, yet highly inefficient method would be to just take a snapshot of the VM and export it. VMWare workstation allows this and there are CLI tools to automate this. – qasdfdsaq – 2015-08-12T10:13:53.577
If I had asked how to backup a VM, maybe I would agree. But I asked how to backup while the VM is running. And this isn't trivial and simple as you suggest. But if you think there are a million ways to do this, I would be happy to accept your answer where you demonstrate just one way – nixda – 2015-08-12T11:10:01.077
The whole point of snapshots is that you can do it while the VM is running. You can even snapshot the RAM and running OS so it doesn't even have to boot up when you restore the snapshot. As for the million other ways: just google "How to backup PC". Any method that applies to a normal computer can be used from inside a VM - backing up the host VM image is not always the most effective method after all. – qasdfdsaq – 2015-08-12T12:34:00.770
2
Please, if you find this question too broad, then vote to close. I wouldn't mind. For all others: This method uses
– nixda – 2015-08-12T13:57:39.117vmware-cmd
utility to create snapshots, save them, copy them and delete the old snapshot. I'm willing to write a PowerShell script to automate this. But aren't there other more elegant ways to hot clone a running VM from outside?If you really must run 24/7 then workstation is not really the tool for that. – albal – 2015-08-12T13:58:24.880
@albal What would you recommend instead? We already discussed to buy VMWare ESXi Hypervisor but the client asked to demonstrate hot cloning at first. I thought that would be possible with Windows 7+Workstation, but apparently not if you say so. – nixda – 2015-08-12T14:17:54.960
BTW "that method" from your original post runs from the service console. That only exists in ESX and not ESXi. That product has been deprecated many years ago, although the technique is still valid. The issue you will have is easily creating a live clone of the base disk (due to the size). Backup products like Veeam will certainly make that a whole lot easier by backing up only the blocks which have changed. – David Moylan – 2015-08-12T15:03:04.820