-
- Novice
- Posts: 6
- Liked: never
- Joined: Jul 01, 2015 11:27 pm
- Full Name: Simon McMannis
- Contact:
Migration from no hypervisor access
Hello,
I have an interesting project that I need some possible assistance and need to see if there is a solution to the problem I have.
I have a customer that is currently running about 36 VMs in a hosted environment.
This environment is running on VMware ESX 6.5.
We have no access to the Hypervisor and need to migrate all servers across to a new hosted platform running VMware ESX 6.0
We do have limited access to the the hypervisor and have limited access to restore VMs.
Both networks are connected over an MPLS network and can directly talk to each other.
Originally the plan was to run Veeam agent over the network to a server with a large disk, run incrementals until cut over day, then individually restore each server into a newly created VM.
Clearly for 36 VMs this will be slow.
Does anyone have any ideas to use Veeam to be able to create VMs directly in ESX from Veeam agent backups, or any other idea to be able to backup VMs using an agent and restoring simply, without having to manage manually and individually?
Thanks
SM
I have an interesting project that I need some possible assistance and need to see if there is a solution to the problem I have.
I have a customer that is currently running about 36 VMs in a hosted environment.
This environment is running on VMware ESX 6.5.
We have no access to the Hypervisor and need to migrate all servers across to a new hosted platform running VMware ESX 6.0
We do have limited access to the the hypervisor and have limited access to restore VMs.
Both networks are connected over an MPLS network and can directly talk to each other.
Originally the plan was to run Veeam agent over the network to a server with a large disk, run incrementals until cut over day, then individually restore each server into a newly created VM.
Clearly for 36 VMs this will be slow.
Does anyone have any ideas to use Veeam to be able to create VMs directly in ESX from Veeam agent backups, or any other idea to be able to backup VMs using an agent and restoring simply, without having to manage manually and individually?
Thanks
SM
-
- Veteran
- Posts: 3077
- Liked: 455 times
- Joined: Aug 07, 2018 3:11 pm
- Full Name: Fedor Maslov
- Contact:
Re: Migration from no hypervisor access
Hi Simon,
Welcome to Veaam Community Forums and thanks for posting!
Could you please let us know what kind of access you do have on the hypervisor and guest OS of the VMs residing on it?
Thanks
Welcome to Veaam Community Forums and thanks for posting!
Could you please let us know what kind of access you do have on the hypervisor and guest OS of the VMs residing on it?
Thanks
-
- Product Manager
- Posts: 14844
- Liked: 3086 times
- Joined: Sep 01, 2014 11:46 am
- Full Name: Hannes Kasparick
- Location: Austria
- Contact:
Re: Migration from no hypervisor access
Hello,
your general idea was to use bare metal restore, correct?
If you have "upload to datastore" and some other permissions on the restore infrastructure, then you could automate a little bit. There is the Start-VBRRestoreVirtualDisks CMDlet which you could use for the actual restore. Next you could create VMs with powercli (or manually as it is "only" 36) and attach restored disks to the VMs.
Best regards,
Hannes
your general idea was to use bare metal restore, correct?
If you have "upload to datastore" and some other permissions on the restore infrastructure, then you could automate a little bit. There is the Start-VBRRestoreVirtualDisks CMDlet which you could use for the actual restore. Next you could create VMs with powercli (or manually as it is "only" 36) and attach restored disks to the VMs.
Best regards,
Hannes
-
- Novice
- Posts: 6
- Liked: never
- Joined: Jul 01, 2015 11:27 pm
- Full Name: Simon McMannis
- Contact:
Re: Migration from no hypervisor access
Wishr,
Down here in Australia, we are using Telstra's cloud platform that is a managed hardware and network solution, so we have vCenter access, but have limited capability. We can create and edit VMs without issue, but have limited access to restore VMs to the cluster. Apparently we can restore using Veeam and Veeam replication.
Are there particular features you are thinking about?
Hannes,
How does the Start-VBRRestoreVirtualDisks command work? Is this a Veeam agent based command, or do we need Veeam B&R for that?
I dont mind creating the VMs manually if required (dont know if we have PowerCLI capability - Lets assume not), just want to try to automate the restores as that will be the most time consuming part when cutover happens, as of course we want to reduce the downtime.
Upload to datastore should be available.
The permission are in this document - https://cloud.telstra.com/res/pdf/virtu ... -guide.pdf starting on page 38 - Datastore permissions are on page 40.
I am not exactly sure on restrictive permissions for VMware exactly, so any guidance you guys can provide would be great.
Thanks
SM
Down here in Australia, we are using Telstra's cloud platform that is a managed hardware and network solution, so we have vCenter access, but have limited capability. We can create and edit VMs without issue, but have limited access to restore VMs to the cluster. Apparently we can restore using Veeam and Veeam replication.
Are there particular features you are thinking about?
Hannes,
How does the Start-VBRRestoreVirtualDisks command work? Is this a Veeam agent based command, or do we need Veeam B&R for that?
I dont mind creating the VMs manually if required (dont know if we have PowerCLI capability - Lets assume not), just want to try to automate the restores as that will be the most time consuming part when cutover happens, as of course we want to reduce the downtime.
Upload to datastore should be available.
The permission are in this document - https://cloud.telstra.com/res/pdf/virtu ... -guide.pdf starting on page 38 - Datastore permissions are on page 40.
I am not exactly sure on restrictive permissions for VMware exactly, so any guidance you guys can provide would be great.
Thanks
SM
-
- Product Manager
- Posts: 14844
- Liked: 3086 times
- Joined: Sep 01, 2014 11:46 am
- Full Name: Hannes Kasparick
- Location: Austria
- Contact:
Re: Migration from no hypervisor access
Hello,
I assume that you have centrally managed agent backup with Backup & Replication in place. Is that correct?
So you have two options:
1) bare metal restore
2) export the disks from the agent backups to VMware and create a VM from that (this can be automated as mentioned before. Just use the link I posted for the command. It describes everything. )
Both options do not really reduce downtime. We have no way to replicate agents like we can do for VMs.
The best option is that you just test which is more comfortable for you.
If you don't feel comfortable with powershell, I suggest to do it manually. It's only 36 VMs and it is faster to do it manually than learning powershell.
Best regards,
Hannes
I assume that you have centrally managed agent backup with Backup & Replication in place. Is that correct?
So you have two options:
1) bare metal restore
2) export the disks from the agent backups to VMware and create a VM from that (this can be automated as mentioned before. Just use the link I posted for the command. It describes everything. )
Both options do not really reduce downtime. We have no way to replicate agents like we can do for VMs.
The best option is that you just test which is more comfortable for you.
If you don't feel comfortable with powershell, I suggest to do it manually. It's only 36 VMs and it is faster to do it manually than learning powershell.
Best regards,
Hannes
-
- Novice
- Posts: 6
- Liked: never
- Joined: Jul 01, 2015 11:27 pm
- Full Name: Simon McMannis
- Contact:
Re: Migration from no hypervisor access
Thanks for your responses.
I actually worked out a good process that I could automate a fair bit.
Using B&R as the backup manager, I wrote a script that get the backup job based on the server name, then gets the job details, the disks, restore point then converts the disks to VMDKs.
The script then renames the files, connects to vCenter, creates a VM with specific parameters, copies the disks, scans the datastore for the disks, attaches the disks and some final config.
Below is the PowerShell script I created and tested.
Should have nice clean output, but could be simplified slightly, or possibly expanded to ask more questions or do a couple more things...
There are some components in there specific to our environment that may not be needed.
I'd love to know some thoughts on it...
-------------------------------------------------
-------------------------------------------
Thanks
SM
I actually worked out a good process that I could automate a fair bit.
Using B&R as the backup manager, I wrote a script that get the backup job based on the server name, then gets the job details, the disks, restore point then converts the disks to VMDKs.
The script then renames the files, connects to vCenter, creates a VM with specific parameters, copies the disks, scans the datastore for the disks, attaches the disks and some final config.
Below is the PowerShell script I created and tested.
Should have nice clean output, but could be simplified slightly, or possibly expanded to ask more questions or do a couple more things...
There are some components in there specific to our environment that may not be needed.
I'd love to know some thoughts on it...
-------------------------------------------------
Code: Select all
#Required VM information
Write-Host "Make sure that backup job is named same as VM name" -ForegroundColor Yellow
$vmName = Read-Host "`nWhat is the VM name?"
$CPU = Read-Host "How many CPUs for new VM"
$Mem = Read-Host "How much memory in new VM?"
$NewIP = Read-Host "New IP subnet? 17, 18, 22 or 1 (for DMZ)"
#Check network requirement
Write-Host "`nDefining required network..."
If ($NewIP -eq '17') {
$network = "vxw-dvs-10-virtualwire-2-sid-99501-172.17.1.0_24-pri"
} elseif ($NewIp -eq '18') {
$network = "vxw-dvs-10-virtualwire-5-sid-99504-172.18.1.0_24-pri"
} elseif ($NewIP -eq '22') {
$network = "vxw-dvs-10-virtualwire-3-sid-99502-172.22.1.0_24-pri"
} elseif ($NewIP -eq '1') {
$network = "vxw-dvs-10-virtualwire-4-sid-99503-DMZ-L2"
}
Write-Host "`nSetting up powershell..."
$ProgressPreference = 'SilentlyContinue'
Add-PSSnapin VeeamPSSnapin | Out-Null
$NULL = Import-Module -Name VMware.PowerCLI
###### vCenter component #######
#Connect to vCenter
Write-Host "`nConnecting to vCenter server..."
Connect-VIServer -Server 10.x.x.x -User "admin" -Password "password"
#Set Datastore Information
Write-Host "`nSetting Cluster information..."
$cluster = "clay-sm-clust001"
$store = "clay-sm-actdat002"
$ds = "vmstore:\clay-sm-dc001\${store}\"
$vmStore = "${ds}\${vmName}"
#Create new server VM
Write-Host "`nCreating new Virtual Server..."
New-VM -Name $vmName -Datastore $store -NumCPU $CPU -MemoryGB $Mem -NetworkName $network -ResourcePool $cluster | Out-Null
###### Veeam component #######
Write-Host "`nGetting backup job details for ${vmName}..."
#Set Veeam server
$server = Get-VBRServer -Name "VEEAM-SERVER"
#Set folder path
$fileLoc = "F:\Restored_Disks\${vmName}"
#Get VM job information and restore point
Write-Host "`nGet backup job info for ${vmName}..."
$vm = Get-VBRJob | where {$_.Name -EQ $vmName} | Get-VBRJobObject
$restorepoint = Get-VBRBackup | where {$_.BackupPolicyTag -eq $vm.JobId} | Get-VBRRestorePoint | Sort-Object -Property CreationTime | Select -Last 1
#Convert restore point to VMDK file locally
Write-Host "`nConverting latest restore of ${vmName}..." -ForegroundColor Green
Start-VBRRestoreVirtualDisks -RestorePoint $restorepoint -Server $server -Path $fileLoc -RestoreDiskType VMDK | Out-Null
#Wait a few seconds before renaming
Sleep 5
#Rename files
Write-Host "`nRenaming disk files..."
Get-ChildItem $fileLoc | rename-item -NewName { $vmName + "-" + $_.Name }
#Update vmdk disk pointer file to include new disk name
Write-Host "`nUpdating disk file pointer file..."
$diskFiles = Get-ChildItem $fileloc | where {$_.Length -lt 1000}
foreach ($dfile in $diskFiles) {
(Get-Content $fileLoc\$dfile | ForEach-Object {$_ -replace "FLAT `"", "FLAT `"${vmName}-"}) | Set-Content $fileLoc\$dfile
}
###### vCenter component #######
#Copy converted disk folder
Write-Host "`nCopying Converted VM Disks..." -ForegroundColor DarkGreen
Copy-DatastoreItem -Item $fileLoc\* -Destination $vmStore -Recurse
#Delete Converted files
Write-Host "`nDeleting Converted VM Disks..."
Remove-Item $fileLoc -Force -Recurse
#Remove default auto created disk
Write-Host "`nDeleting default disk..."
Get-HardDisk $vmName | Remove-HardDisk -Confirm:$false
#Get the newly copied disk files
Write-Host "`nGetting converted VM Disks..."
$matchName = $vmName + "-1*"
$VMdisks = Get-HardDisk -Datastore $store | where {$_.Name -like $matchName}
#How many disks exist?
$diskCount = $VMdisks.Count
$VMdisks = $VMdisks | Sort
Write-Host "`nFound ${diskCount} required VM Disks..."
#Add SCSI controller and initial disk
Sleep 3
Write-Host "`nAttaching VM Disks..."
Get-Vm $vmName | New-harddisk -DiskPath $vmdisks[0].Filename | New-ScsiController -Type VirtualLsiLogicSAS | Out-Null
#Add any additional disks
If ($diskCount -ge 2) {
Get-Vm $vmName | New-harddisk -DiskPath $vmdisks[1].Filename | Out-Null
}
If ($diskCount -ge 3) {
Get-Vm $vmName | New-harddisk -DiskPath $vmdisks[2].Filename | Out-Null
}
If ($diskCount -ge 4) {
Get-Vm $vmName | New-harddisk -DiskPath $vmdisks[3].Filename | Out-Null
}
#Move VM into correct cluster folder
Write-Host "`nMoving VM to correct folder..."
$NULL = Move-VM -VM $vmName -Destination "Customer virtual machines"
#Set correct network card type
Write-Host "`nChanging NIC to VMXNET3..."
Get-VM -Name $vmName | Get-NetworkAdapter | Set-NetworkAdapter -Type VMXNET3 -Confirm:$false | Out-Null
Write-Host "`nComplete"
Pause
Thanks
SM
Who is online
Users browsing this forum: No registered users and 18 guests