Is it possible to migrate a virtual machine to thin provisioned disk?
I have about 100 VM in a resource pool dedicated to called "Archive"... Well, archiving. These virtual machines are currently powered off but every now and then we will get pulled for a developer to work on (they are for the most part, the virtual computer with client customizations if they are changed about once a year). I'm quickly running out of space on this SAN but all discs are thick provisioned and using the disc is maybe 20-30% on average. Also, I want to move them to a new large store of data I created for them.
Of course, I choose Migrate & gt; Change store data & gt; Thin provision in vSphere Format and I'm done. However, it would be nice to not do this 100 times.
Move-VM does not seem to be capable of this, and I have not been able to find a workaround. Is there a way to convert the thin and then perhaps Move-VM? Or I'll just on this all wrong.
Thank you!
You can try this script?
He's moving vms to data store 'EMCSAN:Datastore01' trying to change the format of storage for Thin
$dsView = Get-Datastore -Name "EMCSAN:Datastore01" | Get-View -Property Name Get-VM| % { $vmView = $_ | Get-View -Property Name $spec = New-Object VMware.Vim.VirtualMachineRelocateSpec $spec.datastore = $dsView.MoRef $spec.transform = "sparse" $vmView.RelocateVM($spec, $null) }
/ Yasen
Tags: VMware
Similar Questions
-
Is it possible to migrate a virtual machine between vcenter servers programmatically?
Hi all
My question is quite simple:
-Is it possible to migrate a virtual machine between vcenter servers programmatically?
Let's say we have two data centers:
vcenter1
-vm1
-vm2
vcenter2
-vm3
Is it possible to migrate vms between vcenter2 and vcenter1 programmatically? (or vice versa)?
Also, I'm assuming that the appropriate VLAN and data warehouses across the different vcenters!
Thank you
Luis
It is not possible, vMotion or migration live is in an instance of vCenter, it cannot be covered through two even if you have the data store accessible both vCenters and sets of the host. At best, you can unregister the virtual machine of vCenter 1 host and re-save as on vCenter 2 host, but once again, it is while the virtual machine is turned off.
=========================================================================
William Lam
VMware vExpert 2009,2010
VMware scripts and resources at: http://www.virtuallyghetto.com/
Introduction to the vMA (tips/tricks)
Getting started with vSphere SDK for Perl
VMware Code Central - Scripts/code samples for developers and administrators
If you find this information useful, please give points to "correct" or "useful".
-
Migration of virtual machines to vSphere 4.1 to vSphere 6.0
As the title eludes to, we are standing up a new physics 6.0 Server vCenter Server and need to migrate virtual machines of 4.1 6.0 guest hosts. I'd love to take the time to create a script that does the following; However, before heading down this path, I wanted to do a ping of the group to see if someone has done something like this before or have pointers to scripts that perform some of these actions already. Some background and concept:
- Running 4.1.
- A new physical Center of vCenter 6.0 will be deployed side-by-side with 4.1.
- The existing configuration of vSphere HA allows for 1-2 guests down without impact to the virtual machines.
- The two environment and will be Cisco N1KV, SAN access shared for the same data storages.
- A new vCenter will be lifted.
- A single host is identified and VMs evacuated to the remaining hosts.
- This host will be in maintenance mode, removed from the cluster and close.
- A clean install of ESXi 6 will be done and set up spec.
- N1KV will be deployed.
To digress on the details at the moment... Now markets PowerCLI desired. This idea is ad hoc and on the fly, so as I write this.
- identify all the virtual machines associated with a specific data store - will need to work with the local client to schedule downtime for virtual machines
- Stop the virtual machine
- Remove the VM of the vCenter 4.1 inventory
- to connect to vCenter 6.0
- Add the virtual machine to the vCenter 6.0 inventory (and once we have passed the first host in the new cluster, automatically place the virtual machine by using the DRS)
- Reconfigure the vmnic with the new Cisco 1000V dvs (will be the same name on both sides, but has a different ID)
- pull in the keys and the values to a CSV and advancedsetting set to harden
- Turn on the virtual machine
- Perhaps a test of ping for the NETWORK card to check connectivity
The order in which the steps are performed can be switched around, as long as the desired end result is the same: migration effectively virtual machines between two disparate solutions with single medium sharing as a data store. In which I realize will always be VMFS3. New data stores VMFS-5 is another task for another time.
Thank you for your time, suggestions, links, etc...
@LucD - hi.
These steps are quite possible with PowerCLI.
See the script after skeleton, he probably needs some adjustments to fit your environment and requirements
$dsName = "xyz".
$vm = get - VM - $dsName data store
Stop-VMGuest - VM $vm - confirm: $false
Remove-VM - $vm VM - confirm: $false
Disconnect-VIServer-Server vc41 - confirm: $false
$vc6 = Connect-VIServer-Server vc6
$newVM = $vm | New-VM - DiskPath $_. ExtensionData.Config.Files.VmPathName - confirm: $false
# Suppose a CSV file with
# Key, value
# key1, value1
# key2, value2
$advSettings = import-Csv - UseCulture advSettings.csv
{foreach ($obj in $newVM)
$advSettings | %{
Get-AdvancedSetting - $obj entity - name $_. Key |
Game-AdvancedSetting - value of $_. Value - confirm: $false
}
}
Start-VM - $newVM VM - confirm: $false
$newVM |
Select Name,
@{N = "Available"; E = {Test-Connection - ComputerName $_.} Guest.HostName - County 1 - Quiet}}
-
How to migrate a virtual machine from the server with DAS to another server
Hi guys,.
questions. 'More' essential Kit. VMotion is available
I have 2 physical servers, two of them have DAS (not SAN Central). SO I want to migrate a virtual machine on server A to server B. is it possible in this situation?
Or should I have versions of more expensive VMWare do?
Thank you
DmitryYou can use clone. I would close first to the bottom of the virtual machine, but a VM slowed would be very nice clone. You can also use the VMware conveter. VMware converter can make a hot clone, including synchronization of last-minute changes, stop the source machine and put under tension the clone.
-
Problem with Migration hot virtual machines Hyper-V
Dear support
I am facing problem in Live Migration of Virtual Machine in Windows 2012 of Hyper-V R2 cluster. Here are the details for my current setup.
Two windows 2012 R2 Datacenter even care Server (HV01 and HV02) both in cluster
A Virtual Machine created the Volume share of Cluster (c:\Cluster storage\...)
A network adapter dedicated to the management of server-> 10.0.1.11 (HV01) and 10.0.1.13 (HV02)
A network card dedicated to Hyper v Virtual Machines-> 10.0.1.12 (HV01) and 10.0.1.14 (HV02) and allow networking option is disabled.
A network card for the heart beats-> 10.0.20.1 (HV01) and 10.0.20.2 (HV02)
A network card dedicated for Live Migration-> 10.10.10.50 (HV01) and 10.10.10.51 (HV02) and chosen to be used only for the live migration fails on cluster network settings
I added the Virtual Machine Cluster Failover successfully without error or warning. When I do a quick migration his works fine but when I do live migration his error giving 21502.
Please update what's wrong with my setup
Hello
Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.
http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer
See you soon.
-
How to migrate a virtual machine of vsphere vsphere 4 5
I have a vsphere 4 and a 5 of vsphere, I want to migrate a virtual machine of vsphere vsphere 4 5
my method is export ovf model and deploy the model of the FVO in vsphere 5, but it shows "end of file EGGS reached while looking for: * hard.
How can I work my problem
Thank you very much
Hello
Why are you trying with VMware Converter?
It's the right tool for this kind of tasks/migration
However, if you share with us details about your environment, we can help you more accurately.
Concerning
-
Require a process step by step for the migration of virtual machines to new VMware ESX hypervisor
Hello
I'm looking for the method step by step for the migration of virtual machines to new host ESX Migration both cold and hot.
Scenario - I have two data centers running ESX host stand-alone (with VM) in Europe. I need to build the new ESX host in new Dataceter to Singapore.
Need prerequisites, the methods available for migrate VMWARE virtual has new host ESX (in the new data center) with minimum downtime.
It will be great if you can enumerate the markets or redirect me to documentation that I can use to create detailed steps as the target host compatibility check on VMs and so on.
Please advice
Concerning
AVI
The steps are correct. The virtual machine must be turned off (step 3).
-
Best way to migrate a virtual machine from local drive to Cluster?
Hello
For historical reasons, we set up a virtual machine in the local disk of the ESX host. This host is not connected to the San, where there is one group of another 3 ESX host.
We would like to remove this standalone ESX host and migrate the virtual computer to the Cluster. Should what tools I use? Can use us the converter to do? If so, when we connect to the Infrastructure of VI, does connect to the version independent host ESX OR import this virtual machine to an ESX Hos in the cluster?
Thank you
Hello
your ESX host is connected to your vCenter?
If Yes just turn off the virtual machine right click in vSphere client and choose migrate. Select destination storage and ESX server and it will be migrated.
If it's not I turn off the virtual machine and just copy the whole directory of the VM on the new ESX Server with scp on ssh.
Concerning
-
Migrate a virtual machine with snapshots. Works?
In the past, moving VMs between databases or host with snapshots was deadly.
It still happens in ESX4?
ESX4 does not throw the warning, as did ESX3.5.
You can migrate a virtual machine with snapshots, you can just see a different question. You try to make a vMotion in vCenter?
What is the symptoms you see?
-
Problem migrating a virtual machine
Hello!
I have a problem when I try to migrate a virtual machine to the concrete only two hosts. I have no problem in other guests in my infrastructure. When I try to start this operation I get the following error message: "cannot migrate from esx1.domain.com to esx2.domain.com: the host CPU is incompatible with the function CPU requirementes of the virtual machine; problem detected the CPUID level 0 x 80000001 register edx.
With other virtual machines, I have no problem and I can migrate from any host to any of them.
Hi Eric,.
Please check this link below:
http://KB.VMware.com/selfservice/viewContent.do?externalId=1001131&sliceId=1
Seems to be the answer to your problems.
Please give feedback if this solves the problem
Concerning
If you find this or any other answer useful please consider giving points by checking the answer useful or appropriate.
-
Migrate a Virtual Machine like a physical machine
Here's my situation...
I had a virtual machine on a Virtual Infrastructure environment. I wanted to migrate this virtual machine to another ESX environment. The source environment is maintained by our IT Department and they will not help us or give us access to their environment. Now we have a local administrator on the computer, virtual access, we decided to migrate the virtual computer as if it were a physical machine (physical machine to the coverter drop-down selection and installation of the agent on the source VM and when you are done uninstalling) in order to bypass interaction with HER. The virtual machine migrated but very well and seems to work very well. My question is, is there any potential problems migrating a virtual machine in this way (drivers, hardware, etc.)?
Thank you!
Your only way out is the it Department
-
Problem of migration of virtual machine of a store of data in another data store
Hello
I've migrated from the virtual machine to a data store to another data store
but the virtual machine present in both store data even after migration successfully
and when I stop the virtual machine, then it shows that in the new data store.Please tell us what could be the possible reason for the same
Appreciate your quick response.
Kind regards
Hakim. B
Dear all,
Finally, I found the solution.
I had stop the virtual machine, replaced by location always store with the virtual machine swap file and restarted the VM.
Kind regards
Hakim. B
-
Migrate a virtual machine Fisical VCenter
Buenas,
Hello.
I need to migrate a Vcenter 4.1 running in a virtual machine (with the default installation) to a physical machine.
I know the process is like this:
- Stop the Vmware services
- Open SQL management studio and make a backup a Vmware DB.
My doubts are:
Should I install separately located in the Vcenter ISO Sql create a DSN pointing to this SQL instance, create DB, restore it from the backup and installing vcenter, choose this DSN and "keep existing DB" or similar.
or
What can I install Vcenter in default mode (then then finish etc. ), automatically install SQL Server, DB, and the DSN; and restore this DB form the backup (in other words, crushing the fresh new DB created automatically)
In the first option, I'm afraid because according to this file official http://www.vmware.com/pdf/vsphere4/r40/vsp_compatibility_matrix.pdf , vmware provides that if you use SQl express (as the default installation), you will have a 5host and 50 VM limit, but I am runnig 6 guests right now without any problem! Any comment on this?
Another problem is to create the DSN. In data sources, I see that sql server and client installed nativle, but I get a timeout of the connection when I try to set up the system DSN. I have the firewall turned off, etc., but it's like there is a missing configuration... Do I have to install the native client anyway?
On the second option, I do not know if restoring the backup would be an adequate procedure...
PS: care of the machine: Win 2008 R1 x 64, Vcenter 4.1.
Thx a lot.
Yes it is possible.
-
Data Center migration of virtual machines and records from one data center to another.
So, I found an online script that migrates your inventory during one vCenter to another. I broke the script into two pieces that export (path of the folder path of the VM folder, permissions of folder and notes and custom attributes) and the other to import (create folders, move the virtual machines in the original folder, reset the permissions and set notes and custom attributes).
The export script works very well. I have problems with the import script. If I have the name of the duplicate folder in the tree view of the structure of the tree will get duplicated under each similar folder. i.e.
Exported folder structure
Portuagal-> football
Spain
> football> footballAny folder structure
Portugal
> football> footballSpain
> football> footballI guess I should somehow figure out the ID of file but don't have a clue where to start.
I rewrote the section import of files of the script to avoid the problem of duplicated folder. The new script detects the parent folder by starting to look at the record of the root instead of just the folder above where it should be created. Because the full path is in the .csv file it is possible. The following script should now work correctly:
##IMPORT FOLDERS $vmfolder = Import-Csv "c:\Folders-with-FolderPath-$($datacenter).csv" | Sort-Object -Property Path foreach($folder in $VMfolder){ $Path = $folder.Path.split("\") $PathLength = $Path.Length $SubFolder = Get-Datacenter $datacenter | Get-Folder vm For ($i= 1; $i -lt $PathLength-1; $i++) { $SubFolder = Get-Folder -Location $Subfolder -Name $Path[$i] } New-Folder -Name $folder.Name -Location $SubFolder }
Because the forum software has problem with hooks and contains the script, I have attached the vCenter_migration_import.ps1 script has changed.
Best regards, Robert
-
Windows 10 upgrade and Migration of virtual machines
I have a windows 7 with three Virtual Machines to test an Access application using different versions of Microsoft Office. I have been offered to upgrade, but want to know if my VMs will migrate along. I don't mind if they are Hyper-V, just that I do not lose the machines.
Thank you
Hi Mike,.
Your question is beyond the scope of what is generally answered in this forum of consumer and would be better suited for the IT Pro TechNet public.
Please post your question in the TechNet Forums.
Maybe you are looking for
-
Location iPhone 4S services dimmed after 9.2
I know that I have a dinosaur of the iPhone, but I love my little 4 of s. Just updated to iOS 9.2 and location services are grayed out. I can't find any setting process or restore. Thanks for all the ideas.
-
drivers for windows 7 (64 bit) for HP pavilion g6-2230tx
I need drivers for my pc of pavilion laptop g6-2230tx for windows 7 64 bit os. It was first available in the HP website, but now it's the display drivers only for windows 8 and 8.1. Please tell me where I can get these readers. ???
-
why I lose the internet connection when cut the power on my laptop?
When using the internet with my laptop plugged into the electrical outlet, I have a reliable internet connection. If I unplug my laptop and just use it on battery I keep losing my internet connection. I have a Toshiba Satellite L670 series.
-
Unable to perform the automatic backup in Windows Vista
Original title: backup: cannot get full backup. Having worked very well with backup of the years, it has now stopped sends monthly reminders to back up. If I have one starts manually, it runs only a full backup, which takes at least 24 hours. I check
-
What can I do? I am the administrator of the system. I have only two computers on the network: me and my wife! I tried everything... short to call M. Bill Gate!.. but nothing works... the message continues to come whenever I open a hyperlink embedded