{"id":731,"date":"2020-07-08T06:27:04","date_gmt":"2020-07-08T06:27:04","guid":{"rendered":"http:\/\/labiol.xyz\/?p=731"},"modified":"2020-12-08T06:27:45","modified_gmt":"2020-12-08T06:27:45","slug":"oracle-vm-migrate-hosts-between-clusters-to-change-storage-location-for-server-pool","status":"publish","type":"post","link":"https:\/\/www.labiol.xyz\/index.php\/2020\/07\/08\/oracle-vm-migrate-hosts-between-clusters-to-change-storage-location-for-server-pool\/","title":{"rendered":"Oracle VM: migrate hosts between clusters to change storage location for server pool."},"content":{"rendered":"\n<p>!!! <strong>Please be warned that all information in this article is based on my (and my colleagues) experiences. You can proceed with all these steps on YOUR responsibility. In any case you should contact Oracle official support to help you with this task. Some steps described here may destroy your environment and system data.<\/strong> !!!<\/p>\n\n\n\n<p>Task: change server pool storage. If storage for the server pool is implemented on SAN storage this task cannot be proceeded online. There is no procedure I could find (even with oracle support) to replace storage for the server pool with running virtual systems.&nbsp;<\/p>\n\n\n\n<p>Replacing storage for a \u201cServer Pool\u201d can be extremely important in situation you are planning replace storage system or plan to do some maintenance in SAN infrastructure that will exclude storage prepared for pool storage.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/J-fKjGD5dzYDA7kW1zYvDiNy_pqnOo4-bNhY5gNOz4nBjYyOLLHgJtoxovJmtKHf_0L3mFldpyoBGrpt18HAr1A_z_WcpVntRA5bzGUqvs8Gw794twGxYszoJcBwnQGkI0qMNlXt71XXG0i9qg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Storage is configured during \u201ccreate a server pool\u201d wizard by adding storage location.<\/p>\n\n\n\n<p>Having this special storage is a requirement to build a \u201cServer Pool\u201d. And this is a place where the \u201cServer Pool\u201d keeps all important needed to maintain.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/1oWlC1d6HTuJH0PbEC9QzLNsjNxihXC9mlMVReQxN1W_bnxDsBn49lE9m-2OlC7BNzh-HvkEm6tF96VVsIbwKKpnpnjW94i1YhlKqAm7nNlhom3DAXP9YI718FaGNq2hmSGNy6lTa0gnJJ36fg\" alt=\"\"\/><\/figure>\n\n\n\n<p>Several problems identified to complete the task:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>There are active virtual systems running in this server pool<\/li><li>Some of the vms has disks spanned between more than one repository<\/li><li>Lots of constraints in OVM therefore for that reason operation cannot be proceeded with running virtual systems<\/li><li>High risk of operation, especially if environment is big and there is no time for backup-recovery in requested time window<\/li><li>Only one operation can be proceeding at the same time. This is due to OVM Server limitation. You can start with several operations but most of them will wait for others to finish.<\/li><li>Some steps may be required to restart hosts. Plan this step in preparation as this could take more than 10 minutes to restart a single host.<\/li><\/ul>\n\n\n\n<p><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/Xk-iR1gOIu32i_StDdgMsaqQVgwI4vupDq98FRiC6WXIp4eHgLgcZ-U1PB6cnGbNj4wK0FAfCpq8dk5XUj18d5pANmF_osBVjbt5t2oYKWOxkgn89HlnV323dOvASPWSnmQr03mRDqYxKGIFQQ\" alt=\"\"\/><\/figure>\n\n\n\n<p>One more time I want to underline that operation cannot be done online, with the \u201cServer Pool\u201d currently running virtual systems lots of dependencies takes place.<\/p>\n\n\n\n<p>Preparation:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Double check if you have valid backup, define and plan backup before you can start with procedure<\/li><\/ul>\n\n\n\n<p><br>Copy and backup all virtual system and templates configuration file; you can use the following:&nbsp;<\/p>\n\n\n\n<p><br># mkdir \/home\/REPO&nbsp;<br># cp &#8211;parent \/OVS\/Repositories\/*\/VirtualMachines\/*\/mv.cfg \/home\/backup\/<\/p>\n\n\n\n<p>cp &#8211;parent \/OVS\/Repositories\/*\/Templates\/*\/mv.cfg \/home\/TEMPLATE\/<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>If possible, do offline snapshot of oracle vm manager; at least do mysql backup<\/li><li>Restart all vms. In case something goes wrong&nbsp; and additionally vm won&#8217;t up, you won\u2019t be able to determine what was the reason (long running vm without restart or your work)<\/li><li>Double check if you know all passwords, especially passwords for all hosts root users and \u201cOracle VM Agent Password\u201d.<\/li><li>Make notes (screenshots) of the environment. In particular placement of vms (if this is important from resources or licenses point of view).<br><\/li><\/ul>\n\n\n\n<p>Procedure:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You have to remove all virtual from the \u201cServer Pool\u201d. The easiest way is to move them to the \u201cUnassigned Virtual Machines\u201d folder. This can be done only for VM in powered off state.<br>It is possible to power off all vms at once by selecting the \u201cServer Pool\u201d, from perspective select virtual machines, select them with shift and stop them.<br><br><img loading=\"lazy\" decoding=\"async\" width=\"483\" height=\"231\" src=\"https:\/\/lh6.googleusercontent.com\/DnBwSOepIWyO8paY4cBGW_WyTZZeHEltJ5kv8RLrvfKohgJwGhr29wegcwjrnywtG2P0P3K0cLCHgvtmyEz7A3xfG40iznIZSkJ4kJpJ39hFPDnYq6G27uQ8G_ZrCHZt6FWLpD25DDqmTcW53A\"><br><\/li><li>Similar way you can select all vms and move them using mouse to \u201cUnassigned Virtual Machines\u201d.<\/li><li>Next step will be to edit all repositories ownership<br><br><img loading=\"lazy\" decoding=\"async\" width=\"605\" height=\"284\" src=\"https:\/\/lh4.googleusercontent.com\/0yVOOc_PnW2-9pXdCyYU2n8Jxd2v230HpspUQ2ydvHvdG24VW_tAPdpycPZJVGgexRWx-mGyYHeqOvtBPXhNNivsyAUHeiyQuJZ71xMVAWI5mbGedaahcTJ1VUob72pfudhcJQNpWAovp5F6rg\"><br><\/li><\/ul>\n\n\n\n<p>If you run into a failure step like this:<br><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/6QF38gasyojI1azbS0VLn9rbjJAohRTIW607VS_PXXmgvPrBq91CDbL6v69bOAkaIMPfgSimX-cEJGqw1Gt67cNGlp7I2CuV-FnCjzcuB712lRAWvqiRUmhWOnKjHvFciegHAMgtwnoWExgdrg\" width=\"605\" height=\"83\"><br><br>This means something is residing on the repository and these constraints need to be resolved. Maybe there is ISO attached to some vm or system template. Another possibility, you have vm spanned between more than one repository. In this scenario check next point<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>** VM has disk spanned between the repository**<br>With such configuration I wasn\u2019t able to release repository ownership. Task stuck on one or more hosts with no chance to succeed. Such vm needed to be deleted from inventory:<br><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/I2nvA9D3XgfegbxX9auskteGk2qnGRFSCQYZvT_3b9ZBalUXfk9wH_UvTAFgbrqdp5Is60pDxLjSB5mrTEsw-hcJgGCvxGv9cfXS-U48t2mzrXkx3f9J_8dbrT2FmCCYKwIs31XBOp6OlNnMCg\" width=\"298\" height=\"209\"><br><\/li><\/ul>\n\n\n\n<p>Make sure you have collected all vm configuration files as the manager is going to delete them in this step. Additionally, do not select any checkbox to delete.&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Unpresents all repositories from all hosts in the server pool<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/9pc-obSBeUn6dD4zyUCOilbLdH4UgyhrOhLJhSSPEqomWTa99N8C1I0ii5xv94b5uiBQ-O9UEr1q6caoMVFCHkm67ehn8tZTLjcm8ETANo303v7qQCswu_goYKInxsSQNwEnS7rVHQJlpHbVKw\" alt=\"\"\/><\/figure>\n\n\n\n<p>In case issues still exist you can try to restart a problematic host. There is no guarantee this helps, but in my scenario this helped with few hosts. Please plan this step during preparation as this could take more than 10 minutes to successfully reboot the server.<\/p>\n\n\n\n<p>This point is extremely important. Without this you won\u2019t be able to migrate hosts between the server pools.<br>Make sure that repositories ownership in the info perspective has changed to \u201cnot owned\u201d and there are no servers presented to.<br><br><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Migrate all servers to \u201cUnassigned Servers\u201d tab by simply drag and drop them in \u201cservers and VMs\u201d tab.\u00a0<\/li><li>If you are stuck with the last server, you will have to proceed with the additional steps.<br>Login to host via SSH and (backup and) remove the following files:<br><br><img loading=\"lazy\" decoding=\"async\" width=\"311\" height=\"93\" src=\"https:\/\/lh4.googleusercontent.com\/mjDwFrffRONFbCb_iGaLlNAxyq_h9Xle7wyAZmSpVLdTmOmwe9VIW3Vf6jIJuUmUi5LjuuiMKZJAMhSr3TC0k8cxoF3Nd7qaeClPPdbeMbOwf-vUoH-HhYEOOk38MlTquu2UWkWW-PYL7O_P2w\"><br><br>Do not change anything in the manager. Host after restart should automatically migrate to \u201cUnassigned Servers\u201d without any intervention. This can take some minutes.\u00a0<\/li><li>Add the host removed in the previous step to inventory by using the \u201cdiscover servers\u201d function.<\/li><\/ul>\n\n\n\n<p><br><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/xwSb01Pi_SCxdRy43l-S4brejAT3d-4HKfIfaYdfdZe7kVyQAofRgxHUY-gie0l94GYvKn1TivT-Bn9bgN3EgkXeJl1y0Al0T3AhNQkmcs6bk-RWr8VGT9PnCHJOde4RyNcJM_gpHkFTCz7new\" width=\"383\" height=\"257\"><br><br>Make sure you use the correct password to save a few minutes.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Create a new \u201cServer pool\u201d and migrate all hosts to it. If some hosts won\u2019t allow migration this means, there are some unresolved constraints. Try to check this, rescan host physical disks or restart host. Check if all previous steps were accomplished successfully.\u00a0<\/li><li>For all repositories select the new \u201cServer pool\u201d in the edit window. Click OK. Than edit it again and present repository to all hosts in \u201cServer pool\u201d<br><br><img loading=\"lazy\" decoding=\"async\" width=\"377\" height=\"262\" src=\"https:\/\/lh5.googleusercontent.com\/G9BXMFwPJz34P0nMaGHY4bKQnsPFhA7nuMoLBZyGihFnhy-ywrYSU-Fddntq6pFlyGQ7f-PcFX367JLAPBAPsz8V4h5w43BMmnrOZiF3jeakgQqQryQsQJ4KcFaDLs8h9aZc_g-7vj1cI_r0sA\"><br><\/li><li>Migrate all vms to the new \u201cServer Pool\u201d. Make sure they are placed on correct hosts.\u00a0<\/li><li>Deleted vm can be restored by simply copying their configuration files to the proper path, the same was before. After config files are placed in the correct place they should show up in inventory after a while. If not try to refresh the repository.<\/li><\/ul>\n\n\n\n<p>Conclusions:<\/p>\n\n\n\n<p>When planning downtime for this operation, make sure you can shut down all virtual machines in the &#8220;Server Pool&#8221;. Plan your time carefully within a given time window and then double it. Make sure you schedule the hosts restart as well as the time it takes to restart all virtual machines (2x).<\/p>\n\n\n\n<p>This procedure is not extremely complicated, but you may run into problems at every step without a simple solution. At some point, it may not be possible to return to the starting situation. Take the time to plan all steps in detail.<\/p>\n\n\n\n<p>Good luck!<\/p>\n\n\n\n<p>Useful links:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?_afrLoop=151307871939927&amp;id=1615376.1&amp;_afrWindowMode=0&amp;_adf.ctrl-state=18jssjcib8_4\">https:\/\/support.oracle.com\/epmos\/faces\/DocumentDisplay?_afrLoop=151307871939927&amp;id=1615376.1&amp;_afrWindowMode=0&amp;_adf.ctrl-state=18jssjcib8_4<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>!!! Please be warned that all information in this article is based on my (and my colleagues) experiences. You can proceed with all these steps on YOUR responsibility. In any case you should contact Oracle official support to help you with this task. Some steps described here may destroy your &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-731","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=731"}],"version-history":[{"count":3,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/731\/revisions"}],"predecessor-version":[{"id":734,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/posts\/731\/revisions\/734"}],"wp:attachment":[{"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.labiol.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}