Friday, June 28, 2019

Conducting hot P2V migrations with VMware Converter

Conducting hot P2V migrations with VMware Converter

Preparation is the key to help prevent physical-to-virtual, or P2V, migration failures with VMware Converter. In this tip, I'll give you step-by-step instructions on how to prepare your server for a hot clone. (Most of these steps can be skipped with cold clones, as the server's OS is not running during the conversion.)
In a previous installment of this series, we talked about
What VMware Converter will do, hot cloning (which is when you make a P2V migration while the server is still online) vs. cold cloning (which is when you migrate after the server is offline), and which servers you should probably stay away from when using VMware Converter.
Below are the steps you should take to prepare your server for conversion.
  1. Install the Converter application on the server being migrated. If you are using the Enterprise version you can do this remotely, but my preference is to install Converter direcly on to the server a potential complication caused by introducing another PC in the conversion process. If you have many machines to convert this is not always practical. The Converter application consists of two parts, the Agent component (Windows service) and the Manager component (front end GUI). If you are running this on the server directly you need both components. Otherwise if you are running it remotely only the Agent component is needed.
  2. Once you install the application on the server a reboot will be required if the server OS is Windows NT 4.0 or 2000. This is because a special driver is installed for the cloning process on those OS's, Windows XP and 2003 utilize the Volume Shadow Copy service instead. Also, it's best to use a local administrator account when logging into the server to install the application.
  3. The following Windows services must be running for Converter to work properly: Workstation, Server, TCP/IP Netbios Helper and Volume Shadow Copy (Windows XP/2003, can be set to manual, just not disabled). Also, disable Windows Simple File Sharing if your source server is running Windows XP.
  4. Make sure the VMware Converter Windows service is running.
  5. Ensure you have at least 200 MB free on your source server's C drive. Mirrored or striped volumes across multiple disks should be broken; hardware RAID is OK since it is transparent to the operating system. Converter sometimes has issues converting dynamic disks, if you experience problems with them, then cold clone instead.
  6. Disable any antivirus software running on the source server.
  7. Shutdown any applications that are not needed on the server.
  8. Run chkdsk and defragment your source server's hard disks.
  9. Clean-up any temporary and unnecessary files on the source server. The less data that needs to be copied the better. This only applies when utilizing file level cloning (more on that later).
  10. Keep users off the server while cloning. Disable remote desktop and any shares if possible.
  11. Ensure required TCP/UDP ports are opened between the source server and VirtualCenter (VC) and VMware ESX. Even if you select VirtualCenter as your destination, the ports still need to be opened to the ESX server you choose. The source server first contacts VC to create the VM and then ESX to transfer the data to. Required ports are 443 and 902 (source to ESX/VC) and 445 and 139 (converter to source and source to Workstation/Server). These ports need to be opened on both OS firewalls and any network firewalls sitting between your source and destination servers.
  12. Ensure your network adapter speed/duplex matches your physical switch setting. This can have a dramatic effect on your conversion speed. When cold cloning it's best to set your physical switch port to Auto/Auto since this is what the Windows PE ISO will default to.
  13. If importing a VM or physical image the Windows version of the server running Converter must be equal to or greater then the source. So, if your source is Windows 2003, the server running Converter cannot be Windows 2000.
  14. For cold cloning, the minimum memory requirements is 264 MB (will not work with less then this amount), the recommended memory is 364 MB. Converter also utilizes a RAM disk if you have at least 296 MB of memory available.
