after converting a new image into a single vmdk file i have it sitting in vmfs/newimage/newimage.vmdk
I return to the VI client and create a new VM that I want to use this existing virtual disk. When i run through the process the end result is my newly create vmx file in its own folder and my vmdk file in another. Other than manually copying the files around what is the correct process to have all files pertaining to a single vm in the same folder?
thanks
Once the VM is created, shut the VM off and copy the vmdk file to the VM's directory using vmkfstools -i. Then edit the VM's setting's, remove (not delete) the current hard disk. Then add a new disk and tell it to use an existing disk and browse to your VM's directory and select it. Power up the VM and if it boots OK go back and delete the original source VM.
Alternately after you copy the vmdk you could edit the vmx file and make sure the disk filename is pointed to the new location. Here's what I have documented...
Once the transfer completes login to your ESX service console and change to your temp directory, ie. cd /vmfs/volumes//temp/Win2003vm1-new.vmdk myVM1.vmdk This will make a copy of your vmdk file in your VMs directory, you can also change the destination file name to match your VMs name.
o In the VI Client, edit your VMs settings, remove the current hard disk (dont delete it yet) and add new new hard disk, select Use an Existing Disk and browse to the new vmdk file in your VMs directory.
o Power on the VM and if it boots OK you can delete the original virtual disk, you can use FastSCP for this or right-click on your Datastore in the VI Client and select Browse your Datastore with the VI Client to delete the two original virtual disk files
Fyi if you find this post helpful, please award points using the Helpful/Correct buttons.
-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-
Thanks, Eric
Visit my website: http://vmware-land.com
-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-
Message was edited by:
esiebert7625
edit
Message was edited by:
dkfbp
I usually say use a new disk when i create the vm, and then create like a 1MB disk that I delete later, and then manually move the vmdk file into the folder and add it to the vm. I don't think there is a way around it, i definitely have to do that every time.
Once the VM is created, shut the VM off and copy the vmdk file to the VM's directory using vmkfstools -i. Then edit the VM's setting's, remove (not delete) the current hard disk. Then add a new disk and tell it to use an existing disk and browse to your VM's directory and select it. Power up the VM and if it boots OK go back and delete the original source VM.
Alternately after you copy the vmdk you could edit the vmx file and make sure the disk filename is pointed to the new location. Here's what I have documented...
Once the transfer completes login to your ESX service console and change to your temp directory, ie. cd /vmfs/volumes//temp/Win2003vm1-new.vmdk myVM1.vmdk This will make a copy of your vmdk file in your VMs directory, you can also change the destination file name to match your VMs name.
o In the VI Client, edit your VMs settings, remove the current hard disk (dont delete it yet) and add new new hard disk, select Use an Existing Disk and browse to the new vmdk file in your VMs directory.
o Power on the VM and if it boots OK you can delete the original virtual disk, you can use FastSCP for this or right-click on your Datastore in the VI Client and select Browse your Datastore with the VI Client to delete the two original virtual disk files
Fyi if you find this post helpful, please award points using the Helpful/Correct buttons.
-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-
Thanks, Eric
Visit my website: http://vmware-land.com
-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-
Message was edited by:
esiebert7625