VMware Cloud Community
Norm_Pettigrew
Contributor
Contributor
Jump to solution

ESX 3.0.1 What files are needed to bring up a VM

HI Folks,

Have all my .vmdk files on hte SAN and I wanted to copy the files required for one server and move it to another SAN for DR testing on a different host and wanted to know what files I need to move over. Is it just the .vmdk file as I know in ESX 2.x etc the .vmx etc were in a seperate location.

Much appreciated.

Cheers Norm

0 Kudos
1 Solution

Accepted Solutions
esiebert7625
Immortal
Immortal
Jump to solution

You can use SCP, WinSCP or Veaams FastSCP

Download FastSCP: http://www.veeam.com/veeam_fast_scp.asp

Here's what I do to copy a VM between one ESX servers local storage to another.

\- Shutdown VM to be moved

\- Right click on VM to be moved and select Remove from Inventory

\- Click Yes for confirmation message

\- Login using Putty to destination ESX server (ServerA in this example)

\- Change to local storage directory

\- Create subdirectory for new server

login as: root

root@ServerA's password:

\[root@ServerA root]# cd /vmfs/volumes/ServerA-Local

\[root@ServerA SerervA-Local]# mkdir VM-04

\- Login using Putty to source ESX server (ServerB in this example)

\- Change to local storage directory of files to be copied

\- Use scp to copy files from source server to destination server.

login as: root

root@ServerB's password:

\[root@ServerB root]# cd /vmfs/volumes/ServerB-Local/VM-04

\[root@ServerB VM-04]# scp \*.* root@ServerA:/vmfs/volumes/ServerA-Local/VM-04/

root@ServerA's password:

VM-04-flat.vmdk 100% 18GB 15.8MB/s 19:24

VM-04.nvram 100% 8664 5.0MB/s 00:00

VM-04.vmdk 100% 338 85.1KB/s 00:00

VM-04.vmsd 100% 0 0.0KB/s : ETA

VM-04.vmx 100% 1372 711.9KB/s 00:00

VM-04.vmxf 100% 250 148.4KB/s 00:00

vmware-1.log 100% 37KB 11.4MB/s 00:00

vmware.log 100% 18KB 5.8MB/s 00:00

\[root@ServerB VM-04]#

\- Open VirtualCenter and click on destination ESX server and select the Summary tab

\- Right-click on the Local datastore in the Resource pane (ie. ServerA-Local) and select Browse Datastore

\- Select the directory that you copied files to (ie. VM-04)

\- Right-click on .VMX file and select Add to Inventory

\- Enter a virtual machine name and select a Inventory Location and click Next

\- Select your destination ESX server (ie. ServerA) and click Next

\- Select a Resource Pool (ie. ServerA) and click Next

\- Click Finish to Complete

\- Power on virtual machine

\- You will receive a message that the location of the configuration file has changed. Select Keep and click OK

\- Open VirtualCenter and click on source ESX server and select the Summary tab

\- Right-click on the Local datastore in the Resource pane (ie. ServerB-Local) and select Browse Datastore

\- Select the directory that you copied files to (ie. VM-04)

\- Delete the sub-directory that you moved to the destination server

if you find these posts helpful, please award points...thanks

View solution in original post

0 Kudos
4 Replies
esiebert7625
Immortal
Immortal
Jump to solution

With ESX 3.0 the vmx file is located in the same directory as your vmdk file (there are 2 vmdk files in ESX3 for each disk, one is the actual data file and has a -flat in the name, the other is the descriptor file). Essentially all the VM's files are in the same directory. If you only copy the vmdk you can simply create a new VM on the other server and tell it to use the existing vmdk file. Otherwise if you also copy the vmx (and also the nvram) file you can just register the VM on the ESX server by browsing the datastore in the VIC and right-clicking on the VMX file and selecting Add to Inventory.

How to register an existing Virtual Machine in VirtualCenter

