Red Hatã§ã½ãªã¥ã¼ã·ã§ã³ã¢ã¼ããã¯ãããã¦ããç°ä¸å¸æ©(@tnk4on)ã§ãã ãã®é£è¼ã¯vSphereç°å¢ä¸ã«OpenShift Container Platformï¼ä»¥ä¸ãOpenShiftï¼ããã³OpenShift Virtualizationã®ç°å¢ãæ§ç¯ããæ¹æ³ã解説ããã·ãªã¼ãºã§ãã
第5åã¯Migration Toolkit for Virtualizationï¼MTVï¼ã使ã£ãvSphereä»®æ³ãã·ã³ã®ç§»è¡æ¹æ³ã«ã¤ãã¦è§£èª¬ãã¾ãã
- 第1åï¼OpenShiftã®ã¤ã³ã¹ãã¼ã«
- 第2åï¼OpenShiftã¤ã³ã¹ãã¼ã«å¾ã®ä½æ¥
- 第3åï¼å ±æã¹ãã¬ã¼ã¸ã®ä½æï¼NFS CSIãã©ã¤ãã¼ã®æ§ç¯ï¼
- 第4åï¼OpenShift Virtualizationã®ã¤ã³ã¹ãã¼ã«ã¨å®è¡
- 第5åï¼vSphereä»®æ³ãã·ã³ã®ç§»è¡ï¼âæ¬è¨äºï¼
- ãçªå¤ç·¨ãï¼å ±æã¹ãã¬ã¼ã¸ã®ä½æï¼NFSãããã¸ã§ãã¼ã®æ§ç¯ï¼
ï¼2024/10/2追è¨ï¼ç§»è¡å¾ã®ä»®æ³ãã·ã³ã®èµ·åç¶æ ã«ã¤ãã¦è¨è¼å 容ãä¿®æ£ï¼
-ç®æ¬¡-
- vSphereä»®æ³ãã·ã³ã®ç§»è¡
- åææ¡ä»¶
- 1. Migration Toolkit for Virtualizationã«ã¤ãã¦
- 2. Migration Toolkit for Virtualizationã®ã¤ã³ã¹ãã¼ã«
- 3. VDDKã¤ã¡ã¼ã¸ã®ä½æ
- 4. ãããã¤ãã¼ã®ä½æ
- 5. 移è¡è¨ç»ã®ä½æ
- 6. 移è¡è¨ç»ã®å®è¡ï¼ã³ã¼ã«ã移è¡ï¼
- 7. 移è¡è¨ç»ã®å®è¡ï¼ã¦ã©ã¼ã 移è¡ï¼
- ã¾ã¨ã
vSphereä»®æ³ãã·ã³ã®ç§»è¡
æ¬è¨äºã§ã¯vSphereä»®æ³ãã·ã³ã®ç§»è¡ã«ã¤ãã¦ãä¸è¨ã®å 容ãç´¹ä»ãã¾ãã
- Migration Toolkit for Virtualizationã«ã¤ãã¦
- Migration Toolkit for Virtualizationã®ã¤ã³ã¹ãã¼ã«
- VDDKã¤ã¡ã¼ã¸ã®ä½æ
- ãããã¤ãã¼ã®ä½æ
- 移è¡è¨ç»ã®ä½æ
- 移è¡è¨ç»ã®å®è¡ï¼ã³ã¼ã«ã移è¡ï¼
- 移è¡è¨ç»ã®å®è¡ï¼ã¦ã©ã¼ã 移è¡ï¼
åææ¡ä»¶
- é£è¼ç¬¬4åã®ä½æ¥ãå®äºãã¦ãããã¨ã¨ãã¾ã
- å ¨ä½ã®æ§æãåãã©ã¡ã¼ã¿ã¼ãªã©ã¯ç¬¬1åãåç §ãã¦ãã ãã
- ä½æ¥ç¨ç«¯æ«ã®ããã³ããã¯
%
ã¨ãã¾ã - è¸ã¿å°ãµã¼ãã¼ã®ããã³ããã¯
$
ã¨ãã¾ã - è¸ã¿å°ãµã¼ãã¼ã®ä½æ¥ã¯æ示çã«è¨è¼ãããå ´åãé¤ãã¦ãä½æ¥ãã£ã¬ã¯ããª
${HOME}/work
ã§ä½æ¥ãããã¨ã¨ãã¾ã
1. Migration Toolkit for Virtualizationã«ã¤ãã¦
1-1 移è¡å ãããã¤ãã¼
Migration Toolkit for Virtualizationï¼ä»¥ä¸ãMTVï¼ã¯ã対å¿ãã¦ãã移è¡å ããOpenShift Virtualizationã«ä»®æ³ãã·ã³ã移è¡ãããã¼ã«ã§ãã 対å¿ãã¦ãã移è¡å ãããã¤ãã¼ã¯ä¸è¨ã®éãã§ãã
- VMware vSphere
- Red Hat Virtualization (RHV)
- OpenStack
- VMware vSphere ã«ãã£ã¦ä½æããã Open Virtual Appliances (OVA)
- ãªã¢ã¼ãã® OpenShift Virtualization ã¯ã©ã¹ã¿ã¼
MTVã対å¿ãã¦ãããããã¤ãã¼ã¯ããã¥ã¡ã³ãã«è¨è¼ãããã¾ãã
第1ç« Migration Toolkit for Virtualization ã«ã¤ã㦠| Red Hat Product Documentation
æ¬è¨äºã§ã¯ä¸çªå¤ããã¼ãºã®vSphereï¼ESXiï¼ããã®ä»®æ³ãã·ã³ã®ç§»è¡ã対象ã¨ãã以å¾ã®è§£èª¬ã«ããã移è¡å ãããã¤ãã¼ã¯VMware vSphereãåæã¨ãã¾ãã
1-2 移è¡æ¹å¼
MTVã¯ã³ã¼ã«ã移è¡ã¨ã¦ã©ã¼ã 移è¡ã®2ã¤ã®ç§»è¡æ¹å¼ããµãã¼ããã¦ãã¾ãã
ï¼1ï¼ã³ã¼ã«ã移è¡
ããã©ã«ãã®ç§»è¡æ¹å¼ã§ã移è¡å ã®ä»®æ³ãã·ã³ãåæ¢ãã¦ç§»è¡ãè¡ãã¾ãã ä»®æ³ãã·ã³ã®åæ¢ä¸ã«ãã¼ã¿ã®ã³ãã¼ãè¡ãã®ã§ãä»®æ³ãã·ã³ã®ãµã¤ãºã大ããå ´åã¯ã³ãã¼ã«æéãããã移è¡ã«ä¼´ãåæ¢æéãé·ããªãå¯è½æ§ãããã¾ãã
ï¼2ï¼ã¦ã©ã¼ã 移è¡
移è¡å ã®ä»®æ³ãã·ã³ãèµ·åããç¶æ ã§ãã¼ã¿ã®ã³ãã¼ãè¡ãã¾ããæçµçã«ã«ãããªã¼ãã¼å¦çãè¡ããã¨ã§ãä»®æ³ãã·ã³ãåæ¢ããæ®ãã®ãã¼ã¿ãã³ãã¼ããã¾ãã ã¦ã©ã¼ã 移è¡ã¯ç§»è¡å ãvSphereããã³RHVã®ã¿å¯¾å¿ãã¦ãã¾ãã
OpenShift Virtualization v4.16.0-v4.16.2ã¯ã¦ã©ã¼ã 移è¡ãã§ãã¾ããã ã¦ã©ã¼ã 移è¡ãè¡ãå ´åã¯ãå¿ ãOpenShift Virtualization v4.16.3以éã«ã¢ãããã¼ããã¦ãå©ç¨ãã ããã
2. Migration Toolkit for Virtualizationã®ã¤ã³ã¹ãã¼ã«
2-1 ã¤ã³ã¹ãã¼ã«ã®æ¦è¦
MTVã®ã¤ã³ã¹ãã¼ã«ã¯ã第4åã§å®æ½ããOpenShift Virtualizationã®ã¤ã³ã¹ãã¼ã«ã¨åæ§ã«ãOperatorã使ã£ã¦è¡ãã¾ãã Operatorã使ã£ãMTVã®ã¤ã³ã¹ãã¼ã«ã®æµãã¯ä¸è¨ã®éãã§ãã
- Operatorã®ã¤ã³ã¹ãã¼ã«
- ForkliftControllerã®ä½æ
2-2 ã¤ã³ã¹ãã¼ã«ã®åææ¡ä»¶
MTVãã¤ã³ã¹ãã¼ã«ããã«ã¯å¯¾å¿ããOpenShiftããã³OpenShift Virtualizationãã¤ã³ã¹ãã¼ã«ããã¦ããå¿ è¦ãããã¾ãã
2-3 Operatorã®ã¤ã³ã¹ãã¼ã«
MTVã®ã¤ã³ã¹ãã¼ã«ä½æ¥ãè¡ãã¾ãã対象ã®ããã¥ã¡ã³ãã¯ä¸è¨ãåç §ãã¦ãã ããã
第3ç« MTV Operator ã®ã¤ã³ã¹ãã¼ã«ã¨è¨å® | Red Hat Product Documentation
OpenShiftã®Webã³ã³ã½ã¼ã«ãããOperator>Operator Hubãã¡ãã¥ã¼ãé¸æãã¾ãã
ãã¼ã¯ã¼ãã®å
¥åæ¬ã«openshift virt
ã¨å
¥åããã¨ãã£ã«ã¿ãªã³ã°ããã¦ãOpenShift Virtualizationãã¨ãMigration Toolkit for Virtualization Operatorãã®2ã¤ã表示ããã¾ãã
ãMigration Toolkit for Virtualization Operatorããé¸æãã¾ãã
ãã£ãã«ã¨ãã¼ã¸ã§ã³ã¯ããã©ã«ã表示ã®ã¾ã¾ã§ãã¤ã³ã¹ãã¼ã«ããæ¼ãã¾ãã
ã¤ã³ã¹ãã¼ã«ã®è©³ç´°å ¥åç»é¢ãéãã¾ããããã§ãããã©ã«ã表示ã®ã¾ã¾ã¤ã³ã¹ãã¼ã«ãæ¼ãã¾ãã ãªããï¼FCï¼ForkliftControllerãå¿ é ã¨ãªã£ã¦ãã¾ãããããã¯å¾ã»ã©ã¤ã³ã¹ãã¼ã«ããã®ã§ãã®ã¾ã¾ç¡è¦ãã¾ãã
- æ´æ°ãã£ãã«ï¼release-v2.6ï¼releaseãã¼ã¸ã§ã³ä»¥å¤ã«candidateãããï¼
- ãã¼ã¸ã§ã³ï¼2.6.7ï¼æ¬è¨äºå·çæç¹ã§ã¯ã2.6.7ããææ°ï¼
- ã¤ã³ã¹ãã¼ã«ã¢ã¼ãï¼ã¯ã©ã¹ã¿ã¼ã®ç¹å®ã®namespace
- ã¤ã³ã¹ãã¼ã«æ¸ã¿ã®namespaceï¼Operatoræ¨å¥¨ã®namespace:openshift-mtv
- æ´æ°ã®æ¿èªï¼èªå
Migration Toolkit for Virtualization Operatorã®ã¤ã³ã¹ãã¼ã«ãéå§ãã¾ããç°å¢ã«ãããã¾ãããã¤ã³ã¹ãã¼ã«ã®å®äºã¾ã§1åç¨åº¦ãããã¾ããã¤ã³ã¹ãã¼ã«ã®å®äºã¾ã§ãã®ã¾ã¾ã§ãå¾ ã¡ãã ããããªããã¤ã³ã¹ãã¼ã«èªä½ã¯ããã¯ã°ã©ã¦ã³ãã§ç¶ç¶ããããããä»ã®ç»é¢ã«é·ç§»ãã¦ãåé¡ããã¾ããã
ã¤ã³ã¹ãã¼ã«ãå®äºããã¨ãForkliftControllerã®ä½æããã¿ã³ã表示ããã¾ãããããæ¼ãã¦æ¬¡ã®ã¹ãããã«é²ã¿ã¾ãã
2-4 ForkliftControllerã®ä½æ
å ã®ã¹ãããã§ãForkliftControllerã®ä½æããã¿ã³ãæ¼ãã¨ããForkliftControllerã®ä½æç»é¢ãã表示ããã¾ãã ãã®ã¾ã¾ãä½æããã¿ã³ãæ¼ãã¾ãã
ãã®ãForkliftControllerã®ä½æç»é¢ãã¯ãWebã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãããOperator>ã¤ã³ã¹ãã¼ã«æ¸ã¿ã®Operator>Migration Toolkit for Virtualization Operatorããé¸æãã¦è¡¨ç¤ºãããç»é¢ä¸ã®ããForkliftControllerã®ä½æããã¿ã³ãæ¼ããå¾ã«åºãç»é¢ã¨åããã®ã§ããå¥ã®ç»é¢ã«é·ç§»ããå ´åã¯ããããä½æ¥ãç¶ç¶ãã¦ãã ããã
ãä½æããã¿ã³ãæ¼ããå¾ã¯èªåã§ãã¤ã³ã¹ãã¼ã«æ¸ã¿ã®Operator>Operatorã®è©³ç´°ç»é¢ããããForkliftControllerã®ã¿ããé¸æãããç¶æ ã®ç»é¢ã«é·ç§»ãã¾ãã
ã¤ã³ã¹ãã¼ã«ãé²ãã«ã¤ãã¹ãã¼ã¿ã¹ã®è¡¨ç¤ºãå¤ããã¾ãããããç°å¢ã«ããã¾ãããå®äºã¾ã§2-3åã»ã©ãããã¾ãã®ã§ã¾ã§ãã®ã¾ã¾å¾ æ©ãã¾ãã
ã¤ã³ã¹ãã¼ã«ã®å®äºå¾ãç»é¢ä¸é¨ã«ãããã¢ããç»é¢ã表示ããã¾ãï¼ã¹ãã¼ã¿ã¹è¡¨ç¤ºãå¤ããåã«è¡¨ç¤ºããããã¨ãããã¾ãï¼ããããã¢ããç»é¢å ã®ãWebã³ã³ã½ã¼ã«ã®æ´æ°ãã®ãªã³ã¯ãæ¼ããã¾ãã¯ãã©ã¦ã¶ããªãã¼ããã¾ãã
ç»é¢ã®æ´æ°å¾ãWebã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼å ã«ãMigrationãã®é ç®ã追å ããã¦ãã¾ãã
Webã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãããMigration>Overviewããé¸æãã¾ãã
以ä¸ã§Migration Toolkit for Virtualizationã®ã¤ã³ã¹ãã¼ã«ã¯å®äºã§ãã ç¶ãã¦vSphere/ESXiã®ä»®æ³ãã·ã³ã®ç§»è¡ã«ä½¿ç¨ããVDDKã¤ã¡ã¼ã¸ã®ä½æãè¡ãã¾ãã
3. VDDKã¤ã¡ã¼ã¸ã®ä½æ
VMware Virtual Disk Development Kit (以ä¸ãVDDK) ã¯VMwareã®ä»®æ³ãã£ã¹ã¯ã«ã¢ã¯ã»ã¹ãããä½æããããã®SDKã§ããMTVã¯VDDKã使ç¨ãvSphereä»®æ³ãã·ã³ã®è»¢éãé«éåãã¾ãã ãªããVDDKã®å©ç¨ã¯ä»»æã§ããå©ç¨ãããã¨ã¯å¼·ãæ¨å¥¨ãã¾ãï¼ã»ã¼å¿ é ï¼ã ããã§ã¯VDDKãçµã¿è¾¼ãã ã³ã³ããã¤ã¡ã¼ã¸ï¼VDDKã¤ã¡ã¼ã¸ï¼ãä½æããMTVããå©ç¨ã§ããããã«ãã¾ãã
VDDKã®å ¥æå ã¯Broadcom社ã«ããVMware社ã®è²·åå¾ã¯ãBroadcom社ã®ãµã¤ãã§é å¸ãè¡ããã¦ãã¾ãã
VDDKã¯Windowsããã³Linuxåãã®SDKãé å¸ããã¦ããããVMware Software Development Kit License Agreementãã¸ã®åæã«åºã¥ãå©ç¨ãå¯è½ã§ãã ãªããVDDKããã¦ã³ãã¼ãããã«ã¯Broadcomã®ã¢ã«ã¦ã³ãã§ãã°ã¤ã³ããå¿ è¦ãããã¾ãã äºåã«Linuxçã®VDDKãå ¥æããä½æ¥ç¨ç«¯æ«ã«ä¿åãã¦ããã¦ãã ãããææ°çã¯v8.0.3ã§ãï¼è¨äºå·çæç¹ï¼ã
3-1 VDDKã¤ã¡ã¼ã¸ã®ä½ææé
VDDKã¤ã¡ã¼ã¸ã®ä½ææé ã¯ä¸è¨ã®ããã¥ã¡ã³ããåºã«è¡ãã¾ãã
VDDKã¤ã¡ã¼ã¸ã®æ³¨æç¹ã¯ããããªãã¯ã®é åã«ä¿åããªãããã¨ã§ããã©ã¤ã»ã³ã¹ã§åé å¸ãç¦æ¢ããã¦ããããã§ãã æ¬è¨äºã§ã¯ãOpenShiftã®å é¨ã¤ã¡ã¼ã¸ã¬ã¸ã¹ããªã«VDDKã¤ã¡ã¼ã¸ãä¿åããããã«ãã¾ãã
ï¼1ï¼VDDKã¤ã¡ã¼ã¸ã®ãã«ã
è¸ã¿å°ãµã¼ãã¼ã§VDDKã¤ã¡ã¼ã¸ã®ä½æç¨ã®ä½æ¥ãã£ã¬ã¯ããªãä½æããããã¸ç§»åãã¾ãã
$ mkdir VDDK $ cd VDDK
VDDKãä½æ¥ç¨ç«¯æ«ãããè¸ã¿å°ãµã¼ãã¼ä¸ã®ä½æ¥ç¨ãã£ã¬ã¯ããªã«ã³ãã¼ãã¾ãã ãªããå ¥æããVDDKãä½æ¥ç¨ç«¯æ«ã®ã«ã¬ã³ããã£ã¬ã¯ããªã«ãããã¨ã¨ãã¾ãã
ï¼ä½æ¥ç¨ç«¯æ«ã§å®è¡ï¼ % scp VMware-vix-disklib-8.0.3-23950268.x86_64.tar.gz bastion:work/VDDK
è¸ã¿å°ãµã¼ãã¼ã§VDDKã解åãã¾ãã
$ ls -d VMware-vix-disklib-8.0.3-23950268.x86_64.tar.gz VMware-vix-disklib-8.0.3-23950268.x86_64.tar.gz $ tar xzf VMware-vix-disklib-8.0.3-23950268.x86_64.tar.gz $ ls -d vmware-vix-disklib-distrib vmware-vix-disklib-distrib
VDDKã¤ã¡ã¼ã¸ã®Dockerfileãä½æãã¾ãã*1
$ cat > Dockerfile <<EOF FROM registry.access.redhat.com/ubi8/ubi-minimal USER 1001 COPY vmware-vix-disklib-distrib /vmware-vix-disklib-distrib RUN mkdir -p /opt ENTRYPOINT ["cp", "-r", "/vmware-vix-disklib-distrib", "/opt"] EOF
ãã«ãããã¿ã°åãåå¾ããããã«OpenShiftã¯ã©ã¹ã¿ã¸ãã°ã¤ã³ãã¾ãã
ocpadmin
ã¦ã¼ã¶ã¼ã§ãã°ã¤ã³ããããã«KUBECONFIG
ç°å¢å¤æ°ã解é¤ãã¾ãã
詳細ã¯é£è¼ç¬¬2åãåç
§ã
$ unset KUBECONFIG $ oc login -u ocpadmin https://api.ocp.home.lab:6443 WARNING: Using insecure TLS client config. Setting this option is not supported! Console URL: https://api.ocp.home.lab:6443/console Authentication required for https://api.ocp.home.lab:6443 (openshift) Username: ocpadmin Password:
ãã¹ã¯ã¼ããå ¥åãã¦OpenShiftã«ãã°ã¤ã³ã§ãããã¨ã確èªãã¾ãã
Login successful. You have access to 74 projects, the list has been suppressed. You can list all projects with 'oc projects' Using project "ocp-virt".
ã¤ã¡ã¼ã¸ã¬ã¸ã¹ããªã®URLãåå¾ãHOST
ç°å¢å¤æ°ã¸ã»ãããã¾ãã
詳細ã¯é£è¼ç¬¬3åãåç
§ã
$ HOST=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}') $ echo ${HOST} default-route-openshift-image-registry.apps.ocp.home.lab
åå¾ããHOST
ç°å¢å¤æ°ãã¿ã°åã«ä½¿ç¨ããVDDKã¤ã¡ã¼ã¸ããã«ããã¾ãã
å®è¡ã³ãã³ã
$ podman build -t ${HOST}/openshift/vddk .
å®è¡ã³ãã³ãã¨çµæ
$ podman build -t ${HOST}/openshift/vddk . STEP 1/5: FROM registry.access.redhat.com/ubi8/ubi-minimal Trying to pull registry.access.redhat.com/ubi8/ubi-minimal:latest... Getting image source signatures Checking if image destination supports signatures Copying blob 76e9cdf18aba done | Copying config 7aaf580966 done | Writing manifest to image destination Storing signatures STEP 2/5: USER 1001 --> 9690c68eb273 STEP 3/5: COPY vmware-vix-disklib-distrib /vmware-vix-disklib-distrib --> e6bd091b0d6a STEP 4/5: RUN mkdir -p /opt --> cc8588d591eb STEP 5/5: ENTRYPOINT ["cp", "-r", "/vmware-vix-disklib-distrib", "/opt"] COMMIT default-route-openshift-image-registry.apps.ocp.home.lab/openshift/vddk --> 7da3e1ed5e31 Successfully tagged default-route-openshift-image-registry.apps.ocp.home.lab/openshift/vddk:latest 7da3e1ed5e3158a4a685609285f67ab18bf86721617e0305fd5e9fdee1eafbd0
ï¼2ï¼VDDKã¤ã¡ã¼ã¸ã®ããã·ã¥
OpenShiftã®ãã°ã¤ã³æ
å ±ã¨HOST
ç°å¢å¤æ°ãå©ç¨ãã¦ãpodman login
ã³ãã³ãã§ã¤ã¡ã¼ã¸ã¬ã¸ã¹ããªã¸ãã°ã¤ã³ãã¾ãã
$ podman login -u ocpadmin -p $(oc whoami -t) ${HOST} Login Succeeded!
ç¶ãã¦ãVDDKã¤ã¡ã¼ã¸ã®ããã·ã¥ãè¡ãã¾ãã
å®è¡ã³ãã³ã
$ podman push ${HOST}/openshift/vddk
å®è¡ã³ãã³ãã¨çµæ
$ podman push ${HOST}/openshift/vddk Getting image source signatures Copying blob 67be5b5d64dc done | Copying blob 405af4f177b1 done | Copying blob bae4fda36bb4 done | Copying config 7da3e1ed5e done | Writing manifest to image destination
確èªã³ãã³ã
$ skopeo inspect docker://${HOST}/openshift/vddk
Skopeoã使ã£ã¦ããã·ã¥ããã³ã³ããã¤ã¡ã¼ã¸ãã¤ã¡ã¼ã¸ã¬ã¸ã¹ããªã¼ã«ç»é²ããã¦ããã確èªãã¾ãã
確èªã³ãã³ãã¨çµæ
åºåçµæãéã
$ skopeo inspect docker://${HOST}/openshift/vddk { "Name": "default-route-openshift-image-registry.apps.ocp.home.lab/openshift/vddk", "Digest": "sha256:e37ebbedc80cb490fa7909cae202301fbe8e604a712354db5054a0a002ea58e1", "RepoTags": [ "latest" ], "Created": "2024-07-30T06:52:39.356472214Z", "DockerVersion": "", "Labels": { "architecture": "x86_64", "build-date": "2024-06-27T11:18:10", "com.redhat.component": "ubi8-minimal-container", "com.redhat.license_terms": "https://www.redhat.com/en/about/red-hat-end-user-license-agreements#UBI", "description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", "distribution-scope": "public", "io.buildah.version": "1.33.7", "io.k8s.description": "The Universal Base Image Minimal is a stripped down image that uses microdnf as a package manager. This base image is freely redistributable, but Red Hat only supports Red Hat technologies through subscriptions for Red Hat products. This image is maintained by Red Hat and updated regularly.", "io.k8s.display-name": "Red Hat Universal Base Image 8 Minimal", "io.openshift.expose-services": "", "io.openshift.tags": "minimal rhel8", "maintainer": "Red Hat, Inc.", "name": "ubi8-minimal", "release": "1018", "summary": "Provides the latest release of the minimal Red Hat Universal Base Image 8.", "url": "https://access.redhat.com/containers/#/registry.access.redhat.com/ubi8-minimal/images/8.10-1018", "vcs-ref": "4f8da2b64a13f2a264bd802d8909bf803211fb20", "vcs-type": "git", "vendor": "Red Hat, Inc.", "version": "8.10" }, "Architecture": "amd64", "Os": "linux", "Layers": [ "sha256:76e9cdf18aba09dd872666d609fbdc8cd5c6c418c119dc113872061ba434b70f", "sha256:f83fb1808400a57a0096f736d9b38e7e4f7ee405a2bb968702c3402d5286019d", "sha256:6c7b8478d4963d8b248ed45d3496c02cab837c540eafe989e6107454846c7571" ], "LayersData": [ { "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip", "Digest": "sha256:76e9cdf18aba09dd872666d609fbdc8cd5c6c418c119dc113872061ba434b70f", "Size": 39346374, "Annotations": null }, { "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip", "Digest": "sha256:f83fb1808400a57a0096f736d9b38e7e4f7ee405a2bb968702c3402d5286019d", "Size": 44400224, "Annotations": null }, { "MIMEType": "application/vnd.oci.image.layer.v1.tar+gzip", "Digest": "sha256:6c7b8478d4963d8b248ed45d3496c02cab837c540eafe989e6107454846c7571", "Size": 226, "Annotations": null } ], "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "container=oci" ] }
VDDKã¤ã¡ã¼ã¸ã®ä½æãå®äºãã¾ããã次ã¯ç§»è¡å ãããã¤ãã¼ã®ä½æãè¡ãã¾ãã
4. ãããã¤ãã¼ã®ä½æ
MTVã¯ç§»è¡å ãããã¤ãã¼ã¨ãã¦VMware vSphereã«å¯¾å¿ãã¦ãã¾ãããå®éã«ã¯vCenter Serverã¾ãã¯ESXiãæå®ãã¦ç»é²ãè¡ãã¾ãã æ¬é£è¼ã¯ã§ESXiã移è¡å ãããã¤ãã¼ã¨ãã¦æå®ãã¾ãã
Webã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãããMigration>Providers for virtualizationããé¸æãã¾ãã ããã¸ã§ã¯ããããã¹ã¦ã®ããã¸ã§ã¯ãããé¸æããã¨ããhostããããã¤ãã¼ãç»é²ããã¦ããã®ã確èªã§ãã¾ãã ããã¯MTVã®ã¤ã³ã¹ãã¼ã«æã«èªåã§ç»é²ããããã®ã§ãTypeããOpenShiftãã¨ãªã£ã¦ãããOpenShift Virutalizationãã®ãã®ãæãè¨å®ã¨ãç解ãã ããã
æ°ãããããã¤ãã¼ã追å ããã«ã¯ãCreate Providerããã¿ã³ãæ¼ãã¾ãã
ãProvider detailsãã§ã¯ãç»é²å¯è½ãªãããã¤ãã¼ã®ä¸è¦§ã表示ããã¾ãããã®ä¸ãããvSphereããé¸æãã¾ãã
é¸æãããããã¤ãã¼ã®è©³ç´°ãªè¨å®å ¥åç»é¢ã«é·ç§»ãã¾ããããã§ãããã¤ãã¼ç»é²ã«å¿ è¦ãªæ å ±ãå ¥åãã¾ãã
Provider details
- Select provider type: vSphere
- Provider resource name: esxiï¼ä»»æã®ååï¼
- Endpoint typeï¼ESXi
- URL: https://esxi.home.lab/sdk
- VDDK init image: image-registry.openshift-image-registry.svc:5000/openshift/vddk:latest
Provider credentials
- Username: root
- Password:ï¼ESXiã®rootã®ãã¹ã¯ã¼ãï¼
- Skip certificate validation: true
ãã©ã¡ã¼ã¿ã¼ã®å ¥åå¾ããCreate providerããã¿ã³ãæ¼ãã¾ãã
ãããã¤ãã¼ã®ç»é²å¾ãç»é²ãããããã¤ãã¼ã®è©³ç´°ç»é¢ã«é·ç§»ãã¾ãã
Webã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãããMigration>Providers for virtualizationããå度é¸æããã¨ãå ã»ã©ç»é²ãããããã¤ãã¼ãä¸è¦§ã«è¿½å ããããã¨ã確èªã§ãã¾ãã
次ã¯ç»é²ãããããã¤ãã¼ã使ã£ã¦ã移è¡å¥ç´ã®ä½æãè¡ãã¾ãã
ESXiãã¹ããFQDNã§ç»é²ããã¦ããªãå ´å
ESXiãã¹ãèªèº«ã«FQDNã®è¨å®ãè¡ããã¦ããªãå ´åãMTVã®ç§»è¡æã§ã¨ã©ã¼ã«ãªãå ´åãããã¾ãã FQDNã®è¨å®ãè¡ããã¦ããªãå ´åã¯ESXi Shellã¾ãã¯ESXiãã¹ãã¸SSHæ¥ç¶ãè¡ããä¸è¨ã®è¨å®ãè¡ãã¾ãã
å®è¡ã³ãã³ã
ï¼ESXiãã¹ãä¸ã§å®è¡ï¼ [root@esxi:~] hostname -f esxi [root@esxi:~] esxcli system hostname set --fqdn=esxi.home.lab [root@esxi:~] hostname -f esxi.home.lab
FQDNè¨å®å¾ãå度ãããã¤ãã¼ãç»é²ãã¦ã¾ãããProviders>Provider DetailsããããHostsãã¿ããé¸æããESXiãã¹ããFQDNã§ç»é²ããã¦ãããã¨ã確èªãã¾ãã
5. 移è¡è¨ç»ã®ä½æ
MTVã¯ç§»è¡è¨ç»ã®ä½æãè¡ãªã£ã¦ä»®æ³ãã·ã³ã®ç§»è¡ãè¡ãã¾ãã移è¡è¨ç»ã«ã¯1ã¤ä»¥ä¸ã®ä»®æ³ãã·ã³ãå«ãããã¨ãã§ãã¾ãã
5-1 ãããã¤ãã¼ã®é¸æ
Webã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãããMigration>Plans for virtualizationããé¸æãã¾ãã ããã¸ã§ã¯ãããããã¹ã¦ã®ããã¸ã§ã¯ãããé¸æãã¾ãã移è¡è¨ç»ãã¾ã ä½æããã¦ããªããã¨ã確èªãããCreate Planããã¿ã³ãæ¼ãã¾ãã
ãSelect source providerãããä½æãããããã¤ãã¼ï¼esxiãé¸æããã¨ãESXiãã¹ããã·ã³ä¸ã®ä»®æ³ãã·ã³ãä¸è¦§ã§è¡¨ç¤ºããã¾ãã
ä¸è¦§ãã移è¡ãããä»®æ³ãã·ã³ã«ãã§ãã¯ãå ¥ãããNextããã¿ã³ãæ¼ãã¾ãã ããã§ã¯ãrhel9-vmwareããé¸æãã¾ãã
5-2 移è¡è¨ç»ã®ä½æ
次ã®ç»é¢ã§ã¯ç§»è¡è¨ç»ã®ä½æã«å¿ è¦ãªæ å ±ãå ¥åãã¾ãã
Create migration plan
- Plan name: migration-01
- Source provider: 移è¡å ã®ãããã¤ãã¼ããesxiããé¸ææ¸ã¿ã
- Target provider: 移è¡å ã®ãããã¤ãã¼ãããã©ã«ãã®ãhostããé¸ææ¸ã¿ã
- Target namespace: 移è¡å ã®Namespaceãæå®å¯è½ãããã§ã¯ãocp-virtããé¸æã
- Network map:
- VM Networkï¼ç§»è¡å ã®VMã®ä»®æ³ã¹ã¤ããï¼: Pod Networkingï¼ç§»è¡å ã®NADï¼
- Storage map:
- NVMeï¼ç§»è¡å ã®VMã®ä¿åã¹ãã¬ã¼ã¸ï¼: nfs-clientï¼ç§»è¡å ã®ã¹ãã¬ã¼ã¸ã¯ã©ã¹ï¼
ãã¹ã¦ã®é ç®ãå ¥åå¾ããCreate migration planããã¿ã³ãæ¼ãã¾ãã
StatusãReadyã«ãªãã¾ã§ãã®ã¾ã¾å¾ æ©ãã¾ããååã¯ä½¿ç¨ããã³ã³ããã¤ã¡ã¼ã¸ã®ãã¦ã³ãã¼ããå±éã«æéãè¦ããããã3åã»ã©ãããã¾ãã
Webã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãããMigration>Plans for virtualizationããå度é¸æããä½æãã移è¡è¨ç»ãä¸è¦§ã«ç»é²ããã¦ãããã¨ã確èªãã¾ãã
Statusã«Warningãåºãå ´åï¼
移è¡å ã®ä»®æ³ãã·ã³åï¼ã¤ã³ãã³ããªã«ç»é²ãã¦ããååï¼ã«å¤§æåãå«ã¾ãã¦ããå ´åãStatusãWarningã«ãªãã¾ãã
Warning Target VM name does not comply with DNS1123 RFC, will be automatically changed. To troubleshoot, view the plan details page and check the Forklift controller pod logs.
- ä¾ï¼RHELããªã©
ãã®ã¾ã¾ç§»è¡ãè¡ãã¨ã移è¡æã«èªåã§å°æåã«å¤æããã¾ãã ãªããStatusãWarningã§ãã£ã¦ãããStart migrationããã¿ã³ãæ¼ããç¶æ ã§ããã°ç§»è¡ã¯å¯è½ã§ãã
6. 移è¡è¨ç»ã®å®è¡ï¼ã³ã¼ã«ã移è¡ï¼
6-1 ã³ã¼ã«ã移è¡ã®å®è¡
ä½æãã移è¡è¨ç»ã¯ããã©ã«ãã§ã¯ãã³ã¼ã«ã移è¡ãã¨ãªãã¾ãããã®ã¾ã¾ã³ã¼ã«ã移è¡ãè¡ãå ´åã¯ãStart migrationããã¿ã³ãæ¼ãã¾ãã移è¡è¨ç»ã®ä¸è¦§ç»é¢ããå®è¡ããå ´åã¯ãStartããã¿ã³ãæ¼ãã¾ãã
ã©ã¡ãã®å ´åãå®è¡ã®ç¢ºèªç»é¢ã表示ãããã®ã§ããStartããã¿ã³ãæ¼ãã¾ãã
StatusãRunningã«å¤ããã移è¡ãéå§ããã¾ãããªããèµ·åä¸ã®ä»®æ³ãã·ã³ã¯ãã®æç¹ã§åæ¢ãã¾ãã
6-2 移è¡ã®é²æ確èª
移è¡ä¸ã®é²æ確èªã¯ã移è¡è¨ç»ã®è©³ç´°ç»é¢ãããVirtual Machinesãã¿ããé¸æãã¾ãã ããã«ãã>ããå±éããPipelineã§é²æç¶æ³ã確èªã§ãã¾ãã
Pipelineã«ã¯ä¸è¨ã®æ®µéãã¨ã«é²æç¶æ³ãæ´æ°ããã¾ãã
- Initializeï¼Initialize migrationï¼
- DiskAllocationï¼Allocate disksï¼
- ImageConversionï¼Convert image to kubevirtï¼
- DiskTransferV2vï¼Copy disksï¼
- VirtualMachineCreationï¼Create VMï¼
æå¾ã®ãVirtualMachineCreationããå®äºããã¨ãWebã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãVirtualization>VirtualMachinesãã®ä»®æ³ãã·ã³ä¸è¦§ã«ç§»è¡ããä»®æ³ãã·ã³ãç»é²ããã¾ãã
6-3 移è¡ããä»®æ³ãã·ã³ã®èµ·åãã¹ã
移è¡ãå®äºããã¨ã移è¡å ã§èµ·åãã¦ããä»®æ³ãã·ã³ã¯èªåã§èµ·åãã¾ããåæ¢ç¶æ ã§ç§»è¡ããä»®æ³ãã·ã³ã¯ç§»è¡å¾ãåæ¢ç¶æ ã«ãªãã¾ãã 移è¡å¾ã®ä»®æ³ãã·ã³ã¯OpenShift Virtualizationã§ä½æããä»®æ³ãã·ã³ã¨åæ§ã«æä½ã§ãã¾ãï¼èµ·åãåæ¢ãã³ã³ã½ã¼ã«ãã¹ãããã·ã§ãããã©ã¤ããã¤ã°ã¬ã¼ã·ã§ã³ããªã©ï¼ã
7. 移è¡è¨ç»ã®å®è¡ï¼ã¦ã©ã¼ã 移è¡ï¼
7-1 ã¦ã©ã¼ã 移è¡ã®åææ¡ä»¶
ã¦ã©ã¼ã 移è¡ãè¡ãå ´åã対象ã®ä»®æ³ãã·ã³ã«Changed Block Tracking (以ä¸ãCBT)ã®è¨å®ãè¡ãå¿ è¦ãããã¾ãã ä»®æ³ãã·ã³ã«CBTã®è¨å®ãè¡ãæ¹æ³ã¯ãä¸è¨ã®ããã¥ã¡ã³ããåç §ãã ããã
govc
ã³ãã³ãã使ç¨ãã¦CBTãæå¹åããã«ã¯ä¸è¨ã®æé ãå®è¡ãã¾ãã
ãªãã対象ã®ä»®æ³ãã·ã³ï¼win2022-vmwareï¼ã¯äºåã«ã·ã£ãããã¦ã³ãã¦ãããã¨ã¨ãã¾ãã
å®è¡ã³ãã³ã
$ govc vm.change -vm win2022-vmware -e="ctkEnabled=true"
CBTã®è¨å®ç¶æ³ã¯ä¸è¨ã®ã³ãã³ãã§ç¢ºèªãã¾ãã
å®è¡ã³ãã³ã
$ govc vm.info -e ctkEnabled=true win2022-vmware | grep ctkEnabled ctkEnabled: TRUE
7-2 ã¦ã©ã¼ã 移è¡ã®è¨å®
ã¦ã©ã¼ã 移è¡ãè¡ãå ´åãã³ã¼ã«ã移è¡ã¨åãæé ã§ç§»è¡è¨ç»ãä½æãã¾ãã ããã§ã¯ãmigration-02ãã¨ãã¦ããwin2022-vmwareãä»®æ³ãã·ã³ã®ã¦ã©ã¼ã 移è¡ãè¡ãã¾ãã æ¬è¨äºã5. 移è¡è¨ç»ã®ä½æãã®æé ãåèã«ã移è¡è¨ç»ãä½æãã¦ãã ããã
ã¦ã©ã¼ã 移è¡ãè¡ãå ´åã¯ã移è¡è¨ç»ã®ä½æå¾ã«ã³ã¼ã«ã移è¡ããã¦ã©ã¼ã 移è¡ã¸ã¨è¨å®ãå¤æ´ãã¾ãã 移è¡è¨ç»ã®è©³ç´°ç»é¢ããããSettings>Warm migrationãå ã®ç·¨éãã¿ã³ãæ¼ãã¾ãã
ãSet warm migrationãã®è¨å®ç»é¢ããããã¢ãã表示ããã¾ãã ã¦ã©ã¼ã 移è¡ã®è¨å®ãæå¹åãããSaveããã¿ã³ãæ¼ãã¾ãã
7-3 ã¦ã©ã¼ã 移è¡ã®å®è¡
ã³ã¼ã«ã移è¡ã¨åæ§ã«ã移è¡è¨ç»ã®è©³ç´°ç»é¢ãããStart migrationããã¿ã³ãæ¼ãã¦ã¦ã©ã¼ã 移è¡ãå®è¡ãã¾ãã
ã³ã¼ã«ã移è¡ã¨åæ§ã«ãå®è¡ã®ç¢ºèªç»é¢ã表示ãããã®ã§ããStartããã¿ã³ãæ¼ãã¾ãã
7-4 移è¡ã®é²æ確èª
移è¡ä¸ã®é²æ確èªã¯ãã³ã¼ã«ã移è¡ã¨åæ§ã«ç§»è¡è¨ç»ã®è©³ç´°ç»é¢ãããVirtual Machinesãã¿ããé¸æãã¾ãã
ã³ã¼ã«ã移è¡ã¨ç°ãªãã®ã¯ãã¦ã©ã¼ã 移è¡ã§ã¯æåã®ç§»è¡ã®å®è¡å¾ã«åæ転éãè¡ãããã«ãããªã¼ãã¼ãè¡ãããã¾ã§é²æã¯ãã®ç¶æ ã®ã¾ã¾ã«ãªããã¨ã§ãã
ã¦ã©ã¼ã 移è¡ã®éå§å¾ã移è¡å ã®ä»®æ³ãã·ã³ã«ãforklift-migration-precopyãã¨ããååã®ã¹ãããã·ã§ãããä½æããã¾ãã ããã©ã«ãã§ã¯ã60åãã¨ãã«å·®åã®æ´æ°ãè¡ããããã®éã«æ°ããã¹ãããã·ã§ãããä½æããã¦ãå¤ãã¹ãããã·ã§ããã¯åé¤ããã¾ãã ãã®å¾ãã«ãããªã¼ãã¼ãè¡ãã¾ã§æ´æ°ã¯èªåã§ç¶ç¶ããã¾ãã
ãã¬ã³ãã¼ã®æ´æ°ééã®å¤æ´
ãã¬ã³ãã¼ã®æ´æ°ééã¯MTVã®Overviewç»é¢ã§å¤æ´ãå¯è½ã§ãã Webã³ã³ã½ã¼ã«ã®ã¡ãã¥ã¼ãããMigration>Overviewããé¸æãããSettingsãå ã®ãPrecopy interval (minutes)ãã®å¤ãå¤æ´ãã¾ãã å¤æ´ã§ããå¤ã¯ã5åã30åã60åã120åãããé¸æããæ¹å¼ã§ãã
â»æ³¨æï¼æ´æ°ééã5åã«è¨å®ãã¦ããåå¾ã®å¦çæéã追å ãããããã次åã®ã¹ãããã·ã§ããã®ä½ææéã¯5åããè¶ ãã¦è¡ããã¾ã
7-3 ã«ãããªã¼ãã¼ã®å®è¡
ãã¬ã³ãã¼ã®å®è¡å¾ãã«ãããªã¼ãã¼ãå®è¡ãããã¨ã§æçµã®ãã¼ã¿ã³ãã¼ãè¡ãããä»®æ³ãã·ã³ã®ç§»è¡ãå®äºãã¾ãã
移è¡è¨ç»ã®è©³ç´°ç»é¢ãããActions>Cutoverããé¸æãããã¨ã§ã«ãããªã¼ãã¼ãéå§ãã¾ãã ã¾ãã¯ã移è¡è¨ç»ã®ä¸è¦§ç»é¢ããå®è¡ããå ´åã¯ã対象ã®ç§»è¡è¨ç»ã®ãCutoverããã¿ã³ãæ¼ãã¾ãã
ã«ãããªã¼ãã¼ã®ã¹ã±ã¸ã¥ã¼ã«è¨å®ç»é¢ããããã¢ããã§è¡¨ç¤ºããã¾ããæå®ã®æéã«ã«ãããªã¼ãã¼ãè¡ãå ´åã¯æ¥æãé¸æãã¦ãSet cutoverããæ¼ãã¾ãã ããã«ã«ãããªã¼ãã¼ãè¡ãããå ´åã¯ããã®ã¾ã¾ãSet cutoverããæ¼ãã¾ãã
ã«ãããªã¼ãã¼ãå®è¡ããã¨ã移è¡å ã®ä»®æ³ãã·ã³ãã·ã£ãããã¦ã³ãããæçµã®ãã¼ã¿ã³ãã¼ï¼ãã¡ã¤ãã©ã¤ãºï¼ãå®è¡ããã¾ãã
ãã®å¾ãã¤ã¡ã¼ã¸å¤æã®ããã»ã¹ãçµã¦ä»®æ³ãã·ã³ãä½æããã¾ãã
â»æ³¨æï¼ååã®ã¦ã©ã¼ã 移è¡å®è¡æã¯ãã¤ã¡ã¼ã¸å¤æã«ä½¿ç¨ããã³ã³ããã¤ã¡ã¼ã¸ã®ãã¦ã³ãã¼ãã解åã«æéãè¦ããå ´åãããã¾ãã
ã¦ã©ã¼ã 移è¡ã®å ´åã¯ã移è¡å®äºå¾ã®ä»®æ³ãã·ã³ã¯èªåã§èµ·åãã¾ãã
ã¾ã¨ã
MTVã使ç¨ããvSphereä»®æ³ãã·ã³ã®ç§»è¡æ¹æ³ã«ã¤ãã¦è§£èª¬ãã¾ããã ä»åã¯ã·ã³ãã«ãªæ¤è¨¼ç°å¢ã§ã®å®è¡ãåæã¨ããã®ã§ESXiã移è¡å ãããã¤ãã¼ã¨ãã¦ä½¿ç¨ãã¾ããã å®ç¨¼åç°å¢ã§ã¯vCenter Serverã使ç¨ãããã¨ãã»ã¨ãã©ã§ãããè¨å®æ¹æ³ã移è¡ã®æ¹æ³ã¯åãã§ãã®ã§ãå®ç¨¼åç°å¢ï¼ããã³ãã®æ¤è¨¼ç°å¢ï¼ã§ãåãæé ã§ç§»è¡ã®å®è¡ãè¡ã£ã¦ãã ããã æ¬é£è¼ã§ã¯å¯¾è±¡ã®ç¯å²å¤ã¨ããè¤éãªãããã¯ã¼ã¯ãã¹ãã¬ã¼ã¸ç°å¢ã«ããã¦ãã移è¡ã®ãããã³ã°ãé©åã«è¡ããã¨ã§ç§»è¡ã¯å¯è½ã§ãã æ¯éãã¾ãã¾ãªç°å¢ã§ç§»è¡ã®å®è¡ãè¡ã£ã¦ã¿ã¦ãã ããã
æ¬é£è¼ã¯ãã®è¨äºããã£ã¦çµäºã¨ãªãã¾ãããæ¸ããããªãã£ãå 容ã¯å¤ã ããã¾ãã ãããã«ã¤ãã¦ã¯ã¾ãå¥ã®è¨äºã§è£è¶³ãããã¨ã¨ãã¾ãã
*1:ããã¥ã¡ã³ãã§Dockerfileã¨ãªã£ã¦ãããããããã§ã¯Containerfileã¨ãããã®ã¾ã¾è¨è¼