Blog 20180501 Quick reinstallation of Nutanix Xtract
Howto quickly reinstall Nutanix
Xtract tool (nowadays called Move)
Nutanix Xtract is a
migration tool that makes life easier when one wants to migrate VMs or
databases from a VMware environment to the Nutanix Acropolis Hypervisor.
The tool is quite handy, intuitive in use and getting more mature each release (current latest is 1.1.4), though it does sometimes get broken (e.g. during an upgrade). In case this happens, the procedure below might help you out repairing it and is also an alternative installation method for a new version of the tool (besides the official upgrade method):
The tool is quite handy, intuitive in use and getting more mature each release (current latest is 1.1.4), though it does sometimes get broken (e.g. during an upgrade). In case this happens, the procedure below might help you out repairing it and is also an alternative installation method for a new version of the tool (besides the official upgrade method):
Method
[Note: Marked
text,
is the active input / action.]
a. Get the Nutanix Xtract install files
b. Copy the rpm file from the Nutanix Xtract install files with (e.g.) WinSCP
to the /tmp of the Xtract VM (appliance).
c. Make an SSH connection to the Xtract VM and enter the following commands:
[admin@xtract-for-vms postfix]$ rs
[sudo]
password for admin: enter
password
Last
login: Mon Nov 27 07:51:11 UTC 2017 on pts/0
Last
failed login: Tue Nov 28 13:58:56 UTC 2017 on pts/0
There
were 4 failed login attempts since the last successful login.
[root@xtract-for-vms
~]# yum erase xtract-vm
Loaded
plugins: fastestmirror
Resolving
Dependencies
-->
Running transaction check
--->
Package xtract-vm.x86_64 0:1.0.24-1 will be erased
--> Finished
Dependency Resolution
Dependencies
Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Removing:
xtract-vm x86_64 1.0.24-1 installed 383 M
Transaction
Summary
================================================================================
Remove 1 Package
Installed
size: 383 M
Is this
ok [y/N]: y
Downloading
packages:
Running
transaction check
Running
transaction test
Transaction
test succeeded
Running
transaction
Warning:
RPMDB altered outside of yum.
Build is
NOT running, so set PROJECT_VERSION to 1.0.24
Before
remove, SCRIPTS_PATH=/opt/xtract-vm/scripts/
Disabling
services that autostart on every boot...
Removed
symlink /etc/systemd/system/multi-user.target.wants/diskwriter.service.
Removed
symlink /etc/systemd/system/multi-user.target.wants/xtractforvmsapidocs.service.
Removed
symlink /etc/systemd/system/multi-user.target.wants/mgmtserver.service.
Removed
symlink /etc/systemd/system/multi-user.target.wants/diskreader.service.
Removed
symlink /etc/systemd/system/multi-user.target.wants/srcagent.service.
Removed
symlink /etc/systemd/system/multi-user.target.wants/upgradeserver.service.
Removed
symlink /etc/systemd/system/multi-user.target.wants/tgtagent.service.
Stopping
Xtract for VMs services...
●
diskreader.service - Xtract for VMs disk reader service
Loaded: loaded
(/etc/systemd/system/diskreader.service; disabled; vendor preset: disabled)
Active: inactive (dead)
--
●
diskwriter.service - Xtract for VMs disk writer service
Loaded: loaded
(/etc/systemd/system/diskwriter.service; disabled; vendor preset: disabled)
Active: inactive (dead)
--
●
srcagent.service - Xtract for VMs source agent service
Loaded: loaded
(/etc/systemd/system/srcagent.service; disabled; vendor preset: disabled)
Active: inactive (dead)
--
●
tgtagent.service - Xtract for VMs target agent service
Loaded: loaded
(/etc/systemd/system/tgtagent.service; disabled; vendor preset: disabled)
Active: inactive (dead)
--
●
mgmtserver.service - Xtract for VMs Management server
Loaded: loaded
(/etc/systemd/system/mgmtserver.service; disabled; vendor preset: disabled)
Active: inactive (dead)
--
●
xtractforvmsapidocs.service - Xtract for VMs API documentation service
Loaded: loaded
(/etc/systemd/system/xtractforvmsapidocs.service; disabled; vendor preset:
disabled)
Active: inactive (dead)
--
●
upgradeserver.service - Xtract for VMs upgrade service
Loaded: loaded
(/etc/systemd/system/upgradeserver.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Unmounting
existing mountpoints
Completed
un-mounting existing mountpoints, removed /opt/xtract-vm/datamover/
Build is
NOT running, so set PROJECT_VERSION to 1.0.24
Removing
users and groups...
Removed
user diskreader
Removed
user diskwriter
Removed
user srcagent
Removed
user tgtagent
Removed
user mgmtserver
Removed
user upgradeserver
Removed
user swagger
Removed
group vmxtract
Erasing
: xtract-vm-1.0.24-1.x86_64 1/1
Uninstalling,
so removing the postgresql data directory /var/lib/pgsql/9.6/data/...
Removed
/opt/xtract-vm...
Verifying
: xtract-vm-1.0.24-1.x86_64 1/1
Removed:
xtract-vm.x86_64 0:1.0.24-1
Complete!
[root@xtract-for-vms
~]# cd /tmp/
[root@xtract-for-vms
tmp]# ls
Fri_Nov_24_10_51_53_2017722003420
Fri_Nov_24_11_03_07_2017777616779
Fri_Nov_24_11_07_59_2017008376174
systemd-private-f4cee4a1718244d39f1a498fcb3a0d24-chronyd.service-8VFata
Tue_Nov_28_14_38_23_2017099828798
vmware-diskreader
xtract-vm-1.0.24-1.x86_64.rpm
[root@xtract-for-vms
tmp]# yum install
xtract-vm-1.0.24-1.x86_64.rpm
Loaded
plugins: fastestmirror
Examining
xtract-vm-1.0.24-1.x86_64.rpm: xtract-vm-1.0.24-1.x86_64
Marking
xtract-vm-1.0.24-1.x86_64.rpm to be installed
Resolving
Dependencies
-->
Running transaction check
--->
Package xtract-vm.x86_64 0:1.0.24-1 will be installed
-->
Finished Dependency Resolution
Dependencies
Resolved
================================================================================
Package
Arch Version Repository Size
================================================================================
Installing:
xtract-vm x86_64 1.0.24-1 /xtract-vm-1.0.24-1.x86_64 383 M
Transaction
Summary
================================================================================
Install 1 Package
Total
size: 383 M
Installed
size: 383 M
Is this
ok [y/d/N]: y
Downloading
packages:
Running
transaction check
Running
transaction test
Transaction
test succeeded
Running
transaction
Installing : xtract-vm-1.0.24-1.x86_64 1/1
Build is
NOT running, so set PROJECT_VERSION to 1.0.24
Setting
up user accounts after installation of version 1.0.24...
Build is
NOT running, so set PROJECT_VERSION to 1.0.24
Creating
users and groups...
Created
group vmxtract
Created
user diskreader with uid 2000
Created
user diskwriter with uid 2001
Created
user srcagent with uid 2002
Created
user tgtagent with uid 2003
Created
user mgmtserver with uid 2004
Created
user upgradeserver with uid 2005
Created
user swagger with uid 2006
Created
/opt/xtract-vm/coredumps /opt/xtract-vm/supportdumps
/opt/xtract-vm/datamover/...
Adding
users to sudoers...
tgtagent ALL= NOPASSWD: /bin/umount, NOPASSWD:
/bin/mount, NOPASSWD: /bin/chown, NOPASSWD: /bin/chgrp, NOPASSWD: /bin/chmod
mgmtserver ALL= NOPASSWD:
/opt/xtract-vm/scripts//support-dump.sh, NOPASSWD: /sbin/dmidecode
upgradeserver ALL= NOPASSWD: /bin/yum
Added
users to sudoers...
DEBUG:USERNAME=root
Setting
ownership of files/directories under /opt/xtract-vm to mgmtserver...
Setting
owner of /opt/xtract-vm/datamover/ to tgtagent...
Setting
owner of /opt/xtract-vm/bin//diskreader to diskreader...
Setting
owner of /opt/xtract-vm/bin//diskwriter to diskwriter...
Setting
owner of /opt/xtract-vm/bin//srcagent to srcagent...
Setting
owner of /opt/xtract-vm/bin//tgtagent to tgtagent...
Setting
owner of /opt/xtract-vm/bin//mgmt-server to mgmtserver...
Setting
owner of /opt/xtract-vm/bin//upgrade-server to upgradeserver...
Setting
owner of /opt/xtract-vm/bin//swagger to swagger...
Setting
permissions...
DEBUG:USERNAME=root
DEBUG:
DIRS=/opt/xtract-vm/lib64
/opt/xtract-vm/coredumps
/opt/xtract-vm/bin
/opt/xtract-vm/ui
/opt/xtract-vm/resources
/opt/xtract-vm/supportdumps
/opt/xtract-vm/scripts
Finished
setting permissions...
Running
post-install script after installation of version 1.0.24...
Build is
NOT running, so set PROJECT_VERSION to 1.0.24
DEBUG:
Using pg_ctl (PostgreSQL) 9.6.5 and psql (PostgreSQL) 9.6.5
The
files belonging to this database system will be owned by user
"postgres".
This
user must also own the server process.
The
database cluster will be initialized with locale "en_US.UTF-8".
The
default database encoding has accordingly been set to "UTF8".
The
default text search configuration will be set to "english".
Data
page checksums are disabled.
fixing
permissions on existing directory /var/lib/pgsql/9.6/data ... ok
creating
subdirectories ... ok
selecting
default max_connections ... 100
selecting
default shared_buffers ... 128MB
selecting
dynamic shared memory implementation ... posix
creating
configuration files ... ok
running
bootstrap script ... ok
performing
post-bootstrap initialization ... ok
syncing
data to disk ... ok
WARNING:
enabling "trust" authentication for local connections
You can
change this by editing pg_hba.conf or using the option -A, or
--auth-local
and --auth-host, the next time you run initdb.
Success.
You can now start the database server using:
/usr/pgsql-9.6/bin/pg_ctl -D
/var/lib/pgsql/9.6/data/ -l logfile start
●
postgresql-9.6.service - PostgreSQL 9.6 database server
Loaded: loaded
(/usr/lib/systemd/system/postgresql-9.6.service; enabled; vendor preset:
disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 7ms ago
--------------------------------------------------------------------------------
Running the db.sql script...
--------------------------------------------------------------------------------
+ cp
/opt/xtract-vm/resources//db.sql /var/lib/pgsql
+ chown
postgres:postgres /var/lib/pgsql/db.sql
+ su
postgres -c '/usr/pgsql-9.6/bin/psql --set PROJECT_VERSION=\'\''1.0.24\'\'' -f
~/db.sql'
CREATE
ROLE
CREATE
DATABASE
You are
now connected to database "datamover" as user "postgres".
SET
CREATE
FUNCTION
CREATE
FUNCTION
CREATE
FUNCTION
CREATE
TABLE
CREATE
TRIGGER
INSERT 0
1
CREATE
TABLE
CREATE
TRIGGER
CREATE
TABLE
CREATE
TRIGGER
CREATE
TABLE
CREATE
TABLE
CREATE
TABLE
CREATE
TRIGGER
CREATE
TABLE
CREATE
TABLE
CREATE
TABLE
CREATE
INDEX
CREATE
INDEX
CREATE
INDEX
CREATE
TRIGGER
CREATE
TRIGGER
CREATE
TRIGGER
INSERT 0
1
CREATE
TABLE
+ set +x
--------------------------------------------------------------------------------
TABLES :
--------------------------------------------------------------------------------
List of relations
Schema | Name |
Type | Owner
--------+-----------------------+----------+----------
public | appinfo | table | postgres
public | appinfo_id_seq | sequence | postgres
public | migrationplans | table | postgres
public | sourcedisks | table | postgres
public | sourcedisks_recid_seq | sequence |
postgres
public | sourceinfo | table | postgres
public | sourceinfo_recid_seq | sequence | postgres
public | sourcevms | table | postgres
public | sourcevms_recid_seq | sequence | postgres
public | targetinfo | table | postgres
public | targetinfo_recid_seq | sequence | postgres
public | tasks | table | postgres
public | tasks_recid_seq | sequence | postgres
public | tasksteps | table | postgres
public | tasksteps_recid_seq | sequence | postgres
public | telemetrydata | table | postgres
public | users | table | postgres
public | users_id_seq | sequence | postgres
(18
rows)
--------------------------------------------------------------------------------
USERS :
--------------------------------------------------------------------------------
id |
name | hashedpass | admin | createdtime | lastupdatedtime
----+---------+--------------------------------------------------------------+-------+-------------------------------+-------------------------------
1 | [removed] | [removed] | [removed] | 2017-11-28 15:49:58.399114+00 |
2017-11-28 15:49:58.399114+00
(1 row)
--------------------------------------------------------------------------------
Appinfo :
--------------------------------------------------------------------------------
id | state | appuuid | version | eulaaccepted
| telemetryon | createdtime | lastupdatedtime | clusteruuid
----+-------+---------+---------+--------------+-------------+-------------------------------+-------------------------------+-------------
1 |
0 | | 1.0.24 | f
| f | 2017-11-28
15:49:58.490847+00 | 2017-11-28 15:49:58.490847+00 |
(1 row)
Database
created...[OK]
Fixing
the authentication options...
PROJECT_VERSION
1.0.24 : Adding database debugging options
CREATE
EXTENSION
ALTER
ROLE
ALTER
ROLE
Restarting
postgresql...
●
postgresql-9.6.service - PostgreSQL 9.6 database server
Loaded: loaded
(/usr/lib/systemd/system/postgresql-9.6.service; enabled; vendor preset: disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3ms ago
Performing
configuration changes...
Generating
/opt/xtract-vm/.hermeskey...
[removed]
Generated
/opt/xtract-vm/.hermeskey...
/opt/xtract-vm/bin//mgmt-server
= cap_net_bind_service+ep
/opt/xtract-vm/bin//tgtagent
= cap_sys_admin+ep
Completed
configuration changes...
Enabling
services 'diskreader diskwriter srcagent tgtagent mgmtserver
xtractforvmsapidocs upgradeserver iptables' to autostart on every boot...
Created
symlink from /etc/systemd/system/multi-user.target.wants/diskreader.service to
/etc/systemd/system/diskreader.service.
Created
symlink from /etc/systemd/system/multi-user.target.wants/diskwriter.service to
/etc/systemd/system/diskwriter.service.
Created
symlink from /etc/systemd/system/multi-user.target.wants/srcagent.service to
/etc/systemd/system/srcagent.service.
Created
symlink from /etc/systemd/system/multi-user.target.wants/tgtagent.service to
/etc/systemd/system/tgtagent.service.
Created
symlink from /etc/systemd/system/multi-user.target.wants/mgmtserver.service to
/etc/systemd/system/mgmtserver.service.
Created
symlink from
/etc/systemd/system/multi-user.target.wants/xtractforvmsapidocs.service to
/etc/systemd/system/xtractforvmsapidocs.service.
Created
symlink from /etc/systemd/system/multi-user.target.wants/upgradeserver.service
to /etc/systemd/system/upgradeserver.service.
--------------------------------------------------------------------------------
Starting
Xtract for VMs services 'diskreader diskwriter srcagent tgtagent mgmtserver
xtractforvmsapidocs upgradeserver iptables'...
--------------------------------------------------------------------------------
●
diskreader.service - Xtract for VMs disk reader service
Loaded: loaded
(/etc/systemd/system/diskreader.service; enabled; vendor preset: disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3s ago
●
diskwriter.service - Xtract for VMs disk writer service
Loaded: loaded (/etc/systemd/system/diskwriter.service;
enabled; vendor preset: disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3s ago
●
srcagent.service - Xtract for VMs source agent service
Loaded: loaded
(/etc/systemd/system/srcagent.service; enabled; vendor preset: disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3s ago
●
tgtagent.service - Xtract for VMs target agent service
Loaded: loaded
(/etc/systemd/system/tgtagent.service; enabled; vendor preset: disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3s ago
●
mgmtserver.service - Xtract for VMs Management server
Loaded: loaded
(/etc/systemd/system/mgmtserver.service; enabled; vendor preset: disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3s ago
●
xtractforvmsapidocs.service - Xtract for VMs API documentation service
Loaded: loaded
(/etc/systemd/system/xtractforvmsapidocs.service; enabled; vendor preset:
disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3s ago
●
upgradeserver.service - Xtract for VMs upgrade service
Loaded: loaded
(/etc/systemd/system/upgradeserver.service; enabled; vendor preset: disabled)
Active: active (running) since Tue
2017-11-28 15:49:58 UTC; 3s ago
Started
services...
Installation
completed... [OK]
Verifying : xtract-vm-1.0.24-1.x86_64 1/1
Installed:
xtract-vm.x86_64
0:1.0.24-1
Complete!
[root@xtract-for-vms
tmp]#
Regards
Walter Rhee
Technical Consultant @ NEXXT
Regards
Walter Rhee
Technical Consultant @ NEXXT
Comments
Post a Comment