-Select the ESX server in the VirtualCenter that the VM files are located on

-On the summary tab right-click on the datastore that the VM files are located on and click “Browse Datastore”

-Select the folder that the VM files are located in

-Right-click on the VMX file for the VM and select “Add to Inventory”

-Select a name and location for the VM and click Next

-Select the Host or Cluster for the VM and click Next

-Select a Resource Pool and click Next

-Click Finish and the VM will now appear in VirtualCenter

0 Kudos
Norm_Pettigrew
Contributor
Contributor
Jump to solution

Cheers for that and just one last thing is WinSCP the best method to copy the file and do any permissions have to be restet on the files. I have to copy the files to a WIndows Based Machine to port to the other SAN.

Cheers Norm

0 Kudos
DFATAnt
Enthusiast
Enthusiast
Jump to solution

To relocate a server from Prod to Test, do the following steps:

1. Copy the directory containing all the server files (/vmfs/volumes/datastore/servername) from the source to the destination server using fastscp or winscp

2. register the server on the destination server (vmware-cmd -s register /vmfs/volumes/datastore/servername/servername.vmx)

The server will appear in virtualcenter and be ready for use.

Hope this helps.

Ant

0 Kudos
esiebert7625
Immortal
Immortal
Jump to solution

You can use SCP, WinSCP or Veaams FastSCP

Download FastSCP: http://www.veeam.com/veeam_fast_scp.asp

Here's what I do to copy a VM between one ESX servers local storage to another.

\- Shutdown VM to be moved

\- Right click on VM to be moved and select Remove from Inventory

\- Click Yes for confirmation message

\- Login using Putty to destination ESX server (ServerA in this example)

\- Change to local storage directory

\- Create subdirectory for new server

login as: root

root@ServerA's password:

\[root@ServerA root]# cd /vmfs/volumes/ServerA-Local

\[root@ServerA SerervA-Local]# mkdir VM-04

\- Login using Putty to source ESX server (ServerB in this example)

\- Change to local storage directory of files to be copied

\- Use scp to copy files from source server to destination server.

login as: root

root@ServerB's password:

\[root@ServerB root]# cd /vmfs/volumes/ServerB-Local/VM-04

\[root@ServerB VM-04]# scp \*.* root@ServerA:/vmfs/volumes/ServerA-Local/VM-04/

root@ServerA's password:

VM-04-flat.vmdk 100% 18GB 15.8MB/s 19:24

VM-04.nvram 100% 8664 5.0MB/s 00:00

VM-04.vmdk 100% 338 85.1KB/s 00:00

VM-04.vmsd 100% 0 0.0KB/s : ETA

VM-04.vmx 100% 1372 711.9KB/s 00:00

VM-04.vmxf 100% 250 148.4KB/s 00:00

vmware-1.log 100% 37KB 11.4MB/s 00:00

vmware.log 100% 18KB 5.8MB/s 00:00

\[root@ServerB VM-04]#

\- Open VirtualCenter and click on destination ESX server and select the Summary tab

\- Right-click on the Local datastore in the Resource pane (ie. ServerA-Local) and select Browse Datastore

\- Select the directory that you copied files to (ie. VM-04)

\- Right-click on .VMX file and select Add to Inventory

\- Enter a virtual machine name and select a Inventory Location and click Next

\- Select your destination ESX server (ie. ServerA) and click Next

\- Select a Resource Pool (ie. ServerA) and click Next

\- Click Finish to Complete

\- Power on virtual machine

\- You will receive a message that the location of the configuration file has changed. Select Keep and click OK

\- Open VirtualCenter and click on source ESX server and select the Summary tab

\- Right-click on the Local datastore in the Resource pane (ie. ServerB-Local) and select Browse Datastore

\- Select the directory that you copied files to (ie. VM-04)

\- Delete the sub-directory that you moved to the destination server

if you find these posts helpful, please award points...thanks

0 Kudos