Making the conversion
With these steps complete, we're ready to get started. Start the Converter Manager application and click the Import Machine button to start the Converter Wizard. Select your Source server, in this example we will choose Physical Computer. Select This Local Machine if running Converter on the source server, otherwise enter the hostname/IP and login information of the server to be converted. At the Source Data screen you have the option to select your disk volumes and re-size then larger or smaller if needed. Make sure you do not select any small utility partitions created by your hardware installation. What you decide here will determine which disk cloning method is used to copy your source data. If you do not change your drive sizes or increase them, then a block-level clone will be performed. If you decrease the size of your drives by any amount then a file-level clone will be performed instead.
When a block-level clone is performed, data is transferred from the source server disk to the destination server disk block-by-block. This method is faster but results in more data being copied (even empty disk blocks are copied). When a file-level clone is performed, data is instead transferred file-by-file, which is slower but results in less data being copied. So if you only have 5 GB of data on a 40 GB drive, then only the 5 GB is copied. It's a trade-off between the two methods between faster transfer speed versus reduced data size which often results in about the same time to copy the data. One potential caveat with the file-level copy is if you have a server with a huge amount of small files, it can take days to copy the data, and will sometimes fail. I experienced a server with 200,000+ 2 K files in one directory which brought the conversion to a crawl. Once I removed these files it completed in a few hours.
Next choose your destination server which is typically VirtualCenter (VC)/ESX. If you have a VC server managing a destination ESX server, it is best to choose the VC server first. Continue entering a VM name, host and datastore; at the Networks screen you can select one or more NIC's and networks to connect to.
My preference is to first connect the VM to an Internal Only vSwitch so it is isolated from the source server and I can power it on while the source server is still up. Once I verify that the newly created VM is functioning properly and I go through the post-clone procedures, I shutdown the source server and move the VM to the same network that the source server was on.
Finally select whether or not to install VMware Tools, enter any OS customization if necessary, select whether or not to power on the VM right after the conversion completes and click the Finish button to start the conversion process. Once the conversion starts you can monitor the progress in the task progress window.
In our final part to this series we will discuss troubleshooting failed conversions and post-conversion procedures.

Tuesday, June 25, 2019

Issue with Robots Missing Path


  è To Check Robots with missing path
o   Java GUI
n  Under Media and Device Mgmt àUnder Devices àSelect Robots
o   Command
n  /usr/openv/volmgr/bin/tpconfig –d
80  Drive161   hcart3 TLD(6)  DRIVE=7             /dev/nst27                                                       UP
81  Drive162             hcart3 TLD(6)  DRIVE=8   /dev/nst28                                                       UP
82  Drive108             hcart3 TLD(6)  DRIVE=9   /dev/nst29                                                       UP

Currently defined robotics are:
  TLD(1)     robotic path = /dev/sg291
  TLD(3)     robotic path = /dev/sg76
  TLD(4)     robotic path = /dev/sg52
  TLD(5)     robotic path = /dev/sg98
  TLD(6)     robotic path = /dev/sg87
  TLD(7)     robotic path = /dev/sg74

EMM Server = usvhvoilms001
 or
/usr/openv/volmgr/bin/tpconfig -l
  èDelete the robot with missing path either java GUI or Command
o   Java GUI (Recommended)
n  Under Media and Device Mgmt àUnder Devices àSelect Robots àSelect the robot with missing path  àRight Click and Select Delete
o   Command
n  /usr/openv/volmgr/bin/tpconfig –delete  -robot <robot number>
  èRestart Media Manager processes.
  èIf received any error while deleting robot, please follow this steps
o   Please check any resource holding this robot using this command
n  /usr/openv/netbackup/bin/admincmd/nbrbutil –dump
n  If you see any resource holding this robot please use this command to release it nbrbutil -resetMediaServer <media server name>
or
nbrbutil -releaseMDS
nbrbutil -releaseMedia

  èCheck the robot at Operating System Level
o   /usr/openv/volmgr/bin/scan
o   /usr/openv/volmgr/bin/tpautoconf –r
o   cat /proc/scsi/scsi
If found robot at OS level, please run Device Config Wizard on Master server and rescan the devices on master server and follow the on screen steps to add the robot.

èRestart Media Manager processes.
  èTo Confirm Robot is added
o   Java GUI
n  Under Media and Device Mgmt àUnder Devices àSelect Robots
o   Command
n  /usr/openv/volmgr/bin/tpconfig –d or
/usr/openv/volmgr/bin/tpconfig -l
  èTo Test the robot
