VMware Cloud Community
hurnik
Contributor
Contributor
Jump to solution

Moving virtual disks to a diff. guest?

I'll do my best to explain.

I'm using ESXi (version 4.1)

I have a single SATA drive, it has a big datastore

I have a few vm's on the host

Is there a way to "disconnect" some of the disks assigned to say, "guest123" and attach them to "guestXYZ"?

I'm in the process of migrating from Citrix XENserver, so my terminolgoy is a bit off.  I know with XENserver, I can "detach" a disk and "attach" it to a diff. VM/guest.

Was wondering if this can be done in ESXi as well (the vm's are stored in the datastore, not with the vm, if that makes any sense)

0 Kudos
1 Solution

Accepted Solutions
Dave_Mishchenko
Immortal
Immortal
Jump to solution

To detach the disk you'll right click, select Edit Setting and then remove the HD.   When you do so you'll have two options - 1) to remove the disk 2) remove the disk and delete the files. You'll obviously choose option 1.

On the other VM, add a virtual disk and on the hardware wizard you'll have the option to choose an existing disk.

It might be worthwhile to move the disk files around after you detach them otherwise your 2nd VM will end up with disk files in the folder for the 1st VM.

Dave
VMware Communities User Moderator

Free ESXi Essentials training / eBook offer

Now available - VMware ESXi: Planning, Implementation, and Security

Also available - vSphere Quick Start Guide

View solution in original post

0 Kudos
4 Replies
Dave_Mishchenko
Immortal
Immortal
Jump to solution

To detach the disk you'll right click, select Edit Setting and then remove the HD.   When you do so you'll have two options - 1) to remove the disk 2) remove the disk and delete the files. You'll obviously choose option 1.

On the other VM, add a virtual disk and on the hardware wizard you'll have the option to choose an existing disk.

It might be worthwhile to move the disk files around after you detach them otherwise your 2nd VM will end up with disk files in the folder for the 1st VM.

Dave
VMware Communities User Moderator

Free ESXi Essentials training / eBook offer

Now available - VMware ESXi: Planning, Implementation, and Security

Also available - vSphere Quick Start Guide

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

In addition to what Dave said, make sure the virtual disk does not have snapshots! (the vmdk name in the VM's HDD settings does not end with s.th. like <vmname>-00000x.vmdk) In case of snapshots you cannot attach the virtual disk to a VM using the GUI. The GUI would only present the base vmdk and if you attach this instead of the snapshot disk you will loose data!

André

0 Kudos
hurnik
Contributor
Contributor
Jump to solution

Thanks, when you say move the vmdk files is that just a manual process?

Like I power down the VM and SSH in or use winscp or something and literally "move"the files into the other directory?

0 Kudos
scowse
Enthusiast
Enthusiast
Jump to solution

You can move/copy files with the datastore browser as well

0 Kudos