Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1419
  • Last Modified:

Restore with GhettoVCB

I'm trying to test restoring with GhettoVCB.   When I restore the VM and power it on, everything's fine, but the restored VM looks like this:

vmguestname-2012-03-29_13-04-56

Instead of the original VM, which was :

vmguestname

How can I rename the restored VM?  I found an article about using vmkfstools to rename the VMDK file.  That worked fine, but the directory that the VMDK file is in, if I rename it using the "Browse Datastore" feature in VSphere client, when I try to add the virtual hard disk back to the VM, I get filename not found errors.  How can I rename the directory?
0
sedberg1
Asked:
sedberg1
  • 6
  • 6
1 Solution
 
sedberg1Author Commented:
I'm running ESXi 5.0 free hypervisor.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Rename the folder using the vSphere Client Datastore browser.
0
 
sedberg1Author Commented:
As per my post:

"That worked fine, but the directory that the VMDK file is in, if I rename it using the "Browse Datastore" feature in VSphere client, when I try to add the virtual hard disk back to the VM, I get filename not found errors.  How can I rename the directory?"
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Right Click the Datastore, Browse Datastore, Right Click the Folder, and Select Rename.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
You need to change ALL the entries in the VMX file.

Unregister the VM, Edit the VMX, making sure ALL the entries have the correct path.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
also check the vmdk, and flat vmdk references are correct.
0
 
sedberg1Author Commented:
This is what I did:
Ran a ghettoVCB script on a VM named mail1.  This created a backup in a folder called mail1-2012-03-29_13-39-05

To restore, ran ghettoVCB-restore.sh which works fine.  It's just renaming the directory for easier mgmt in the future that's giving me trouble.  These are the steps I'm doing to rename the directory...

1. Removed the hard disk from the VM (not deleted, jsut removed)
2. vmkfstools -E mail1-0.vmdk mail1.vmdk  -  That renamed both the mail1-0.vmdk and mail1-0-flat.vmdk to mail1.vmdk and mail1-flat.vmdk respectively.
3. Edited any entry referring to the directory in the mail1.vmx file (full text attached)
4. Renamed the directory name from mail1-2012-03-29_13-39-05 to mail1
5. Added the hard disk back to the VM
6. Got this error:  

File <unspecified filename> was not found
Time: blah blah
Target: mail1
ESXi: 10.1.6.66
mail1-vmx.txt
0
 
sedberg1Author Commented:
With renaming the directory, I'm using the Datastore Browser inside VSphere client.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
this error message can indicate the virtual machine disk is incorrect

what does the vmdk contents state
0
 
sedberg1Author Commented:
Ok, if I right-click the VM in VSphere and choose Remove from Inventory, then rename the directory using the Datastore Brwoser in the VSphere client, then open up that directory, right-click the VMX file and choose Add to Inventory, I have no problem.  That renames everything, and I can resort to business as usual.  Problem solved.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Yes the VMX contents is cached.
0
 
sedberg1Author Commented:
This is the answer.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

  • 6
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now