o   Use /usr/openv/volmgr/bin/robtest.

Netbackup Important Commands and Explanations



Master Server
1) Check the license details
/usr/openv/netbackup/bin/admincmd/get_license_key
2) Stop and Start the netabackup services
i) /etc/init.d/netbackup stop (start)               —>  graceful stop and start
ii) /usr/openv/netbackup/bin/bp.kill_all      —> Stop backup including GUI sessions, ungraceful
iii) /usr/openv/netbackup/bin/bp.start_all   —> Start the backup                                        iv) /usr/openv/netbackup/bin/initbprd         —> starts the master server
v) /usr/openv/netbackup/bin/vmd                —> starts the media server
vi) /usr/openv/netbackup/bin/jnbSA             —> Starts the GUI sessions
3) Scan the tape devices
#sgscan (in  Solaris)                                                                                                          #/usr/openv/volmgr/bin/scan (in AIX)
4) Display all the netbackup process
#bpps –x
5) Check the backup status
In GUI —>  Activity monitor
In CLI —>  #bpdbjobs -report
6) Lists the server errors
#bperror
#bperrror –U –problems –hoursago 1
#bperror –U –backstat -by_statcode -hoursago 1
7) Display information about the error code
#bperror –S <statuscode>
8) Reread bp.conf file without stop/start the netbackup
#bprdreq -rereadconfig

Media Server (starts with bpxxx )
1) List the storage units
#bpstulist –U
2) List media details
# /usr/openv/netbackup/bin/goodies/available_media
This cmd is retrieving all info about media that is available/full/expired/Frozen
3) List all the netbackup jobs
#bpdbjobs –report <hoursago>
4) Freeze or Unfreeze media
In GUI,
In CLI, #bpmedia –unfreeze [-freeze] –ev <media ID>
5) List media details
#bpmedialist -ev <media ID>                                                                                                          6) List the media contents
#bpmedialist –U –mcontents –m <mediaID>
7) List the information about NB images on media
#bpimmedia –mediaid <ID> -L
8) List backup image information
#bpimagelist -U (general)
# bpimagelist -media –U (for media)
9) Expire a tape
# bpexpdate –d 0 –ev <mediaID> -force
10) Expire client images
#bpimage –cleanup –allclients
11) Which tapes are used for taking backup
In GUI, Backup and Restore –> Find the Filesystem –> Preview Media Button
In CLI, #bpimagelist –media –U

Volume Commands (starts with vmxxx)
1) Tape Drive (vmoprcmd)
1) List the drive status, detail drive info and pending requests
In GUI, Device mgmt
In CLI, #vmoprcmd
#vmoprcmd –d ds (status)
#vmopcrmd –d pr (pending requests)
2) Control a tape device
In GUI, Device mgmt
In CLI, #vmoprcmd [-reset] [-up] [-down] <drive number>
2) Tape Media commands (vmpool,vmquery,vmchange,vmdelete)
1) List all the pools
In CLI, #vmpool –listall -bx
2) List the scratch pool available
#vmpool -list_scratch
3) List tapes in pool
In GUI,
In CLI, #vmquery –pn <pool name> -bx                                                                                      4) List all tapes in the robot
In GUI,
In CLI, #vmquery –rn 0 –bx
5) List cleaning tapes
In CLI, #vmquery –mt dlt_clean –bx
6) List tape volume details
#vmquery –m <media ID>
7) Delete a volume from the catalog
#vmdelete –m <mediaID>
8) Changes a tapes expiry date
#vmchange -exp 12/31/2012 hr:mm:ss –m <media ID>
9) Changes a tape’s media pool
#vmchange -p <pool number> -m <media ID>
3) Tape/Robot commands (starts with tpxxx)
1) List the tape drives
#tpconfig –d
2) List the cleaning times on drives
#tpclean -L
3) Clean a drive
#tpclean –C <drive number>

