Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

How to migrate VMs with Thick provision disk (Lazy or Eager Zero) from SAN (VMFS) to vSAN Datastore with the same Thick provision disk format (66809)

Last Updated: 6/20/2023Categories: How toTotal Views: 8000Language:
English

2 like this article

Subscribe to get an email
newsletter with new updates

2 people found this helpful Please provide article feedback:

Symptoms

Some applications (e.g., Oracle RAC cluster) need the VM to be Thick Provisioned (Lazy or Eager Zero). By default, the vSAN datastore will be thin provisioned. If the customer is migrating existing "Thick Provisioned" disks (which can be either Lazy or Eager Zero) from a traditional SAN VMFS datastore to a vSAN datastore, the destination VM by default will be thin provisioned. You may see if the VM is "thick" or "thin" in the web client: VM > Summary > VM Hardware > Hard Disk in the web client.

The customer may face the following issues:

Cannot migrate VMs with thick provisioned disks from the SAN (VMFS) to the vSAN as the disk format option in the advanced settings of Storage vMotion (both XvMotion and SvMotion) is grayed out.

The VMs are converted to "Thin disk" upon migration regardless of the state they had prior to a storage migration.

New VM provisioning works with thick disks on vSAN, however, XvMotion and SvMotion from SAN to vSAN convert the disks to thin.

Configuring the vSAN policy to an Object Space Reservation of 100% does not change the disk from thin to thick provisioned.

Purpose

Successfully migrate VMs (Thick Provisioned) from VMFS to vSAN datastore by keeping the status of the VMDK as thick provisioned

Cause

This feature is blocked from the UI perspective (vSphere client and HTML client) for the vCenter server when the vSAN datastore is chosen as the target.

Impact / Risks

Run the script from the command line on the vCenter server with a test VM prior to using it on production VMs.

Resolution

The engineering team has provided a python script to achieve SvMotion and XvMotion of VMs within the same vCenter server. This script works only within the same vCenter and does not work across multiple vCenter servers. The script does not make any changes to the source VM; however, as a best practice, VMware recommends having backups of the VM. Customers will need to use the PowerCLI scripts to migrate between vCenter servers.

Sample:

Please note double quotes (") are not permitted, and singles quotes (') must be used.

The names of the vCenter VM Cluster and Datastore should match, and they are case-sensitive.

The relocate python script will initiate the task "Relocate virtual machine" and this will be shown as a task in vCenter's recent tasks along with the progress bar.

Steps :
1. Upload the script to vCenter Server (Check the Attachment: RelocateVM.py) in /tmp folder. The script is attached to the KB.
2. Validate the integrity of the script by using the below "cksum" command after uploading it to vCenter.
3. VMware recommends running the steps below on a small test VM and validating the results.

#cksum /tmp/RelocateVM.py
2479068796 7548 /tmp/RelocateVM.py

3. Run python script on vCenter server

Usage: RelocateVM.py [-h] [-s HOST] [-u USER] [-p PASSWORD] [-c CLUSTER_NAME]
[-t TARGETHOST] [-d DATASTORENAME] [-k VMS] [-r RP]
[-P PROVISIONTYPE]
action
The purpose of this tool is to migrate a virtual machine from a non-vSAN datastore to a vSAN datastore and change the disk provisioning type. The script must be ran on the vCenter Server.

Positional arguments:

action Now the following actions are supported: 'listVMs' 'relocate_vm' (Migrate virtual machine with type 'Change both compute resource and storage'.
If '-- targetHost' is specified, compute resource will be migrated to the target host)

optional arguments:
-h, --help Show this help message and exit -s HOST, --vcHost HOST VC host to connect. (Required)
-u USER, --user USER User name of vc host. (Default: [email-masked]')
-p PASSWORD, --password PASSWORD Password of vc host.
-c CLUSTER_NAME, --clusterName CLUSTER_NAME Specify the cluster need to detect. (Default: 'VSAN-Cluster')
-t TARGETHOST, --targetHost TARGETHOST Migrate the virtual machine to a specific host or cluster
-d DATASTORENAME, --datastore DATASTORENAME Specify the destination datastore. (Default: 'vsanDatastore')
-k VMS, --vm VMS Specify the VM name need to be relocated. Sample: --vms vm1,vm2
-r RP, --resourcepool RP
Specify the destination resource pool. Sample:
--resourcepool 'rp1'. Relocate to cluster only if no
resource pool is specified
-P PROVISIONTYPE, --provisionType PROVISIONTYPE
Virtual disk provision type, supports: thin, thick; if
omitted, thick will be taken

# python /tmp/RelocateVM.py -s <VCIP/localhost> -p <vCemterPassword> -c <Name of Destination vSAN cluster> -k <VM_name_source_cluster> -t <destination_host> -d <datastorename/vsandatastore> relocate_vm -P thick

Sample command from LAB for ex.

# python /tmp/RelocateVM.py -s localhost -p '*****' -c 'Production_ALL_flash' -k 'Thick_vm-1' -t 'ESXI.test.local' -d 'vsanDatastore' relocate_vm  -P thick

Total cluster number: 1
Production_ALL_flash, vSAN enabled: True
Virtual Mainchines in cluster: ['Thick_vm-1', 'sddc-analyzer-clone', 'Win-Cluster-2k19-H2', 'Win-cluster-2k19-H1', 'RDP-New', 'server2012', 'SRM-Primary', 'P_VC_SRM.vsensei.local', 'hytrust-Secondary', 'vijESX!3', 'VijESXI1', 'p-h3.vsensei.local', 'p-h1.vsensei.local', 'zerto-host-2', 'zerto-host-1', 'zerto-mgmt_srm-1', 'zerto-primary-vc', 'enc-h2', 'HCIBench_1.6.7.1', 'S_VC_SRM.vsensei.local', 'LAMP-Host-production', 'zerto-host-4', 'zerto-host-6', 'p-ad-vsensei.local', 'zerto-secondary-vc', 'enc-h3', 's-h3.vsensei.local', 'VijESXI4', 'enc-h1', 'Ubuntu-Dcoker', 'zerto-mgr-SRM_2', 'VMware-vRealize-Log-Insight-4.7.0', 'SRM-Secondary', 'VijayVCSA6.5', 'vSAN_Perf_Monitor', 's-h1.vsensei.local', 'vijayserver2012', 'VCSA_embd_mgmt', 'p-h2.vsensei.local', 'vmware-ioinsight-1.1.1', 'enc-h4', 'hytrust-Primary', 's-h2.vsensei.local', 'SDDC_Analyzer', 'VijESXI2', 'zerto-host-3']

A relocate VM task will be initiated and can be monitored from the UI/vsphere-client .

Workaround

Customers can also choose to perform the task using powercli.

Related Information

N/A

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

RelocateVM

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
Download and Install VMware Fusion (2014097)

KB
•
パスでパワーオン リセット時の Unit Attention が頻繁に発生する (1020704)

Results 1-3 of 3

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSAN

Related Versions:

VMware vSAN 6.x

VMware vSAN 6.7.x

VMware vSAN 6.6.x

Take Our Survey

Support Assistant