VMware Cloud Community
baselalihamad
Contributor
Contributor

Script removing a disk from one VM and attached to a different VM.

I am looking for a way to detach a VMDK from one VM and then attached it to another via a script. I am running vsphere 6.5. The goal is to be able to use a script to move a data disk between nodes on an MS failover cluster.

Reply
0 Kudos
3 Replies
LucD
Leadership
Leadership

What do you already have?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

Reply
0 Kudos
jburen
Expert
Expert

If you want a supported configuration you should use shared disks. I don't think swapping a VMDK disk between cluster nodes will result in a working solution. This is a PDF about setting up Failover Clusters on ESXi 6.5: https://docs.vmware.com/en/VMware-vSphere/6.5/vsphere-esxi-vcenter-server-651-setup-mscs.pdf

 

Consider giving Kudos if you think my response helped you in any way.
Reply
0 Kudos
baselalihamad
Contributor
Contributor

Thanks for the link. I am already running an MS failover cluster using shared VDMK files with SCSI bus sharing. The issue is that doing so does not allow for backup and repl support from tools like Veeam. Bus sharing is not really supported well. 

Using iSCSI from the VM to the SAN would work well, but it is transparent to VMWare so when backing up or replicating there needs to be a separate method for the iSCSI storage. 

 

This is why I am looking for a way to script moving the VDMK file. We would only use this when we need to do a blue/green upgrade between MS cluster nodes. Move the VDMK from node 1 to node 2, upgrade node 1, move VDMK back, upgrade node 2, etc. 

 

 

Reply
0 Kudos