SHARE
TWEET

Untitled

a guest Jan 22nd, 2020 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [nardia@andrea MoveVm_0.3]$ sh -x ./MoveVm.sh Menovs16 menlnxoravmm menlnxolasc01 OvmTestPool repotarget N N
  2. + '[' 7 -lt 5 ']'
  3. ++ date +%Y%m%d-%H%M
  4. + today=20200122-1532
  5. + password=Menovs16
  6. + mgrhost=menlnxoravmm
  7. + guest=menlnxolasc01
  8. + pool=OvmTestPool
  9. + repotarget=repotarget
  10. ++ echo N
  11. ++ tr '[a-z]' '[A-Z]'
  12. + force=N
  13. ++ echo N
  14. ++ tr '[a-z]' '[A-Z]'
  15. + restart=N
  16. + copytype=SPARSE_COPY
  17. + /usr/bin/expect FirstConn.exp Menovs16 menlnxoravmm
  18. spawn ssh -l admin menlnxoravmm -p 10000
  19. OVM>
  20. ## Starting Generated OVMCLI Script... ##
  21.  
  22. set OutputMode=Verbose
  23. Command: set OutputMode=Verbose
  24. Status: Success
  25. Time: 2020-01-22 15:32:24,897 CET
  26. OVM> exit
  27. Connection to menlnxoravmm closed.
  28. ++ ssh admin@menlnxoravmm -p 10000 list vm
  29. ++ grep -cx menlnxolasc01
  30. + isunique=0
  31. + '[' 0 -gt 1 ']'
  32. ++ ssh admin@menlnxoravmm -p 10000 show vm name=menlnxolasc01
  33. + vmdetails='OVM> show vm name=menlnxolasc01
  34. Command: show vm name=menlnxolasc01
  35. Status: Success
  36. Time: 2020-01-22 15:32:25,460 CET
  37. Data:
  38.   Status = Stopped
  39.   Memory (MB) = 8192
  40.   Max. Memory (MB) = 16384
  41.   Processors = 4
  42.   Max. Processors = 8
  43.   Priority = 50
  44.   Processor Cap = 100
  45.   High Availability = No
  46.   Operating System = Oracle Linux 6
  47.   Mouse Type = OS Default
  48.   Domain Type = Xen PVM
  49.   Keymap = en-us
  50.   Start Policy = Use Pool Policy
  51.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  52.   Disk Limit = 104
  53.   Huge Pages Enabled = No
  54.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  55.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  56.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  57.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  58.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  59.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  60.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  61.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  62.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  63.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  64.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  65.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  66.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  67.   Restart Action On Crash = Restart
  68.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  69.   Name = menlnxolasc01
  70.   Description = Server name menlnxolasc01
  71. ip address 10.1.24.160
  72.   Locked = false
  73.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  74. OVM> Connection closed.'
  75. ++ ssh admin@menlnxoravmm -p 10000 list VirtualDisk
  76. + vmdisks='OVM> list VirtualDisk
  77. Command: list VirtualDisk
  78. Status: Success
  79. Time: 2020-01-22 15:32:25,911 CET
  80. Data:
  81.   id:0004fb000012000015e3c500556ef3db.img  name:dsk_oracleDb
  82.   id:cfdd509d3b1b473ba44a422028a6dd28.img  name:Oracle12102DBRAC_x86_64-xvdb.img
  83.   id:0004fb0000120000ba1d796b651c3cf9.img  name:ASM5
  84.   id:ecc77d7e49924b3b9696c26ebc72eb0b.img  name:System.img
  85.   id:0004fb0000120000a4cf9b9e6d675858.img  name:dsk_menlnxoltst01 (5)
  86.   id:0004fb0000120000fc5659370b9d5da7.img  name:system (10)
  87.   id:0004fb0000120000c2d6e30e18044413.img  name:ASM1
  88.   id:0004fb0000120000d9603d6d7dd60ab5.img  name:ASM4
  89.   id:0004fb0000120000509ab65106d48e42.img  name:Hdisk01
  90.   id:0004fb00001200002104cd7067109ca0.img  name:ASM3
  91.   id:0004fb0000120000aa2638cd3c824268.img  name:ASM2
  92.   id:0004fb0000120000d58d1f3ecf501154.img  name:dsk_OracleOASDB
  93.   id:0004fb0000120000cb3ba17d1d09dbc0.img  name:ASM4 (6)
  94.   id:0004fb00001200003fc571b32011828d.img  name:Oracle12102DBRAC_x86_64-xvdb.img (6)
  95.   id:0004fb0000120000d4907b209fc741d1.img  name:ASM1 (6)
  96.   id:0004fb0000120000c5ea399916df9e4d.img  name:system (6)
  97.   id:0004fb00001200004250282a966f8893.img  name:obi12bc_disk01 (2)
  98.   id:0004fb00001200002d8245a9c8730b52.img  name:ASM5 (6)
  99.   id:0004fb000012000029978c93135cdd5b.img  name:ASM2 (6)
  100.   id:0004fb000012000068081c7e5bf31531.img  name:System.img (6)
  101.   id:0004fb0000120000875183fd98635223.img  name:ASM3 (6)
  102.   id:0004fb0000120000e53b054aa0f7d1fc.img  name:system (2)
  103.   id:0004fb0000120000122c3a12efca59ec.img  name:system (4)
  104. OVM> Connection closed.'
  105. ++ grep -ci 'Locked = false'
  106. ++ echo 'OVM> show vm name=menlnxolasc01
  107. Command: show vm name=menlnxolasc01
  108. Status: Success
  109. Time: 2020-01-22 15:32:25,460 CET
  110. Data:
  111.   Status = Stopped
  112.   Memory (MB) = 8192
  113.   Max. Memory (MB) = 16384
  114.   Processors = 4
  115.   Max. Processors = 8
  116.   Priority = 50
  117.   Processor Cap = 100
  118.   High Availability = No
  119.   Operating System = Oracle Linux 6
  120.   Mouse Type = OS Default
  121.   Domain Type = Xen PVM
  122.   Keymap = en-us
  123.   Start Policy = Use Pool Policy
  124.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  125.   Disk Limit = 104
  126.   Huge Pages Enabled = No
  127.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  128.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  129.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  130.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  131.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  132.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  133.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  134.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  135.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  136.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  137.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  138.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  139.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  140.   Restart Action On Crash = Restart
  141.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  142.   Name = menlnxolasc01
  143.   Description = Server name menlnxolasc01
  144. ip address 10.1.24.160
  145.   Locked = false
  146.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  147. OVM> Connection closed.'
  148. + checkguest=1
  149. + '[' 1 -lt 1 ']'
  150. ++ grep -c menlnxolasc01
  151. ++ ssh admin@menlnxoravmm -p 10000 show ServerPool name=OvmTestPool
  152. + checkpool=1
  153. + '[' 1 -lt 1 ']'
  154. ++ ssh admin@menlnxoravmm -p 10000 show repository name=repotarget
  155. ++ grep -ci 'Locked = false'
  156. + checkrepotarget=1
  157. + '[' 1 -lt 1 ']'
  158. ++ echo 'OVM> show vm name=menlnxolasc01
  159. Command: show vm name=menlnxolasc01
  160. Status: Success
  161. Time: 2020-01-22 15:32:25,460 CET
  162. Data:
  163.   Status = Stopped
  164.   Memory (MB) = 8192
  165.   Max. Memory (MB) = 16384
  166.   Processors = 4
  167.   Max. Processors = 8
  168.   Priority = 50
  169.   Processor Cap = 100
  170.   High Availability = No
  171.   Operating System = Oracle Linux 6
  172.   Mouse Type = OS Default
  173.   Domain Type = Xen PVM
  174.   Keymap = en-us
  175.   Start Policy = Use Pool Policy
  176.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  177.   Disk Limit = 104
  178.   Huge Pages Enabled = No
  179.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  180.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  181.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  182.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  183.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  184.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  185.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  186.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  187.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  188.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  189.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  190.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  191.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  192.   Restart Action On Crash = Restart
  193.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  194.   Name = menlnxolasc01
  195.   Description = Server name menlnxolasc01
  196. ip address 10.1.24.160
  197.   Locked = false
  198.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  199. OVM> Connection closed.'
  200. ++ grep 'Server ='
  201. ++ cut -d '[' -f2
  202. ++ cut -d ']' -f1
  203. + checkovs=menlnxovmtst
  204. ++ ssh admin@menlnxoravmm -p 10000 show repository name=repotarget
  205. ++ grep 'Presented Server'
  206. ++ grep -c menlnxovmtst
  207. + checkrepopresented=2
  208. + '[' 2 -lt 1 ']'
  209. ++ ssh admin@menlnxoravmm -p 10000 showversion
  210. ++ grep '[0-9].[0-9]'
  211. ++ cut -d . -f1,2
  212. ++ sed 's|[^0-9]*||'
  213. + ovmclirel=3.4
  214. + case $ovmclirel in
  215. + echo '==> Oracle VM 3.4 CLI'
  216. ==> Oracle VM 3.4 CLI
  217. ++ grep VmDiskMapping
  218. ++ echo 'OVM> show vm name=menlnxolasc01
  219. Command: show vm name=menlnxolasc01
  220. Status: Success
  221. Time: 2020-01-22 15:32:25,460 CET
  222. Data:
  223.   Status = Stopped
  224.   Memory (MB) = 8192
  225.   Max. Memory (MB) = 16384
  226.   Processors = 4
  227.   Max. Processors = 8
  228.   Priority = 50
  229.   Processor Cap = 100
  230.   High Availability = No
  231.   Operating System = Oracle Linux 6
  232.   Mouse Type = OS Default
  233.   Domain Type = Xen PVM
  234.   Keymap = en-us
  235.   Start Policy = Use Pool Policy
  236.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  237.   Disk Limit = 104
  238.   Huge Pages Enabled = No
  239.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  240.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  241.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  242.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  243.   Repository = 0004fb00000300001676a3a8++ sed -e 's/Mapping for disk Id (//'
  244. ++ cut -d ']' -f1
  245. ++ sed -e 's/)//'
  246. e389505f  [MyRepoOvmTst]
  247.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  248.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  249.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  250.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  251.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  252.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  253.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  254.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  255.   Restart Action On Crash = Restart
  256.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  257.   Name = menlnxolasc01
  258.   Description = Server name menlnxo++ cut -d '[' -f2
  259. lasc01
  260. ip address 10.1.24.160
  261.   Locked = false
  262.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  263. OVM> Connection closed.'
  264. + checkactrepotemp='0004fb0000120000fc5659370b9d5da7.img
  265. 0004fb0000120000a4cf9b9e6d675858.img'
  266. + checkactrepo=
  267. + for checkactrepotempi in $checkactrepotemp
  268. ++ grep 0004fb0000120000fc5659370b9d5da7.img
  269. ++ echo 'OVM>' list VirtualDisk $'\rCommand:' list VirtualDisk $'\rStatus:' Success $'\rTime:' 2020-01-22 15:32:25,911 CET $'\rData:' $'\r' id:0004fb000012000015e3c500556ef3db.img name:dsk_oracleDb $'\r' id:cfdd509d3b1b473ba44a422028a6dd28.img name:Oracle12102DBRAC_x86_64-xvdb.img $'\r' id:0004fb0000120000ba1d796b651c3cf9.img name:ASM5 $'\r' id:ecc77d7e49924b3b9696c26ebc72eb0b.img name:System.img $'\r' id:0004fb0000120000a4cf9b9e6d675858.img name:dsk_menlnxoltst01 '(5)' $'\r' id:0004fb0000120000fc5659370b9d5da7.img name:system '(10)' $'\r' id:0004fb0000120000c2d6e30e18044413.img name:ASM1 $'\r' id:0004fb0000120000d9603d6d7dd60ab5.img name:ASM4 $'\r' id:0004fb0000120000509ab65106d48e42.img name:Hdisk01 $'\r' id:0004fb00001200002104cd7067109ca0.img name:ASM3 $'\r' id:0004fb0000120000aa2638cd3c824268.img name:ASM2 $'\r' id:0004fb0000120000d58d1f3ecf501154.img name:dsk_OracleOASDB $'\r' id:0004fb0000120000cb3ba17d1d09dbc0.img name:ASM4 '(6)' $'\r' id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img '(6)' $'\r' id:0004fb0000120000d4907b209fc741d1.img name:ASM1 '(6)' $'\r' id:0004fb0000120000c5ea399916df9e4d.img name:system '(6)' $'\r' id:0004fb00001200004250282a966f8893.img name:obi12bc_disk01 '(2)' $'\r' id:0004fb00001200002d8245a9c8730b52.img name:ASM5 '(6)' $'\r' id:0004fb000012000029978c93135cdd5b.img name:ASM2 '(6)' $'\r' id:0004fb000012000068081c7e5bf31531.img name:System.img '(6)' $'\r' id:0004fb0000120000875183fd98635223.img name:ASM3 '(6)' $'\r' id:0004fb0000120000e53b054aa0f7d1fc.img name:system '(2)' $'\r' id:0004fb0000120000122c3a12efca59ec.OVM>' Connection closed.
  270.  id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img (OVM> Connection closed.'3a12efca59ec.img name:system (4) (6) (2)
  271. + echo '==> Will migrate/clone vm disk 0004fb0000120000fc5659370b9d5da7.img as it is in VirtualDisk list!'
  272. ==> Will migrate/clone vm disk 0004fb0000120000fc5659370b9d5da7.img as it is in VirtualDisk list!
  273. ++ echo 0004fb0000120000fc5659370b9d5da7.img
  274. + checkactrepo=0004fb0000120000fc5659370b9d5da7.img
  275. + for checkactrepotempi in $checkactrepotemp
  276. ++ echo 'OVM>' list VirtualDisk $'\rCommand:' list VirtualDisk $'\rStatus:' Success $'\rTime:' 2020-01-22 15:32:25,911 CET $'\rData:' $'\r' id:0004fb000012000015e3c500556ef3db.img name:dsk_oracleDb $'\r' id:cfdd509d3b1b473ba44a422028a6dd28.img name:Oracle12102DBRAC_x86_64-xvdb.img $'\r' id:0004fb0000120000ba1d796b651c3cf9.img name:ASM5 $'\r' id:ecc77d7e49924b3b9696c26ebc72eb0b.img name:System.img $'\r' id:0004fb0000120000a4cf9b9e6d675858.img name:dsk_menlnxoltst01 '(5)' $'\r' id:0004fb0000120000fc5659370b9d5da7.img name:system '(10)' $'\r' id:0004fb0000120000c2d6e30e18044413.img name:ASM1 $'\r' id:0004fb0000120000d9603d6d7dd60ab5.img name:ASM4 $'\r' id:0004fb0000120000509ab65106d48e42.img name:Hdisk01 $'\r' id:0004fb00001200002104cd7067109ca0.img name:ASM3 $'\r' id:0004fb0000120000aa2638cd3c824268.img name:ASM2 $'\r' id:0004fb0000120000d58d1f3ecf501154.img name:dsk_OracleOASDB $'\r' id:0004fb0000120000cb3ba17d1d09dbc0.img name:ASM4 '(6)' $'\r' id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img '(6)' $'\r' id:0004fb0000120000d4907b209fc741d1.img name:ASM1 '(6)' $'\r' id:0004fb0000120000c5ea399916df9e4d.img name:system '(6)' $'\r' id:0004fb00001200004250282a966f8893.img name:obi12bc_disk01 '(2)' $'\r' id:0004fb00001200002d8245a9c8730b52.img name:ASM5 '(6)' $'\r' id:0004fb000012000029978c93135cdd5b.img name:ASM2 '(6)' $'\r' id:0004fb000012000068081c7e5bf31531.img name:System.img '(6)' $'\r' id:0004fb0000120000875183fd98635223.img name:ASM3 '(6)' $'\r' id:0004fb0000120000e53b054aa0f7d1fc.img name:system '(2)' $'\r' id:0004fb0000120000122c3a12efca59ec.OVM>' Connection closed.
  277. ++ grep 0004fb0000120000a4cf9b9e6d675858.img
  278.  id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img (OVM> Connection closed.'3a12efca59ec.img name:system (4) (6) (2)
  279. + echo '==> Will migrate/clone vm disk 0004fb0000120000a4cf9b9e6d675858.img as it is in VirtualDisk list!'
  280. ==> Will migrate/clone vm disk 0004fb0000120000a4cf9b9e6d675858.img as it is in VirtualDisk list!
  281. ++ echo 0004fb0000120000a4cf9b9e6d675858.img
  282. + checkactrepo=0004fb0000120000fc5659370b9d5da7.img0004fb0000120000a4cf9b9e6d675858.img
  283. ++ echo 'OVM> show vm name=menlnxolasc01
  284. Command: show vm name=menlnxolasc01
  285. Status: Success
  286. Time: 2020-01-22 15:32:25,460 CET
  287. Data:
  288.   Status = Stopped
  289.   Memory (MB) = 8192
  290.   Max. Memory (MB) = 16384
  291.   Processors = 4
  292.   Max. Processors = 8
  293.   Priority = 50
  294.   Processor Cap = 100
  295.   High Availability = No
  296.   Operating System = Oracle Linux 6
  297.   Mouse Type = OS Default
  298.   Domain Type = Xen PVM
  299.   Keymap = en-us
  300.   Start Policy = Use Pool Policy
  301.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  302.   Disk Limit = 104
  303.   Huge Pages Enabled = No
  304.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  305.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  306.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  307.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  308.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  309.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  310.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  311.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  312.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  313.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  314.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  315.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  316.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  317.   Restart Action On Crash = Restart
  318.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  319.   Name = menlnxolasc01
  320.   Description = Server name menlnxolasc01
  321. ip address 10.1.24.160
  322.   Locked = false
  323.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  324. OVM> Connection closed.'
  325. ++ grep -c repotarget
  326. ++ grep 'Repository ='
  327. + checkactvmcfg=0
  328. ++ echo 0004fb0000120000fc5659370b9d5da7.img0004fb0000120000a4cf9b9e6d675858.imgi
  329. ++ wc -l
  330. + countvdisks=1
  331. + isalready=0
  332. ++ echo 0004fb0000120000fc5659370b9d5da7.img0004fb0000120000a4cf9b9e6d675858.img
  333. + for diskid in `echo "$checkactrepo"`
  334. ++ ssh admin@menlnxoravmm -p 10000 show virtualdisk id=0004fb0000120000fc5659370b9d5da7.img0004fb0000120000a4cf9b9e6d675858.img
  335. ++ grep 'Repository Id ='
  336. ++ cut -d '[' -f2
  337. ++ cut -d ']' -f1
  338. + reponame=
  339. + '[' '' = repotarget ']'
  340. + '[' 0 -eq 1 ']'
  341. ++ echo 'OVM> show vm name=menlnxolasc01
  342. Command: show vm name=menlnxolasc01
  343. Status: Success
  344. Time: 2020-01-22 15:32:25,460 CET
  345. Data:
  346.   Status = Stopped
  347.   Memory (MB) = 8192
  348.   Max. Memory (MB) = 16384
  349.   Processors = 4
  350.   Max. Processors = 8
  351.   Priority = 50
  352.   Processor Cap = 100
  353.   High Availability = No
  354.   Operating System = Oracle Linux 6
  355.   Mouse Type = OS Default
  356.   Domain Type = Xen PVM
  357.   Keymap = en-us
  358.   Start Policy = Use Pool Policy
  359.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  360.   Disk Limit = 104
  361.   Huge Pages Enabled = No
  362.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  363.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  364.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  365.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  366.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  367.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  368.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  369.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  370.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  371.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  372.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  373.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  374.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  375.   Restart Action On Crash = Restart
  376.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  377.   Name = menlnxolasc01
  378.   Description = Server name menlnxo++ grep VmDiskMapping
  379. lasc01
  380. ip address 10.1.24.160
  381.   Locked = false
  382.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  383. OVM> Connection closed.'
  384.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  385.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]'
  386.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  387.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]'
  388. ++ cut -d '[' -f2
  389. ++ sed -e 's/Mapping for disk Id (//'
  390. ++ sed -e 's/)//'
  391. ++ cut -d ']' -f1
  392. + vdisksidtemp='0004fb0000120000fc5659370b9d5da7.img
  393. 0004fb0000120000a4cf9b9e6d675858.img'
  394. + for vdisksidi in $vdisksidtemp
  395. ++ grep 0004fb0000120000fc5659370b9d5da7.img
  396. ++ echo 'OVM>' list VirtualDisk $'\rCommand:' list VirtualDisk $'\rStatus:' Success $'\rTime:' 2020-01-22 15:32:25,911 CET $'\rData:' $'\r' id:0004fb000012000015e3c500556ef3db.img name:dsk_oracleDb $'\r' id:cfdd509d3b1b473ba44a422028a6dd28.img name:Oracle12102DBRAC_x86_64-xvdb.img $'\r' id:0004fb0000120000ba1d796b651c3cf9.img name:ASM5 $'\r' id:ecc77d7e49924b3b9696c26ebc72eb0b.img name:System.img $'\r' id:0004fb0000120000a4cf9b9e6d675858.img name:dsk_menlnxoltst01 '(5)' $'\r' id:0004fb0000120000fc5659370b9d5da7.img name:system '(10)' $'\r' id:0004fb0000120000c2d6e30e18044413.img name:ASM1 $'\r' id:0004fb0000120000d9603d6d7dd60ab5.img name:ASM4 $'\r' id:0004fb0000120000509ab65106d48e42.img name:Hdisk01 $'\r' id:0004fb00001200002104cd7067109ca0.img name:ASM3 $'\r' id:0004fb0000120000aa2638cd3c824268.img name:ASM2 $'\r' id:0004fb0000120000d58d1f3ecf501154.img name:dsk_OracleOASDB $'\r' id:0004fb0000120000cb3ba17d1d09dbc0.img name:ASM4 '(6)' $'\r' id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img '(6)' $'\r' id:0004fb0000120000d4907b209fc741d1.img name:ASM1 '(6)' $'\r' id:0004fb0000120000c5ea399916df9e4d.img name:system '(6)' $'\r' id:0004fb00001200004250282a966f8893.img name:obi12bc_disk01 '(2)' $'\r' id:0004fb00001200002d8245a9c8730b52.img name:ASM5 '(6)' $'\r' id:0004fb000012000029978c93135cdd5b.img name:ASM2 '(6)' $'\r' id:0004fb000012000068081c7e5bf31531.img name:System.img '(6)' $'\r' id:0004fb0000120000875183fd98635223.img name:ASM3 '(6)' $'\r' id:0004fb0000120000e53b054aa0f7d1fc.img name:system '(2)' $'\r' id:0004fb0000120000122c3a12efca59ec.OVM>' Connection closed.
  397.  id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img (OVM> Connection closed.'3a12efca59ec.img name:system (4) (6) (2)
  398. ++ echo 0004fb0000120000fc5659370b9d5da7.img
  399. + vdisksid=' 0004fb0000120000fc5659370b9d5da7.img'
  400. + for vdisksidi in $vdisksidtemp
  401. ++ grep 0004fb0000120000a4cf9b9e6d675858.img
  402. ++ echo 'OVM>' list VirtualDisk $'\rCommand:' list VirtualDisk $'\rStatus:' Success $'\rTime:' 2020-01-22 15:32:25,911 CET $'\rData:' $'\r' id:0004fb000012000015e3c500556ef3db.img name:dsk_oracleDb $'\r' id:cfdd509d3b1b473ba44a422028a6dd28.img name:Oracle12102DBRAC_x86_64-xvdb.img $'\r' id:0004fb0000120000ba1d796b651c3cf9.img name:ASM5 $'\r' id:ecc77d7e49924b3b9696c26ebc72eb0b.img name:System.img $'\r' id:0004fb0000120000a4cf9b9e6d675858.img name:dsk_menlnxoltst01 '(5)' $'\r' id:0004fb0000120000fc5659370b9d5da7.img name:system '(10)' $'\r' id:0004fb0000120000c2d6e30e18044413.img name:ASM1 $'\r' id:0004fb0000120000d9603d6d7dd60ab5.img name:ASM4 $'\r' id:0004fb0000120000509ab65106d48e42.img name:Hdisk01 $'\r' id:0004fb00001200002104cd7067109ca0.img name:ASM3 $'\r' id:0004fb0000120000aa2638cd3c824268.img name:ASM2 $'\r' id:0004fb0000120000d58d1f3ecf501154.img name:dsk_OracleOASDB $'\r' id:0004fb0000120000cb3ba17d1d09dbc0.img name:ASM4 '(6)' $'\r' id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img '(6)' $'\r' id:0004fb0000120000d4907b209fc741d1.img name:ASM1 '(6)' $'\r' id:0004fb0000120000c5ea399916df9e4d.img name:system '(6)' $'\r' id:0004fb00001200004250282a966f8893.img name:obi12bc_disk01 '(2)' $'\r' id:0004fb00001200002d8245a9c8730b52.img name:ASM5 '(6)' $'\r' id:0004fb000012000029978c93135cdd5b.img name:ASM2 '(6)' $'\r' id:0004fb000012000068081c7e5bf31531.img name:System.img '(6)' $'\r' id:0004fb0000120000875183fd98635223.img name:ASM3 '(6)' $'\r' id:0004fb0000120000e53b054aa0f7d1fc.img name:system '(2)' $'\r' id:0004fb0000120000122c3a12efca59ec.OVM>' Connection closed.
  403.  id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img (OVM> Connection closed.'3a12efca59ec.img name:system (4) (6) (2)
  404. ++ echo 0004fb0000120000a4cf9b9e6d675858.img
  405. + vdisksid=' 0004fb0000120000fc5659370b9d5da7.img 0004fb0000120000a4cf9b9e6d675858.img'
  406. + sum_space_used=0
  407. ++ echo ' 0004fb0000120000fc5659370b9d5da7.img 0004fb0000120000a4cf9b9e6d675858.img'
  408. + for diskid in `echo "$vdisksid"`
  409. ++ grep 'Used (GiB) ='
  410. ++ ssh admin@menlnxoravmm -p 10000 show virtualdisk id=0004fb0000120000fc5659370b9d5da7.img
  411. ++ awk '{print int($1+0.9)}'
  412. ++ cut -d = -f2
  413. + tmp=11
  414. + sum_space_used=11
  415. + for diskid in `echo "$vdisksid"`
  416. ++ ssh admin@menlnxoravmm -p 10000 show virtualdisk id=0004fb0000120000a4cf9b9e6d675858.img
  417. ++ cut -d = -f2
  418. ++ awk '{print int($1+0.9)}'
  419. ++ grep 'Used (GiB) ='
  420. + tmp=64
  421. + sum_space_used=75
  422. + ssh admin@menlnxoravmm -p 10000 refresh repository name=repotarget
  423. OVM> refresh repository name=repotarget
  424. Command: refresh repository name=repotarget
  425. Status: Success
  426. Time: 2020-01-22 15:32:34,872 CET
  427. JobId: 1579703548934
  428. OVM> Connection closed.
  429. ++ ssh admin@menlnxoravmm -p 10000 show repository name=repotarget
  430. ++ grep 'File System ='
  431. ++ cut -d = -f2
  432. ++ cut -d ' ' -f2
  433. + filesystemid=0004fb0000050000d291195e911c3c07
  434. + ssh admin@menlnxoravmm -p 10000 refresh filesystem id=0004fb0000050000d291195e911c3c07
  435. OVM> refresh filesystem id=0004fb0000050000d291195e911c3c07
  436. Command: refresh filesystem id=0004fb0000050000d291195e911c3c07
  437. Status: Success
  438. Time: 2020-01-22 15:32:37,333 CET
  439. JobId: 1579703555625
  440. OVM> Connection closed.
  441. ++ ssh admin@menlnxoravmm -p 10000 show repository name=repotarget
  442. ++ grep 'File System Free (GiB) ='
  443. ++ cut -d = -f2
  444. ++ awk '{print int($1)}'
  445. + space_free_on_repo=1016
  446. + '[' 1016 -lt 75 ']'
  447. ++ grep VmDiskMapping
  448. ++ echo 'OVM> show vm name=menlnxolasc01
  449. Command: show vm name=menlnxolasc01
  450. Status: Success
  451. Time: 2020-01-22 15:32:25,460 CET
  452. Data:
  453.   Status = Stopped
  454.   Memory (MB) = 8192
  455.   Max. Memory (MB) = 16384
  456.   Processors = 4
  457.   Max. Processors = 8
  458.   Priority = 50
  459.   Processor Cap = 100
  460.   High Availability = No
  461.   Operating System = Oracle Linux 6
  462.   Mouse Type = OS Default
  463.   Domain Type = Xen PVM
  464.   Keymap = en-us
  465.   Start Policy = Use Pool Policy
  466.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  467.   Disk Limit = 104
  468.   Huge Pages Enabled = No
  469.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  470.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  471.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  472.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  473.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  474.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  475.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  476.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  477.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  478.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  479.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  480.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  481.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  482.   Restart Action On Crash = Restart
  483.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  484.   Name = menlnxolasc01
  485.   Description = Server name menlnxolasc01
  486. ip address 10.1.24.160
  487.   Locked = false
  488.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  489. OVM> Connection closed.'
  490.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  491.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]'
  492. ++ cut -d '[' -f2
  493. ++ cut -d ']' -f1
  494.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  495.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]'
  496. ++ sed -e 's/Mapping for disk Id (//'
  497. ++ sed -e 's/)//'
  498. + vdisksidtemp='0004fb0000120000fc5659370b9d5da7.img
  499. 0004fb0000120000a4cf9b9e6d675858.img'
  500. + vdisksid=
  501. + for vdisksidi in $vdisksidtemp
  502. ++ grep 0004fb0000120000fc5659370b9d5da7.img
  503. ++ echo 'OVM>' list VirtualDisk $'\rCommand:' list VirtualDisk $'\rStatus:' Success $'\rTime:' 2020-01-22 15:32:25,911 CET $'\rData:' $'\r' id:0004fb000012000015e3c500556ef3db.img name:dsk_oracleDb $'\r' id:cfdd509d3b1b473ba44a422028a6dd28.img name:Oracle12102DBRAC_x86_64-xvdb.img $'\r' id:0004fb0000120000ba1d796b651c3cf9.img name:ASM5 $'\r' id:ecc77d7e49924b3b9696c26ebc72eb0b.img name:System.img $'\r' id:0004fb0000120000a4cf9b9e6d675858.img name:dsk_menlnxoltst01 '(5)' $'\r' id:0004fb0000120000fc5659370b9d5da7.img name:system '(10)' $'\r' id:0004fb0000120000c2d6e30e18044413.img name:ASM1 $'\r' id:0004fb0000120000d9603d6d7dd60ab5.img name:ASM4 $'\r' id:0004fb0000120000509ab65106d48e42.img name:Hdisk01 $'\r' id:0004fb00001200002104cd7067109ca0.img name:ASM3 $'\r' id:0004fb0000120000aa2638cd3c824268.img name:ASM2 $'\r' id:0004fb0000120000d58d1f3ecf501154.img name:dsk_OracleOASDB $'\r' id:0004fb0000120000cb3ba17d1d09dbc0.img name:ASM4 '(6)' $'\r' id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img '(6)' $'\r' id:0004fb0000120000d4907b209fc741d1.img name:ASM1 '(6)' $'\r' id:0004fb0000120000c5ea399916df9e4d.img name:system '(6)' $'\r' id:0004fb00001200004250282a966f8893.img name:obi12bc_disk01 '(2)' $'\r' id:0004fb00001200002d8245a9c8730b52.img name:ASM5 '(6)' $'\r' id:0004fb000012000029978c93135cdd5b.img name:ASM2 '(6)' $'\r' id:0004fb000012000068081c7e5bf31531.img name:System.img '(6)' $'\r' id:0004fb0000120000875183fd98635223.img name:ASM3 '(6)' $'\r' id:0004fb0000120000e53b054aa0f7d1fc.img name:system '(2)' $'\r' id:0004fb0000120000122c3a12efca59ec.OVM>' Connection closed.
  504.  id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img (OVM> Connection closed.'3a12efca59ec.img name:system (4) (6) (2)
  505. ++ echo 0004fb0000120000fc5659370b9d5da7.img
  506. + vdisksid=' 0004fb0000120000fc5659370b9d5da7.img'
  507. + for vdisksidi in $vdisksidtemp
  508. ++ grep 0004fb0000120000a4cf9b9e6d675858.img
  509. ++ echo 'OVM>' list VirtualDisk $'\rCommand:' list VirtualDisk $'\rStatus:' Success $'\rTime:' 2020-01-22 15:32:25,911 CET $'\rData:' $'\r' id:0004fb000012000015e3c500556ef3db.img name:dsk_oracleDb $'\r' id:cfdd509d3b1b473ba44a422028a6dd28.img name:Oracle12102DBRAC_x86_64-xvdb.img $'\r' id:0004fb0000120000ba1d796b651c3cf9.img name:ASM5 $'\r' id:ecc77d7e49924b3b9696c26ebc72eb0b.img name:System.img $'\r' id:0004fb0000120000a4cf9b9e6d675858.img name:dsk_menlnxoltst01 '(5)' $'\r' id:0004fb0000120000fc5659370b9d5da7.img name:system '(10)' $'\r' id:0004fb0000120000c2d6e30e18044413.img name:ASM1 $'\r' id:0004fb0000120000d9603d6d7dd60ab5.img name:ASM4 $'\r' id:0004fb0000120000509ab65106d48e42.img name:Hdisk01 $'\r' id:0004fb00001200002104cd7067109ca0.img name:ASM3 $'\r' id:0004fb0000120000aa2638cd3c824268.img name:ASM2 $'\r' id:0004fb0000120000d58d1f3ecf501154.img name:dsk_OracleOASDB $'\r' id:0004fb0000120000cb3ba17d1d09dbc0.img name:ASM4 '(6)' $'\r' id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img '(6)' $'\r' id:0004fb0000120000d4907b209fc741d1.img name:ASM1 '(6)' $'\r' id:0004fb0000120000c5ea399916df9e4d.img name:system '(6)' $'\r' id:0004fb00001200004250282a966f8893.img name:obi12bc_disk01 '(2)' $'\r' id:0004fb00001200002d8245a9c8730b52.img name:ASM5 '(6)' $'\r' id:0004fb000012000029978c93135cdd5b.img name:ASM2 '(6)' $'\r' id:0004fb000012000068081c7e5bf31531.img name:System.img '(6)' $'\r' id:0004fb0000120000875183fd98635223.img name:ASM3 '(6)' $'\r' id:0004fb0000120000e53b054aa0f7d1fc.img name:system '(2)' $'\r' id:0004fb0000120000122c3a12efca59ec.OVM>' Connection closed.
  510.  id:0004fb00001200003fc571b32011828d.img name:Oracle12102DBRAC_x86_64-xvdb.img (OVM> Connection closed.'3a12efca59ec.img name:system (4) (6) (2)
  511. ++ echo 0004fb0000120000a4cf9b9e6d675858.img
  512. + vdisksid=' 0004fb0000120000fc5659370b9d5da7.img 0004fb0000120000a4cf9b9e6d675858.img'
  513. + sum_space_used=0
  514. ++ echo ' 0004fb0000120000fc5659370b9d5da7.img 0004fb0000120000a4cf9b9e6d675858.img'
  515. + for diskid in `echo "$vdisksid"`
  516. ++ ssh admin@menlnxoravmm -p 10000 show virtualdisk id=0004fb0000120000fc5659370b9d5da7.img
  517. ++ grep 'Used (GiB) ='
  518. ++ awk '{print int($1+0.9)}'
  519. ++ cut -d = -f2
  520. + tmp=11
  521. + sum_space_used=11
  522. + for diskid in `echo "$vdisksid"`
  523. ++ ssh admin@menlnxoravmm -p 10000 show virtualdisk id=0004fb0000120000a4cf9b9e6d675858.img
  524. ++ grep 'Used (GiB) ='
  525. ++ cut -d = -f2
  526. ++ awk '{print int($1+0.9)}'
  527. + tmp=64
  528. + sum_space_used=75
  529. ++ ssh admin@menlnxoravmm -p 10000 show repository name=repotarget
  530. ++ grep 'File System Free (GiB) ='
  531. ++ cut -d = -f2
  532. ++ awk '{print int($1)}'
  533. + space_free_on_repo=1016
  534. + '[' 1016 -lt 75 ']'
  535. ++ echo 'OVM> show vm name=menlnxolasc01
  536. Command: show vm name=menlnxolasc01
  537. Status: Success
  538. Time: 2020-01-22 15:32:25,460 CET
  539. Data:
  540.   Status = Stopped
  541.   Memory (MB) = 8192
  542.   Max. Memory (MB) = 16384
  543.   Processors = 4
  544.   Max. Processors = 8
  545.   Priority = 50
  546.   Processor Cap = 100
  547.   High Availability = No
  548.   Operating System = Oracle Linux 6
  549.   Mouse Type = OS Default
  550.   Domain Type = Xen PVM
  551.   Keymap = en-us
  552.   Start Policy = Use Pool Policy
  553.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  554.   Disk Limit = 104
  555.   Huge Pages Enabled = No
  556.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  557.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  558.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  559.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  560.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  561.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  562.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  563.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  564.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  565.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  566.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  567.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  568.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  569.   Restart Action On Crash = Restart
  570.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  571.   Name = menlnxolasc01
  572.   Description = Server name menlnxo++ grep -c 'Status = Running'
  573. lasc01
  574. ip address 10.1.24.160
  575.   Locked = false
  576.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  577. OVM> Connection closed.'
  578. + running=0
  579. + '[' 0 -eq 1 ']'
  580. + ssh admin@menlnxoravmm -p 10000 create VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532 description=menlnxolasc01-move-to-repotarget-20200122-1532 on Vm name=menlnxolasc01
  581. OVM> create VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532 description=menlnxolasc01-move-to-repotarget-20200122-1532 on Vm name=menlnxolasc01
  582. Command: create VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532 description=menlnxolasc01-move-to-repotarget-20200122-1532 on Vm name=menlnxolasc01
  583. Status: Success
  584. Time: 2020-01-22 15:32:39,396 CET
  585. JobId: 1579703559177
  586. Data:
  587.   id:0004fb000013000056d99a9934909ab4  name:menlnxolasc01-move-to-repotarget-20200122-1532
  588. OVM> Connection closed.
  589. ++ echo 'OVM> show vm name=menlnxolasc01
  590. Command: show vm name=menlnxolasc01
  591. Status: Success
  592. Time: 2020-01-22 15:32:25,460 CET
  593. Data:
  594.   Status = Stopped
  595.   Memory (MB) = 8192
  596.   Max. Memory (MB) = 16384
  597.   Processors = 4
  598.   Max. Processors = 8
  599.   Priority = 50
  600.   Processor Cap = 100
  601.   High Availability = No
  602.   Operating System = Oracle Linux 6
  603.   Mouse Type = OS Default
  604.   Domain Type = Xen PVM
  605.   Keymap = en-us
  606.   Start Policy = Use Pool Policy
  607.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  608.   Disk Limit = 104
  609.   Huge Pages Enabled = No
  610.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  611.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  612.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  613.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  614.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  615.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  616.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  617.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  618.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  619.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  620.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  621.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  622.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  623.   Restart Action On Crash = Restart
  624.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  625.   Name = menlnxolasc01
  626.   Description = Server name menlnxolasc01
  627. ip address 10.1.24.160
  628.   Locked = false
  629.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  630. OVM> Connection closed.'
  631. ++ cut -d '[' -f2
  632. ++ grep VmDiskMapping
  633. ++ sed -e 's/)//'
  634. ++ cut -d ']' -f1
  635. ++ sed -e 's/Mapping for disk Id (//'
  636. + DISK_IDS='0004fb0000120000fc5659370b9d5da7.img
  637. 0004fb0000120000a4cf9b9e6d675858.img'
  638. ++ echo '0004fb0000120000fc5659370b9d5da7.img
  639. 0004fb0000120000a4cf9b9e6d675858.img'
  640. + for diskid in `echo "$DISK_IDS"`
  641. ++ grep -c 0004fb0000120000fc5659370b9d5da7.img
  642. ++ echo 'OVM> list VirtualDisk
  643. Command: list VirtualDisk
  644. Status: Success
  645. Time: 2020-01-22 15:32:25,911 CET
  646. Data:
  647.   id:0004fb000012000015e3c500556ef3db.img  name:dsk_oracleDb
  648.   id:cfdd509d3b1b473ba44a422028a6dd28.img  name:Oracle12102DBRAC_x86_64-xvdb.img
  649.   id:0004fb0000120000ba1d796b651c3cf9.img  name:ASM5
  650.   id:ecc77d7e49924b3b9696c26ebc72eb0b.img  name:System.img
  651.   id:0004fb0000120000a4cf9b9e6d675858.img  name:dsk_menlnxoltst01 (5)
  652.   id:0004fb0000120000fc5659370b9d5da7.img  name:system (10)
  653.   id:0004fb0000120000c2d6e30e18044413.img  name:ASM1
  654.   id:0004fb0000120000d9603d6d7dd60ab5.img  name:ASM4
  655.   id:0004fb0000120000509ab65106d48e42.img  name:Hdisk01
  656.   id:0004fb00001200002104cd7067109ca0.img  name:ASM3
  657.   id:0004fb0000120000aa2638cd3c824268.img  name:ASM2
  658.   id:0004fb0000120000d58d1f3ecf501154.img  name:dsk_OracleOASDB
  659.   id:0004fb0000120000cb3ba17d1d09dbc0.img  name:ASM4 (6)
  660.   id:0004fb00001200003fc571b32011828d.img  name:Oracle12102DBRAC_x86_64-xvdb.img (6)
  661.   id:0004fb0000120000d4907b209fc741d1.img  name:ASM1 (6)
  662.   id:0004fb0000120000c5ea399916df9e4d.img  name:system (6)
  663.   id:0004fb00001200004250282a966f8893.img  name:obi12bc_disk01 (2)
  664.   id:0004fb00001200002d8245a9c8730b52.img  name:ASM5 (6)
  665.   id:0004fb000012000029978c93135cdd5b.img  name:ASM2 (6)
  666.   id:0004fb000012000068081c7e5bf31531.img  name:System.img (6)
  667.   id:0004fb0000120000875183fd98635223.img  name:ASM3 (6)
  668.   id:0004fb0000120000e53b054aa0f7d1fc.img  name:system (2)
  669.   id:0004fb0000120000122c3a12efca59ec.img  name:system (4)
  670. OVM> Connection closed.'
  671. + isvirtual=1
  672.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  673.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]'
  674. ++ grep 0004fb0000120000fc5659370b9d5da7.img
  675. ++ awk '{print $5}'
  676. + diskmapping=0004fb0000130000e02ecd47d4a702db
  677. + '[' 1 -lt 1 ']'
  678. ++ ssh admin@menlnxoravmm -p 10000 show virtualdisk id=0004fb0000120000fc5659370b9d5da7.img
  679. ++ cut -d ']' -f1
  680. ++ cut -d '[' -f2
  681. ++ grep 'Repository Id ='
  682. + reponame=MyRepoOvmTst
  683. + '[' MyRepoOvmTst = repotarget ']'
  684. + ssh admin@menlnxoravmm -p 10000 create VmCloneStorageMapping cloneType=SPARSE_COPY name=Storage_Mapping-0004fb0000130000e02ecd47d4a702db vmDiskMapping=0004fb0000130000e02ecd47d4a702db repository=repotarget on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  685. OVM> create VmCloneStorageMapping cloneType=SPARSE_COPY name=Storage_Mapping-0004fb0000130000e02ecd47d4a702db vmDiskMapping=0004fb0000130000e02ecd47d4a702db repository=repotarget on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  686. Command: create VmCloneStorageMapping cloneType=SPARSE_COPY name=Storage_Mapping-0004fb0000130000e02ecd47d4a702db vmDiskMapping=0004fb0000130000e02ecd47d4a702db repository=repotarget on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  687. Status: Success
  688. Time: 2020-01-22 15:32:40,575 CET
  689. JobId: 1579703560141
  690. Data:
  691.   id:0004fb00001300007064c689d97969a0  name:Storage_Mapping-0004fb0000130000e02ecd47d4a702db
  692. OVM> Connection closed.
  693. + for diskid in `echo "$DISK_IDS"`
  694. ++ echo 'OVM> list VirtualDisk
  695. Command: list VirtualDisk
  696. Status: Success
  697. Time: 2020-01-22 15:32:25,911 CET
  698. Data:
  699.   id:0004fb000012000015e3c500556ef3db.img  name:dsk_oracleDb
  700.   id:cfdd509d3b1b473ba44a422028a6dd28.img  name:Oracle12102DBRAC_x86_64-xvdb.img
  701.   id:0004fb0000120000ba1d796b651c3cf9.img  name:ASM5
  702.   id:ecc77d7e49924b3b9696c26ebc72eb0b.img  name:System.img
  703.   id:0004fb0000120000a4cf9b9e6d675858.img  name:dsk_menlnxoltst01 (5)
  704.   id:0004fb0000120000fc5659370b9d5da7.img  name:system (10)
  705.   id:0004fb0000120000c2d6e30e18044413.img  name:ASM1
  706.   id:0004fb0000120000d9603d6d7dd60ab5.img  name:ASM4
  707.   id:0004fb0000120000509ab65106d48e42.img  name:Hdisk01
  708.   id:0004fb00001200002104cd7067109ca0.img  name:ASM3
  709.   id:0004fb0000120000aa2638cd3c824268.img  name:ASM2
  710.   id:0004fb0000120000d58d1f3ecf501154.img  name:dsk_OracleOASDB
  711.   id:0004fb0000120000cb3ba17d1d09dbc0.img  name:ASM4 (6)
  712.   id:0004fb00001200003fc571b32011828d.img  name:Oracle12102DBRAC_x86_64-xvdb.img (6)
  713.   id:0004fb0000120000d4907b209fc7++ grep -c 0004fb0000120000a4cf9b9e6d675858.img
  714. 41d1.img  name:ASM1 (6)
  715.   id:0004fb0000120000c5ea399916df9e4d.img  name:system (6)
  716.   id:0004fb00001200004250282a966f8893.img  name:obi12bc_disk01 (2)
  717.   id:0004fb00001200002d8245a9c8730b52.img  name:ASM5 (6)
  718.   id:0004fb000012000029978c93135cdd5b.img  name:ASM2 (6)
  719.   id:0004fb000012000068081c7e5bf31531.img  name:System.img (6)
  720.   id:0004fb0000120000875183fd98635223.img  name:ASM3 (6)
  721.   id:0004fb0000120000e53b054aa0f7d1fc.img  name:system (2)
  722.   id:0004fb0000120000122c3a12efca59ec.img  name:system (4)
  723. OVM> Connection closed.'
  724. + isvirtual=1
  725.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  726.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]'
  727. ++ grep 0004fb0000120000a4cf9b9e6d675858.img
  728. ++ awk '{print $5}'
  729. + diskmapping=0004fb00001300004788633c58b4dbd8
  730. + '[' 1 -lt 1 ']'
  731. ++ ssh admin@menlnxoravmm -p 10000 show virtualdisk id=0004fb0000120000a4cf9b9e6d675858.img
  732. ++ grep 'Repository Id ='
  733. ++ cut -d '[' -f2
  734. ++ cut -d ']' -f1
  735. + reponame=MyRepoOvmTst
  736. + '[' MyRepoOvmTst = repotarget ']'
  737. + ssh admin@menlnxoravmm -p 10000 create VmCloneStorageMapping cloneType=SPARSE_COPY name=Storage_Mapping-0004fb00001300004788633c58b4dbd8 vmDiskMapping=0004fb00001300004788633c58b4dbd8 repository=repotarget on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  738. OVM> create VmCloneStorageMapping cloneType=SPARSE_COPY name=Storage_Mapping-0004fb00001300004788633c58b4dbd8 vmDiskMapping=0004fb00001300004788633c58b4dbd8 repository=repotarget on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  739. Command: create VmCloneStorageMapping cloneType=SPARSE_COPY name=Storage_Mapping-0004fb00001300004788633c58b4dbd8 vmDiskMapping=0004fb00001300004788633c58b4dbd8 repository=repotarget on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  740. Status: Success
  741. Time: 2020-01-22 15:32:41,504 CET
  742. JobId: 1579703561293
  743. Data:
  744.   id:0004fb00001300007064a43832f0d376  name:Storage_Mapping-0004fb00001300004788633c58b4dbd8
  745. OVM> Connection closed.
  746. ++ grep 'Vnic .* ='
  747. ++ echo 'OVM> show vm name=menlnxolasc01
  748. Command: show vm name=menlnxolasc01
  749. Status: Success
  750. Time: 2020-01-22 15:32:25,460 CET
  751. Data:
  752.   Status = Stopped
  753.   Memory (MB) = 8192
  754.   Max. Memory (MB) = 16384
  755.   Processors = 4
  756.   Max. Processors = 8
  757.   Priority = 50
  758.   Processor Cap = 100
  759.   High Availability = No
  760.   Operating System = Oracle Linux 6
  761.   Mouse Type = OS Default
  762.   Domain Type = Xen PVM
  763.   Keymap = en-us
  764.   Start Policy = Use Pool Policy
  765.   Origin = ftp://?uname?:?pwd?@10.1.3.93/../OVM_OL6U8_x86_64_PVM.ova
  766.   Disk Limit = 104
  767.   Huge Pages Enabled = No
  768.   Config File Absolute Path = /dev/mapper/3600507630081023be800000000000136/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  769.   Config File Mounted Path = /OVS/Repositories/0004fb00000300001676a3a8e389505f/VirtualMachines/0004fb00000600009855697447447620/vm.cfg
  770.   Server = 31:36:36:36:32:36:5a:43:4a:33:32:39:30:33:33:37  [menlnxovmtst]
  771.   Server Pool = 0004fb000002000095437b56c59fc329  [OvmTestPool]
  772.   Repository = 0004fb00000300001676a3a8e389505f  [MyRepoOvmTst]
  773.   Vnic 1 = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  774.   VmDiskMapping 1 = 0004fb0000130000e02ecd47d4a702db  [Mapping for disk Id (0004fb0000120000fc5659370b9d5da7.img)]
  775.   VmDiskMapping 2 = 0004fb00001300004788633c58b4dbd8  [Mapping for disk Id (0004fb0000120000a4cf9b9e6d675858.img)]
  776.   VmCloneCustomizer 1 = 0004fb00001300008a64033fe03c2da6  [menlnxolasc01-move-to-repotarget-20200114-1231]
  777.   VmCloneCustomizer 2 = 0004fb000013000064a05049250b3016  [menlnxolasc01-move-to-MyRepoOvmTst-20200114-1543]
  778.   VmCloneCustomizer 3 = 0004fb00001300005bda1155c5c284c9  [menlnxolasc01-move-to-repotarget-20200114-1620]
  779.   VmCloneCustomizer 4 = 0004fb000013000093f619e4551e56fc  [menlnxolasc01-move-to-MyRepoOvmTst-20200115-0845]
  780.   VmCloneCustomizer 5 = 0004fb00001300001e07ab5280e49133  [menlnxolasc01-move-to-MyRepoOvmTst-20200121-1534]
  781.   Restart Action On Crash = Restart
  782.   Id = 0004fb00000600009855697447447620  [menlnxolasc01]
  783.   Name = menlnxolasc01
  784.   Description = Server name menlnxolasc01
  785. ip address 10.1.24.160
  786.   Locked = false
  787.   DeprecatedAttrs = [Huge Pages Enabled (Deprecated for PV guest)]
  788. OVM> Connection closed.'
  789. ++ cut -d = -f2
  790. ++ cut -d '[' -f1
  791. ++ sed -e 's/ //g'
  792. + NETWORK_IDS=0004fb0000070000c94d3aa01fd314d0
  793. ++ echo 0004fb0000070000c94d3aa01fd314d0
  794. + for vnicid in `echo "$NETWORK_IDS"`
  795. ++ ssh admin@menlnxoravmm -p 10000 show vnic id=0004fb0000070000c94d3aa01fd314d0
  796. + vnicdetails='OVM> show vnic id=0004fb0000070000c94d3aa01fd314d0
  797. Command: show vnic id=0004fb0000070000c94d3aa01fd314d0
  798. Status: Success
  799. Time: 2020-01-22 15:32:41,825 CET
  800. Data:
  801.   Mac Address = 00:21:f6:25:3f:08
  802.   Ip Address 1 = 10.1.24.160
  803.   Ip Address 2 = fe80::221:f6ff:fe25:3f08
  804.   Interface Name = eth0
  805.   Vm = 0004fb00000600009855697447447620  [menlnxolasc01]
  806.   Network = 102291e43c  [Internal01]
  807.   Id = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  808.   Name = 00:21:f6:25:3f:08
  809.   Locked = false
  810. OVM> Connection closed.'
  811. ++ echo 'OVM> show vnic id=0004fb0000070000c94d3aa01fd314d0
  812. Command: show vnic id=0004fb0000070000c94d3aa01fd314d0
  813. Status: Success
  814. Time: 2020-01-22 15:32:41,825 CET
  815. Data:
  816.   Mac Address = 00:21:f6:25:3f:08
  817.   Ip Address 1 = 10.1.24.160
  818.   Ip Address 2 = fe80::221:f6ff:fe25:3f08
  819.   Interface Name = eth0
  820.   Vm = 0004fb00000600009855697447447620  [menlnxolasc01]
  821.   Network = 102291e43c  [Internal01]
  822.   Id = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  823.   Name = 00:21:f6:25:3f:08
  824.   Locked = false
  825. OVM> Connection closed.'
  826. ++ grep 'Mac Address ='
  827. ++ cut -d = -f2
  828. ++ sed -e 's/ //g'
  829. + vnicname=00:21:f6:25:3f:08
  830. ++ echo 'OVM> show vnic id=0004fb0000070000c94d3aa01fd314d0
  831. Command: show vnic id=0004fb0000070000c94d3aa01fd314d0
  832. Status: Success
  833. Time: 2020-01-22 15:32:41,825 CET
  834. Data:
  835.   Mac Address = 00:21:f6:25:3f:08
  836.   Ip Address 1 = 10.1.24.160
  837.   Ip Address 2 = fe80::221:f6ff:fe25:3f08
  838.   Interface Name = eth0
  839.   Vm = 0004fb00000600009855697447447620  [menlnxolasc01]
  840.   Network = 102291e43c  [Internal01]
  841.   Id = 0004fb0000070000c94d3aa01fd314d0  [00:21:f6:25:3f:08]
  842.   Name = 00:21:f6:25:3f:08
  843.   Locked = false
  844. OVM> Connection closed.'
  845. ++ cut -d = -f2
  846. ++ cut -d '[' -f1
  847. ++ sed -e 's/ //g'
  848. ++ grep 'Network ='
  849. + vnicnetworkid=102291e43c
  850. + ssh admin@menlnxoravmm -p 10000 create VmCloneNetworkMapping name=NetworkMapping-0004fb0000070000c94d3aa01fd314d0 network=102291e43c vnic=0004fb0000070000c94d3aa01fd314d0 on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  851. OVM> create VmCloneNetworkMapping name=NetworkMapping-0004fb0000070000c94d3aa01fd314d0 network=102291e43c vnic=0004fb0000070000c94d3aa01fd314d0 on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  852. Command: create VmCloneNetworkMapping name=NetworkMapping-0004fb0000070000c94d3aa01fd314d0 network=102291e43c vnic=0004fb0000070000c94d3aa01fd314d0 on VmCloneCustomizer name=menlnxolasc01-move-to-repotarget-20200122-1532
  853. Status: Success
  854. Time: 2020-01-22 15:32:42,485 CET
  855. JobId: 1579703562266
  856. Data:
  857.   id:0004fb00001300002ceea145d56d6e8e  name:NetworkMapping-0004fb0000070000c94d3aa01fd314d0
  858. OVM> Connection closed.
  859. + each_cycle=30
  860. + sleep 30
  861. + ssh admin@menlnxoravmm -p 10000 moveVmToRepository Vm name=menlnxolasc01 CloneCustomizer=menlnxolasc01-move-to-repotarget-20200122-1532 targetRepository=repotarget
  862. OVM> moveVmToRepository Vm name=menlnxolasc01 CloneCustomizer=menlnxolasc01-move-to-repotarget-20200122-1532 targetRepository=repotarget
  863. ++ ssh admin@menlnxoravmm -p 10000 list job
  864. ++ grep -i 'Move Vm'
  865. ++ grep menlnxolasc01
  866. ++ head -1
  867. ++ cut -d : -f2
  868. ++ cut -d ' ' -f1
  869. + job_id=
  870. + done=0
  871. + i=30
  872. + '[' 0 -lt 1 ']'
  873. + echo '==> Waiting for Vm moving to complete......30 seconds'
  874. ==> Waiting for Vm moving to complete......30 seconds
  875. + let i=i+30
  876. + sleep 30
  877. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  878. ++ grep -c 'Summary Done = Yes'
  879. + done=0
  880. + '[' 0 -lt 1 ']'
  881. + echo '==> Waiting for Vm moving to complete......60 seconds'
  882. ==> Waiting for Vm moving to complete......60 seconds
  883. + let i=i+30
  884. + sleep 30
  885. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  886. ++ grep -c 'Summary Done = Yes'
  887. + done=0
  888. + '[' 0 -lt 1 ']'
  889. + echo '==> Waiting for Vm moving to complete......90 seconds'
  890. ==> Waiting for Vm moving to complete......90 seconds
  891. + let i=i+30
  892. + sleep 30
  893. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  894. ++ grep -c 'Summary Done = Yes'
  895. + done=0
  896. + '[' 0 -lt 1 ']'
  897. + echo '==> Waiting for Vm moving to complete......120 seconds'
  898. ==> Waiting for Vm moving to complete......120 seconds
  899. + let i=i+30
  900. + sleep 30
  901. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  902. ++ grep -c 'Summary Done = Yes'
  903. + done=0
  904. + '[' 0 -lt 1 ']'
  905. + echo '==> Waiting for Vm moving to complete......150 seconds'
  906. ==> Waiting for Vm moving to complete......150 seconds
  907. + let i=i+30
  908. + sleep 30
  909. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  910. ++ grep -c 'Summary Done = Yes'
  911. + done=0
  912. + '[' 0 -lt 1 ']'
  913. + echo '==> Waiting for Vm moving to complete......180 seconds'
  914. ==> Waiting for Vm moving to complete......180 seconds
  915. + let i=i+30
  916. + sleep 30
  917. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  918. ++ grep -c 'Summary Done = Yes'
  919. + done=0
  920. + '[' 0 -lt 1 ']'
  921. + echo '==> Waiting for Vm moving to complete......210 seconds'
  922. ==> Waiting for Vm moving to complete......210 seconds
  923. + let i=i+30
  924. + sleep 30
  925. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  926. ++ grep -c 'Summary Done = Yes'
  927. + done=0
  928. + '[' 0 -lt 1 ']'
  929. + echo '==> Waiting for Vm moving to complete......240 seconds'
  930. ==> Waiting for Vm moving to complete......240 seconds
  931. + let i=i+30
  932. + sleep 30
  933. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  934. ++ grep -c 'Summary Done = Yes'
  935. + done=0
  936. + '[' 0 -lt 1 ']'
  937. + echo '==> Waiting for Vm moving to complete......270 seconds'
  938. ==> Waiting for Vm moving to complete......270 seconds
  939. + let i=i+30
  940. + sleep 30
  941. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  942. ++ grep -c 'Summary Done = Yes'
  943. + done=0
  944. + '[' 0 -lt 1 ']'
  945. + echo '==> Waiting for Vm moving to complete......300 seconds'
  946. ==> Waiting for Vm moving to complete......300 seconds
  947. + let i=i+30
  948. + sleep 30
  949. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  950. ++ grep -c 'Summary Done = Yes'
  951. + done=0
  952. + '[' 0 -lt 1 ']'
  953. + echo '==> Waiting for Vm moving to complete......330 seconds'
  954. ==> Waiting for Vm moving to complete......330 seconds
  955. + let i=i+30
  956. + sleep 30
  957. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  958. ++ grep -c 'Summary Done = Yes'
  959. + done=0
  960. + '[' 0 -lt 1 ']'
  961. + echo '==> Waiting for Vm moving to complete......360 seconds'
  962. ==> Waiting for Vm moving to complete......360 seconds
  963. + let i=i+30
  964. + sleep 30
  965. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  966. ++ grep -c 'Summary Done = Yes'
  967. + done=0
  968. + '[' 0 -lt 1 ']'
  969. + echo '==> Waiting for Vm moving to complete......390 seconds'
  970. ==> Waiting for Vm moving to complete......390 seconds
  971. + let i=i+30
  972. + sleep 30
  973. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  974. ++ grep -c 'Summary Done = Yes'
  975. + done=0
  976. + '[' 0 -lt 1 ']'
  977. + echo '==> Waiting for Vm moving to complete......420 seconds'
  978. ==> Waiting for Vm moving to complete......420 seconds
  979. + let i=i+30
  980. + sleep 30
  981. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  982. ++ grep -c 'Summary Done = Yes'
  983. + done=0
  984. + '[' 0 -lt 1 ']'
  985. + echo '==> Waiting for Vm moving to complete......450 seconds'
  986. ==> Waiting for Vm moving to complete......450 seconds
  987. + let i=i+30
  988. + sleep 30
  989. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  990. ++ grep -c 'Summary Done = Yes'
  991. + done=0
  992. + '[' 0 -lt 1 ']'
  993. + echo '==> Waiting for Vm moving to complete......480 seconds'
  994. ==> Waiting for Vm moving to complete......480 seconds
  995. + let i=i+30
  996. + sleep 30
  997. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  998. ++ grep -c 'Summary Done = Yes'
  999. + done=0
  1000. + '[' 0 -lt 1 ']'
  1001. + echo '==> Waiting for Vm moving to complete......510 seconds'
  1002. ==> Waiting for Vm moving to complete......510 seconds
  1003. + let i=i+30
  1004. + sleep 30
  1005. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1006. ++ grep -c 'Summary Done = Yes'
  1007. + done=0
  1008. + '[' 0 -lt 1 ']'
  1009. + echo '==> Waiting for Vm moving to complete......540 seconds'
  1010. ==> Waiting for Vm moving to complete......540 seconds
  1011. + let i=i+30
  1012. + sleep 30
  1013. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1014. ++ grep -c 'Summary Done = Yes'
  1015. + done=0
  1016. + '[' 0 -lt 1 ']'
  1017. + echo '==> Waiting for Vm moving to complete......570 seconds'
  1018. ==> Waiting for Vm moving to complete......570 seconds
  1019. + let i=i+30
  1020. + sleep 30
  1021. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1022. ++ grep -c 'Summary Done = Yes'
  1023. + done=0
  1024. + '[' 0 -lt 1 ']'
  1025. + echo '==> Waiting for Vm moving to complete......600 seconds'
  1026. ==> Waiting for Vm moving to complete......600 seconds
  1027. + let i=i+30
  1028. + sleep 30
  1029. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1030. ++ grep -c 'Summary Done = Yes'
  1031. + done=0
  1032. + '[' 0 -lt 1 ']'
  1033. + echo '==> Waiting for Vm moving to complete......630 seconds'
  1034. ==> Waiting for Vm moving to complete......630 seconds
  1035. + let i=i+30
  1036. + sleep 30
  1037. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1038. ++ grep -c 'Summary Done = Yes'
  1039. + done=0
  1040. + '[' 0 -lt 1 ']'
  1041. + echo '==> Waiting for Vm moving to complete......660 seconds'
  1042. ==> Waiting for Vm moving to complete......660 seconds
  1043. + let i=i+30
  1044. + sleep 30
  1045. Command: moveVmToRepository Vm name=menlnxolasc01 CloneCustomizer=menlnxolasc01-move-to-repotarget-20200122-1532 targetRepository=repotarget
  1046. Status: Success
  1047. Time: 2020-01-22 15:44:15,393 CET
  1048. JobId: 1579703563002
  1049. OVM> Connection closed.
  1050. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1051. ++ grep -c 'Summary Done = Yes'
  1052. + done=0
  1053. + '[' 0 -lt 1 ']'
  1054. + echo '==> Waiting for Vm moving to complete......690 seconds'
  1055. ==> Waiting for Vm moving to complete......690 seconds
  1056. + let i=i+30
  1057. + sleep 30
  1058. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1059. ++ grep -c 'Summary Done = Yes'
  1060. + done=0
  1061. + '[' 0 -lt 1 ']'
  1062. + echo '==> Waiting for Vm moving to complete......720 seconds'
  1063. ==> Waiting for Vm moving to complete......720 seconds
  1064. + let i=i+30
  1065. + sleep 30
  1066. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1067. ++ grep -c 'Summary Done = Yes'
  1068. + done=0
  1069. + '[' 0 -lt 1 ']'
  1070. + echo '==> Waiting for Vm moving to complete......750 seconds'
  1071. ==> Waiting for Vm moving to complete......750 seconds
  1072. + let i=i+30
  1073. + sleep 30
  1074. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1075. ++ grep -c 'Summary Done = Yes'
  1076. + done=0
  1077. + '[' 0 -lt 1 ']'
  1078. + echo '==> Waiting for Vm moving to complete......780 seconds'
  1079. ==> Waiting for Vm moving to complete......780 seconds
  1080. + let i=i+30
  1081. + sleep 30
  1082. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1083. ++ grep -c 'Summary Done = Yes'
  1084. + done=0
  1085. + '[' 0 -lt 1 ']'
  1086. + echo '==> Waiting for Vm moving to complete......810 seconds'
  1087. ==> Waiting for Vm moving to complete......810 seconds
  1088. + let i=i+30
  1089. + sleep 30
  1090. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1091. ++ grep -c 'Summary Done = Yes'
  1092. + done=0
  1093. + '[' 0 -lt 1 ']'
  1094. + echo '==> Waiting for Vm moving to complete......840 seconds'
  1095. ==> Waiting for Vm moving to complete......840 seconds
  1096. + let i=i+30
  1097. + sleep 30
  1098. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1099. ++ grep -c 'Summary Done = Yes'
  1100. + done=0
  1101. + '[' 0 -lt 1 ']'
  1102. + echo '==> Waiting for Vm moving to complete......870 seconds'
  1103. ==> Waiting for Vm moving to complete......870 seconds
  1104. + let i=i+30
  1105. + sleep 30
  1106. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1107. ++ grep -c 'Summary Done = Yes'
  1108. + done=0
  1109. + '[' 0 -lt 1 ']'
  1110. + echo '==> Waiting for Vm moving to complete......900 seconds'
  1111. ==> Waiting for Vm moving to complete......900 seconds
  1112. + let i=i+30
  1113. + sleep 30
  1114. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1115. ++ grep -c 'Summary Done = Yes'
  1116. + done=0
  1117. + '[' 0 -lt 1 ']'
  1118. + echo '==> Waiting for Vm moving to complete......930 seconds'
  1119. ==> Waiting for Vm moving to complete......930 seconds
  1120. + let i=i+30
  1121. + sleep 30
  1122. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1123. ++ grep -c 'Summary Done = Yes'
  1124. + done=0
  1125. + '[' 0 -lt 1 ']'
  1126. + echo '==> Waiting for Vm moving to complete......960 seconds'
  1127. ==> Waiting for Vm moving to complete......960 seconds
  1128. + let i=i+30
  1129. + sleep 30
  1130. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1131. ++ grep -c 'Summary Done = Yes'
  1132. + done=0
  1133. + '[' 0 -lt 1 ']'
  1134. + echo '==> Waiting for Vm moving to complete......990 seconds'
  1135. ==> Waiting for Vm moving to complete......990 seconds
  1136. + let i=i+30
  1137. + sleep 30
  1138. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1139. ++ grep -c 'Summary Done = Yes'
  1140. + done=0
  1141. + '[' 0 -lt 1 ']'
  1142. + echo '==> Waiting for Vm moving to complete......1020 seconds'
  1143. ==> Waiting for Vm moving to complete......1020 seconds
  1144. + let i=i+30
  1145. + sleep 30
  1146. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1147. ++ grep -c 'Summary Done = Yes'
  1148. + done=0
  1149. + '[' 0 -lt 1 ']'
  1150. + echo '==> Waiting for Vm moving to complete......1050 seconds'
  1151. ==> Waiting for Vm moving to complete......1050 seconds
  1152. + let i=i+30
  1153. + sleep 30
  1154. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1155. ++ grep -c 'Summary Done = Yes'
  1156. + done=0
  1157. + '[' 0 -lt 1 ']'
  1158. + echo '==> Waiting for Vm moving to complete......1080 seconds'
  1159. ==> Waiting for Vm moving to complete......1080 seconds
  1160. + let i=i+30
  1161. + sleep 30
  1162. ++ ssh admin@menlnxoravmm -p 10000 show job id=
  1163. ++ grep -c 'Summary Done = Yes'
  1164. + done=0
  1165. + '[' 0 -lt 1 ']'
  1166. + echo '==> Waiting for Vm moving to complete......1110 seconds'
  1167. ==> Waiting for Vm moving to complete......1110 seconds
  1168. + let i=i+30
  1169. + sleep 30
  1170. ^Z
  1171. [1]+  Stopped                 sh -x ./MoveVm.sh Menovs16 menlnxoravmm menlnxolasc01 OvmTestPool repotarget N N
  1172. [nardia@andrea MoveVm_0.3]$
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top