Client Commands
i) List the clients
#bpplclients

Policy Commands
i) List the policies
#bppllist –U
ii) List the detailed information about the policies
#bpplist –U -allpolicies

Netbackup Cheat Sheet


Master Server Daemons/Processes
Request daemon
bprd
Scheduler
bpsched (started with bprd)
Netbackup database manager
bpdbm (started with bpsched)
Job Monitor
bpjobd (started with bpdbm)
Media Server Daemons/Processes
Communications daemon
bpcd
Backup and restore manager
bpbrm (started with bpcd)
Tape Manager
bptm (started with bpbrm)
Disk Manager
bpdm (started with bpbrm)
Media Manager
ltid
Bar code reader
avrd (started with ltid)
Remote device management/ controls volume database
vmd (started with ltid)
Roboticdaemon (one on each media server) talks to tldcd
tldd (started with ltid)
Robotic control daemon talks to the robot directl via scsi
tldcd (started with ltid)
Catalogs
Master Server
Information about backed-up files
image - /opt/openv/netbackup/db
Storage Unit, Global Configuration, Catalog backup configuration.
config - /opt/openv/netbackup/db
Backup Policy information
class - /opt/openv/netbackup/db
Job status information
jobs - /opt/openv/netbackup/db
Netbackup logs with error and status information
error - /opt/openv/netbackup/db
Information on volumes, volume pools, scratch pool and volume groups
volume - /opt/openv/volmgr/database
Media Server
Tracks assigned volumes (media that has data them)
media - /opt/openv/netbackup/db
Information about devices managed by the media server
device - /opt/openv/volmgr/database
Log and Information Files
Netbackup and Patch versions
/opt/openv/netbackup/bin/version
Media Version
/opt/openv/volmgr/version
Patch Level history
/opt/openv/netbackup/patch/patch.history
Buffer size
/opt/openv/netbackup/db/config/SIZE_DATA_BUFFERS
Number of buffers
/opt/openv/netbackup/db/config/NUMBER_DATA_BUFFERS
Network Buffer Size
/opt/openv/netbackup/NET_BUFFER_SZ (default = 32)
Java GUI authorisation
/opt/openv/java/auth.conf
Catalog type (binary or ASCII)
/opt/openv/netbackup/db/config/cat_format.cfg
Netbackup and media manager parameter files
/opt/openv/netbackup/bp.conf
/opt/openv/volmgr/vm.conf
Corrupt Database image files (5.0 and above)
/opt/openv/netbackup/db.corrupt
Server Commands
Check license details
/opt/openv/netbackup/bin/admincmd/get_license_key
Start Netbackup
netbackup start

