Posts Tagged vmware

Installing vSphere Replication from Linux CLI

tested with VCSA 6.1 and vSphere replication 6.1.1. OVF Tool 4.2.0 is installed on a Debian Jessy machine.

ovftool --acceptAllEulas -ds=datastore1 \
-n=<VMname> --ipAllocationPolicy=fixedPolicy \
--prop:password='*******' \
--prop:ntpserver=******* \
--vService:installation=com.vmware.vim.vsm:extension_vservice \
vSphere_Replication_OVF10.ovf  vi://vcenter01.domain.com/DC1/host/Cluster1/

 

Advertisements

Leave a comment

Backing up VmWare VM without powering off

Here’s a sequence of commands in an ssh session to an ESXi host that creates a VM backup without interrupting its work. Of course it’s only a snapshot of the disk, so there may be corrupted files as a result. vmkfstools command requires full file path for the source and destination VMDK files.

# This lists all virtual machines and their IDs. 
# Further in this example, our VM is number 18
vim-cmd vmsvc/getallvms

cd /vmfs/volumes/datastore1/VMNAME 
vim-cmd vmsvc/snapshot.create 18 mybackup
mkdir /vmfs/volumes/nas1/backup/VMNAME
vmkfstools -i VMNAME.vmdk /vmfs/volumes/nas1/backup/VMNAME/VMNAME.vmdk
cp VMNAME.vmx /vmfs/volumes/nas1/backup/VMNAME/
vim-cmd vmsvc/snapshot.removeall 18

Leave a comment