VMware Cloud Community
kurianlinu
Enthusiast
Enthusiast

ESXi6.5 Running on Dell R730 server

Hi Team,
I have Xeon 64gb RAM Dell R730 6TB HDD server in my production environment. ESXi-6.5.0-4564106-standard (VMware, Inc.) hosted into it and few VMs created under the ESXi. Now I need to transfer few files(backup file of a vm) from the ESXi to an external USB/Optical drive. Since this is a linux based environment(VMkernel 6.5.0),Could you please direct me how to mount a USB disk into the ESXi to copy 3.7Tb of files fromESXi to USB.
Do we need to stop the usbarbitrator service to display the USB disk under "/dev/disks/"
/etc/init.d/usbarbitrator stop
Is there any challenges here, do we need to change the file format(Flat32/ntfs)
ManyThanks,
Linu

Reply
0 Kudos
22 Replies
Lalegre
Virtuoso
Virtuoso

Hey @kurianlinu,

Without digging in what is your backup solution chosen it is possible to use an external disk and use it as Datastore for which you will need to format it with VMFS. However in this scenario the backup files will only be recovered once you connect the disk to an ESXi.

Something you can do also is to connect the external disk in a computer or even passthrough to a server to copy the files and read in whatever server you have.

I recommend you to follow the next procedure as I used it in the past and it work perfectly: https://www.it-react.com/index.php/2020/04/26/how-to-add-a-usb-disk-as-vmfs-datastore-in-esxi-6-7/

Tags (1)
Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

Hi Thanks for the response.
I have taken the snapshot of one of my VM and I need to transfer all those files including the flat.vmdk files to an external drive for the future purpose. This is my purpose, and I don't want to install any vm into that USB.IS there any workaround for this activity or DoI need to follow as per the link shared and need to add USB as a data store? .


Thanks Linu

Reply
0 Kudos
MichaelKauffman
Contributor
Contributor

Can't you just download the files from the ESXi web interface?

Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

No we can't..also there is no option to download the flat.vmdk file,the base file.so I planned to copy to a USB.Please assist me to connect the USB and copying files fromESXi6.5

Thanks,
Linu

Reply
0 Kudos
a_p_
Leadership
Leadership

Starting the download of a virtual disk (.vmdk) from the Datastore Browser (UI), will start two downloads, one for the header/descriptor file, and one for the data/flat .vmdk file. As an alternative, enable SSH on the host, and download the files via scp.

André

Reply
0 Kudos
Lalegre
Virtuoso
Virtuoso

As the folks mentioned above there is no need for formatting the USB to VMFS and use it as a Datastore as in the future it will only be readable by another ESXi. 

However follow what @a_p_ is suggesting regarding copying the files and for that you can simply use WinSCP. If that is not enough try to follow the procedure I sent you in the first response.

Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

Thanks for the advice.

Just to know one thing, I have a VM in production stage and we are planning to some upgrade activities. If something happened in the worst scenario, can I create a new VM instance and revert it to the earlier stage with the previous snapshot files and the base file(flat.vmdk,..vmsn..etc). If possible can you please direct me to the proper procedures?.

Thanks 
Linu

Reply
0 Kudos
nachogonzalez
Commander
Commander

I think that loging via WinSCP and copying the files would be quicker.

Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

Can't use WinSCP as a jumphost is the primary access point. Through Jumphost only we can connect to the ESXi servers.

Reply
0 Kudos
a_p_
Leadership
Leadership

>>> ...can I create a new VM instance and revert it to the earlier stage with the previous snapshot files and the base file(flat.vmdk,..vmsn..etc).
Sure. That one of the benefits that snapshots have. In VMware products, guest data modifications - after creating a new snapshot - are stored in new .vmdk files. If something goes wrong during the update, you can simply revert to the previous snapshot, thus discarding all modifications done after taking the snapshot.
Depening on the VM's workload, it may be a good idea to create a new snapshot while the VM is powered off, i.e. in a consistent state.

André

Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

I will make it clear now..
I have a running VM in production phase and we are planning some upgrade activities into the same VM. We doesn't have any proper backup mechanism to revert it back to the running state if in the worst case the VM got Malfunctioned after the upgrade activity. The only thing we have is the snapshot files and the base files including the flat.vmdk,vmsn..etc of the same vm(We planned to take a copy of these files before the activity).
Suppose if the VM got malfunctioned and unable to access at all to perform the recover from snapshot option, Can we able to recreate the same vm(The one which malfunctioned) running using the copied base files(flat.vmdk,vmsn, snapshot files..etc) of the same?
Thanks
Linu

Reply
0 Kudos
jburen
Expert
Expert

If you have a snapshot and something goes wrong with the VM you can revert to the previous snapshot... There is no need to recreate the whole VM...

 

Consider giving Kudos if you think my response helped you in any way.
Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

How to create a VM instance using existing VMDK file of an older VM?

Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

Can someone explain how to create a virtual machine from an VMDK files in vsphere6.5

Reply
0 Kudos
a_p_
Leadership
Leadership

Creating a VM from a virtual disk is basically the same as moving a physical disk from one system to another.
You'd create a new VM, but instead of creating a new virtual disk for it, select the "use existing virtual disk" from the wizard.
Please remember that in case the VM has active snapshots, you need to point the VM to the current/latest snapshot, because virtual disks with snapshots work as chains, i.e. each chain link is required. That's why you can simply create a new snapshot prior to installing critical updates, and once there's a need to revert to the state before the installation started, you can just revert to that snapshot, thus discarding changes that happened after creating the snapshot.

André.

kurianlinu
Enthusiast
Enthusiast

I tried SCP command to copy the backend files of a running vm(hosted on ESXi6.5) But unable to copy these files "delta.vmdk, vmx.lck, .vswp". throwing an error "Device or Resource busy".

To copy these files do I need to shutdown the VM? or Is there any other way?

Thanks,
Linu

Reply
0 Kudos
a_p_
Leadership
Leadership

As you already found out, you cannot copy the current .vmdk file while the VM is powered on.
What may be an option - if you want/need the VMs current state copied - is to temporarily create another snapshot, and copy all virtual disks except for the last/current snapshot.

André

Reply
0 Kudos
kurianlinu
Enthusiast
Enthusiast

OK..If in that case can I recreate the vm using the VMX file and the base disks copied? because I found an error (attached the screenshot)while recreating  using vmx. The missing file(vmdk) was already there. Is vmx pointing to delta files that were unable to copy(delta.vmdk)?

kurianlinu_0-1616046850896.png

Thanks,
Linu

Tags (1)
Reply
0 Kudos
a_p_
Leadership
Leadership

Sorry that I didn't mentiond this.

You either want to copy the .vmx file prior to taking the temporary snapshot, so that it points to the current .vmdk, or modify/edit the copied .vmx file, if you copy it after creating the temp. snapshot.


André