/opt/openv/netbackup/bin/initbprd (master)
/opt/openv/volmgr/bin/vmd (media)
Stop Netbackup (does not disconnect GUI sessions)
netbackup stop
/opt/openv/netbackup/bin/admincmd/bprdreq -terminate (master)
/opt/openv/netbackup/bin/bpdbm -terminate (master)
Stop Netbackup and kill all GUI sessions
/opt/openv/netbackup/bin/goodies/bp.kill_all
Start the GUI
/opt/openv/netbackup/bin/jnbSA
Scan for tape devices
sgscan (solaris)
ioscan (HPUX)
Display all Netbackup processes
bpps -a
lists servers errors
bperror -U -problems -hoursago <number of hours>
bperror -U -backstat -by_statcode -hoursago <number of hours> 
display information on a error code
bperror -statuscode <statuscode> [-recommendation]
Reread bp.conf file without stopping Netbackup
bprdreq -rereadconfig
Check database consistency
bpdbm -consistency 1
bpdbm -consistency 2
Check for the below lines:
Bad image header
Does not exist
Netbackup Recovery
Device catalog is intact
bprecover -l -m <media ID> -d dlt (listing)
bprecover -r -m <media ID> -d dlt (recovering)
Device catalog is gone or corrupted
bprecover -l -tpath <tape_path> (listing)
bprecover -r -tpath <tape_path> (recovering)
Disk backups
bprecover -l -dpath <disk_path> (listing)
bprecover -r -dpath <disk_path> (recovering)
Volume Commands
Tape Drive and Inventory Commands
List drive status, detail drive info and pending requests
vmoprcmd
List the tape drive status
vmoprcmd -d ds
List the pending requests
vmoprcmd -d pr
Control a tape device
vmoprcmd [-reset][-up][-down] <drive number>
List all changes in the robot(but do not update)
vmupdate -recommend -rt tld -rn 0
vmcheckxxx -rt tld -rn 0 -recommend
Empty the robot and re-inventory (using barcodes)
vmupdate -rt tld -rn <robot number> -rh <silo slave> -vh <host> -nostderr -use_barcode_rules -use_seed -empty_ie
Tape Media Commands
List all pools
vmpool -listall -bx
List tapes in pool
vmquery -pn <pool name> -bx
List all tapes in the robot
vmquery -rn 0 -bx |grep 'TLD' | sort +4
List cleaning tapes
vmquery -mt dlt_clean -bx
List tape volume details
vmquery -m <media ID>
Delete a volume from the catalog
vmdelete -m <media ID>
Change a tapes expiry date
vmchange -exp 12/31/06 23:59:58 -m <media ID>
Change a tape's media pool
vmchange -p <pool number> -m <media ID>
Media commands
List the storage units
bpstulist -U
Freeze or unfreeze media
bpmedia [-freeze][-unfreeze] -ev <media ID>
List media details
bpmedialist -ev <media ID>
List media contents
bpmedialist -U mcontents -m <media ID>
List backup Image Information
bpimagelist -backupid <image ID>
Expire client images
bpimage -cleanup -allclients
Expire a tape
bpexpdate -d 0 -ev <media ID> -force
List all netbackups jobs
bpdbjobs -report [-hoursago]
Move media from one media server to another
bpmedia -movedb -newserver <media server> -oldserver <media server>
Tape/Robot commands
List tape drives
tpconfig -d
List cleaning times on drives
tpclean -L
clean a drive
tpclean -C <drive number>
change a drives cleaning frequency
tpclean -F <drive> <frequency>
set a drives cleaning time to zero
tpclean -M <drive>
Move tapes within robot using robtest
robtest
commands that can be used are as follows:

s s       (show slots)
s d       (show drives)
s i       (show load port)
m s250 d5 (move tape from slot 250 into drive 5)
uload d5  (unload tape from drive 5)
m d5 s250 (move tape from drive 5 to slot 250)
m s250 i1 (mov tape from slot 250 to load port 1)

List load port tapes
echo "s i q" | tldtest -r /dev/sg/c0t4l0
List all slot contents
echo "s s q" | tldtest -r /dev/sg/c0t4l0
List tape drive contents
echo "s d q" | tldtest -r /dev/sg/c0t4l0
Move a tape in s100 to drive 1
echo "m s100 d1" | tldtest -r /dev/sg/c0t4l0
Move a tape to load port 1
echo "m s100 i1" | tldtest -r /dev/sg/c0t4l0
Archiving Commands
list archive info
bpcatlist -client all -before Jul 01 2006
bpcatlist -client all -before Aug 01 2006
archive and remove images
bpcatlist -before Jul 01 2006 | bpcatarc | bpcatrm
restore archive files
bpcatlist -before Jul 01 2006 | bpcatres
Client commands
test client connectivity
bpclntcmd [-ip <ip addres>]
bpclntcmd [-hn <hostname>]
bpclntcmd [-pn]
bpclntcmd [-sv]

Diagnostic commands 

/usr/openv/netbackup/bin/bpclntcmd -clear_host_cache
/usr/openv/netbackup/bin/bpclntcmd -self
/usr/openv/netbackup/bin/bpclntcmd -pn



Question 8 Explanation

Compartments are the primary building blocks you use to organize your cloud resources. You use compartments to organize and isolate your res...