This demonstration uses Red Hat CloudForms as a broker to drive virtual-to-virtual tools such as ovftool
and virt-v2v
to migrate VMs from VMware vSphere to Red Hat Virtualization. During the demostration, the resources need ot be mapped in order to perform the migration.
The initial mappings are related to the Virtualization capabilities, which in this case, we will use the following:
-
Point of Departure (POD): VMware vSphere
-
Point of Arrival (POA): Red Hat Virtualization
-
Point of Arrival type: RHEV
-
This way we define the origin and destination of the VMs taking into account the type of infrastucture where they will be hosted. There is work in progress to enable OpenStack as a valid Point of Arrival.
After this initial mapping, the VMs to be migrated will require the following information:
-
Attributes: specifying the type of migration to be performed on the VM
-
Tags: Identifying the VMs and assigning (if needed) the network configuration tranformation
-
Migration group: Name of the group of VMs to be migrated toghether. It is assigned in through the tags and attributes
All the mappings can be seen in CloudForms as a capability internally named Tags, which is extended information added to any of the objects being managed (VMs, Virtualizaiton Infrastructure, Cloud Infrastructures, etc).
Once everything id properly identified and mapped, t will allow us to prepare the full migration and execute it as a batch in an intervention window.
The migration is executed in two phases:
-
Pre-migration: VMs get checked to ensure that the migration will be successful. Once checks are passed they are taggeg as "pre-migration successful"
-
Migration: All the VMs with the successful pre-migration tag will be assigned to worker machines that will perform the migration.
-
Migrate several VMs from vSphere to Red Hat virtualization with a Red Hat Solution: Infrastructure Migration
NoteThe source VM’s are still maintained post migration and are not deleted. This allows for "failback" if a migration failure occurs.
Current versions of products used:
Product | Version |
---|---|
CloudForms |
4.5 |
Red Hat Virtualization |
4.1 |
VMware vSphere |
5.5 |
-
Firefox 17 or higher, or Chromium / Chrome
NoteInternet Explorer is not recommended. -
Adobe Flash 15 or higher must be enabled in Firefox or Chromium used for vCenter connectivity
-
SSH client
A full new demo environment is deployed on every request. To make the environment unique a 4 character identifier is assigned to it (i.e. 1a2b
), this identifier is referred in this documentation as GUID.
The demo environment consists of the following systems:
Hostname | Internal IP | External name | Description |
---|---|---|---|
|
|
N/A |
Virtual-to-Virtual Migration server |
|
|
workstation-<YOUR-GUID>.rhpds.opentlc.com |
Jump host and Ansible host |
|
|
workstation-<YOUR-GUID>.rhpds.opentlc.com |
NFS server |
|
|
cf-<YOUR-GUID>.rhpds.opentlc.com |
CloudForms server |
|
|
kvm-<YOUR-GUID>.rhpds.opentlc.com |
KVM hypervisor managed by Red Hat Virtualization |
|
|
rhvm-<YOUR-GUID>.rhpds.opentlc.com |
Red Hat Virtualization Manager server |
|
|
N/A |
ESXi hypervisor |
|
|
N/A |
ESXi hypervisor |
|
|
vcenter-<YOUR-GUID>.rhpds.opentlc.com |
VMware vCenter server |
-
Deployment of the demo environment which includes the following VMs provisioned in the vSphere environment:
-
jboss0
- a Red Hat Enterprise Linux 7 host running JBoss EAP -
jboss1
- a Red Hat Enterprise Linux 7 host running JBoss EAP -
lb
- a Red Hat Enterprise Linux 7 host running Nginx configured to proxy traffic tojboss0
andjboss1
-
db
- a Red Hat Enterprise Linux 7 host running PostgreSQL that thejboss0
andjboss1
application servers connect to
-
-
An external service is configured as https://app-<YOUR-GUID>.rhpds.opentlc.com pointing to the Load Balancer to make the Ticket Monster app accesible.
-
First time login, forgot login or password? Go to https://www.opentlc.com/account
-
Your username should NOT have an @ in it.
-
Partners MUST request access to RHPDS by sending an email to open-program@redhat.com.
-
Log in to the Red Hat Product Demo System with your provided credentials.
-
Go to Services → Catalogs.
-
Under All Services → Red Hat Solutions, select Infrastructure Migration Demo.
-
On the right pane, click Order.
-
Please, read carefully all of the information on the resulting page, check the box to confirm you understood the runtime warning message, and then click Submit.
Important-
It takes about 20 ~ 30 minutes for the demo to load completely and become accessible.
-
Wait for the full demo to load, even if some of its systems are marked "Up."
-
-
Watch for an email with information about how to access your demo environment.
-
Make note of the email’s contents: a list of hostnames, IP addresses, and your GUID.
-
Whenever you see <YOUR-GUID> in the demo instructions, replace it with the GUID provided in the email.
-
-
You can get real-time updates and status of your demo environment at https://www.opentlc.com/rhpds-status.
TipBe mindful of the runtime of your demo environment! It may take several hours to complete the demo, so you may need to extend the runtime. This is especially important in later steps when you are building virtual machines. For information on how to extend runtime and lifetime, see https://www.opentlc.com/lifecycle. -
-
Once the system is running, use SSH to access your demo server using your OPENTLC login name and private SSH key.
-
Using a Unix/Linux system:
$ ssh -i /path/to/private_key <YOUR-OpenTLC-USERNAME-redhat.com>@workstation-<YOUR-GUID>.rhpds.opentlc.com
-
Example for user 'batman' and GUID '1a2b', using the default ssh private key:
$ ssh -i ~/.ssh/id_rsa batman-redhat.com@workstation-1a2b.rhpds.opentlc.com
-
-
Become
root
using the provided password:$ sudo -i
-
Check the status of the environment using ansible:
# ansible all -m ping
This command establishes a connection to all the machines in the environment (except ESXi servers). In case the machines are up an running a success message, per each, will show up. This is an example of a success message for the VM jboss0.example.com:
jboss0.example.com | SUCCESS => { "changed": false, "ping": "pong" }
There are 4 VMs in the vCenter environment hosting an app with Nginx as loadbalancer, two JBoss EAP in domain mode, and a Postgresql database. To check only if these ones are running, you may use the following command:
# ansible app -m ping
-
Establish an SSH connection to the CloudForms server and monitor
automation.log
:# ssh cf.example.com # tail -f /var/www/miq/vmdb/log/automation.log
TipThe log entries are very long, so it helps if you stretch this window as wide as possible. NoteThe log entries can be also seen in the CloudFomrm web UI in Automation → Automate → Log. -
Verify that the Ticket Monster app is running:
-
Point your browser to https://app-<YOUR-GUID>.rhpds.opentlc.com and chek it is running:
-
Note
|
You must accept all of the self-signed SSL certificates. |
-
Prepare to manage the environment. From a web browser, open each of the URLs below in its own window or tab, using these credentials (except when noted):
-
Username:
admin
-
Password:
<to_be_provided>
NoteYou must accept all of the self-signed SSL certificates. -
Red Hat Virtualization Manager:
https://rhevm-<YOUR-GUID>.rhpds.opentlc.com
-
Navigate to and click Administration Portal and log in using
admin
,<to_be_provided>
, andinternal
.
-
-
vCenter:
https://vcenter-<YOUR-GUID>.rhpds.opentlc.com
-
Use
root
as the username to log in to vCenter. -
Click Log in to vSphere Web Client.
-
Flash Player is required.
TipModern browsers have flash player disabled by default. You may need to enable it for this page.
-
-
Click VMs and Templates.
-
-
CloudForms:
https://cf-<YOUR-GUID>.rhpds.opentlc.com
TipYou can also find these URLs in the email provided when you provisioned the demo environment.
-
-
On the CloudForms web interface, go to Compute → Infrastructure → Providers.
-
If you see an exclamation mark (!), or a cross (x) in a provider, check the provider’s box, go to Authentication → Re-check Authentication Status.
TipTake into account that vCenter may take longer to start. -
Go to Compute → Infrastructure → Virtual Machines → VMs → All VMs.
-
All VMs and Templates in both RHV and vSphere show as entities in CloudForms.
NoteIf you needed to validate providers, you may have to wait a few minutes and refresh the screen before the VMs show up. -
Select the pane VMs & Templates and, in it, the VMware provider.
-
Only the VMs and Templates in vSphere will show.
-
On the
cf
system, go to Compute → Infrastructure → Providers. -
Click RHV.
-
Select Policy → Edit Tags.
-
Select Point of Arrival and then select Rhev for the assigned value.
-
This sets this provider as an available Red Hat Virtualization destination.
-
-
Select the provider_type tag and select POA for the assigned value, then click Save.
-
This sets this provider as the current point of arrival.
-
-
Use CloudForms to shut down (not power off) the VMs to be migrated. Initially just
db
but, all VMs can be shut down (db
,jboss0
,jboss1
,lb
).TipIt can be verified that db
VM is down by running, in the terminal, in the workstation machine, the check command:# ansible db.example.com -m ping
For all application VMs (db
, jboss0
, jboss1
, lb
) the check command is:
# ansible app -m ping
-
On the
cf
system, go to Services → Catalogs and select the Service Catalogs pane. -
Under All Services → Import CSV, select Import Attributes.
-
On the right, click Order.
-
On the resulting screen, select
attribute_db.csv
in the Filename field and click Submit. -
Monitor
automation.log
on thecf
server. When the process is complete, continue with the next section. It can be done by establishing an SSH connection to the CloudForms server and watching the content ofautomation.log
:# ssh cf.example.com # tail -f /var/www/miq/vmdb/log/automation.log
NoteThe log entries can be also seen in the CloudForms web UI in Automation → Automate → Log. TipThe csv files for attributes can be accessed in the machine cf
under the folder/mnt/migrate/import_csv/attributes/
.
-
On the
cf
system, go to Services → Catalogs → Service Catalogs. -
Under All Services → Import CSV, select Import Tags.
-
On the right, click Order.
-
On the resulting screen, select
tag_db.csv
in the Filename field and click Submit. -
Monitor
automation.log
on thecf
server. When the process is complete, continue with the next section. It can be done by establishing an SSH connection to the CloudForms server and watching the content ofautomation.log
:# ssh cf.example.com # tail -f /var/www/miq/vmdb/log/automation.log
NoteThe log entries can be also seen in the CloudFomrm web UI in Automation → Automate → Log. TipThe csv files for attributes can be accessed in the machine cf
under the folder/mnt/migrate/import_csv/tags/
.
-
Go to Infrastructure → Providers → Virtual Machines → VMs → All VMs.
-
Navigate to the
db
VM. -
Under Custom Attributes, confirm that there is a custom attribute called
ip
with the value you provided inattribute_db.csv
. -
Under Smart Management, confirm that migrate_group is set to
demo2
and Point of Arrival is set toRhev
.
Before starting the migration a set of checks are run against the tagged VMs to facilitate a successful migration. Once the checks are passed, the VMs are tagged as check_premigrate_tag = true. The migration will not run on the VMs unles the machines have this tag assigned.
-
On the
cf
system, go to Services → Catalogs and choose the Service Catalogs pane. -
Under All Services → Migration, select Batch_PreMigrate.
-
On the right, click Order.
-
For Migration Group, select
demo2
. -
Verify in the VMs in Migration Group textbox that
db
is the only Vm displayed, and click Submit. -
Monitor
automation.log
in the terminal connected to CloudForms.# ssh cf.example.com # tail -f /var/www/miq/vmdb/log/automation.log
NoteThe log entries can be also seen in the CloudFomrm web UI in Automation → Automate → Log.
-
On the
cf
system, go to Services → Catalogs and choose the Service Catalogs pane. -
Under All Services → Migration, select Batch_Migrate.
-
On the right, click Order.
-
For Migration Group, select
demo2
. -
Verify in the VMs in Migration Group textbox that
db
is the only Vm displayed, and click Submit. -
Monitor
automation.log
in the terminal connected to CloudForms, and the Red Hat Virtualization Admin GUI closely.NoteThe log entries can be seen in the CloudFomrm web UI in Automation → Automate → Log. TipIt may be beneficial to open three separate sessions to the Migration server and run the following:
# watch find /mnt
# tail -f /mnt/migrate/ova/db.example.com/*log
# tail -f /mnt/migrate/ova/db.example.com/*err
NoteIt takes about 20 minutes for automation.log
to show that the service is complete.
-
Log in to the Red Hat Virtualization Admin GUI and open the console for the
db
VM that was migrated. -
Start the
db
VM and log in asroot
with the password<to_be_provided>
. -
Make sure the VM retained the IP address from
attribute_db.csv
and that it can resolve an external hostname.
-
Use CloudForms to shut down (not power off) the VMs to be migrated. Initially just
jboss0
andjboss1
but, all VMs can be shut down (db
,jboss0
,jboss1
,lb
).TipIt can be verified that jboss0
andjboss1
VM are down by running, in the terminal, in the workstation machine, the check command:# ansible jboss -m ping
For all application VMs (db
, jboss0
, jboss1
, lb
) the check command is:
# ansible app -m ping
-
On the
cf
system, go to Services → Catalogs and select the Service Catalogs pane. -
Under All Services → Import CSV, select Import Attributes.
-
On the right, click Order.
-
On the resulting screen, enter
attribute_jboss.csv
in the Filename field and click Submit. -
Monitor
automation.log
on thecf
server. When the process is complete, continue with the next section.NoteThe log entries can be seen in the CloudFomrm web UI in Automation → Automate → Log.
-
On the
cf
system, go to Services → Catalogs → Service Catalogs. -
Under All Services → Import CSV, select Import Tags.
-
On the right, click Order.
-
On the resulting screen, enter
tag_jboss.csv
in the Filename field and click Submit. -
Monitor
automation.log
on thecf
server. When the process is complete, continue with the next section.
-
On the
cf
system, go to Services → Catalogs and choose the Service Catalogs pane. -
Under All Services → Migration, select Batch_PreMigrate.
-
On the right, click Order.
-
For Migration Group, select
demo
. -
Verify in the VMs in Migration Group textbox that
db
is the only Vm displayed, and click Submit. -
Monitor
automation.log
in the terminal connected to CloudForms.# ssh cf.example.com # tail -f /var/www/miq/vmdb/log/automation.log
NoteThe log entries can be also seen in the CloudFomrm web UI in Automation → Automate → Log.
-
You now have the
db
server on VMware and the twojboss
servers on RHV Platform. -
The
lb
system remains on VMware
-
Use what you learned in this lab to migrate
lb
to RHV Platform (Tip: usedemo3
migration group)