Files
vjailbreak/docs/guides/cli-api/migrating_using_cli_and_kubectl/index.html
T
OmkarDeshpande7andClaude Sonnet 5 3fc874dd22 Fix docs base path after repo rename to vjailbreak
Rebuilt Astro site with BASE=vjailbreak; old build had base baked
as vjailbreak-docs, causing all CSS/JS asset URLs to 404 on GH Pages.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-16 12:23:48 +05:30

352 lines
114 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="en" dir="ltr" data-theme="dark" data-has-toc data-has-sidebar class="astro-bguv2lll"> <head><meta charset="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Use CLI to Migrate | vJailbreak</title><link rel="canonical" href="https://platform9.github.io/vjailbreak/guides/cli-api/migrating_using_cli_and_kubectl/"/><link rel="sitemap" href="/vjailbreak/sitemap-index.xml"/><link rel="shortcut icon" href="/vjailbreak/favicon.svg" type="image/svg+xml"/><meta name="generator" content="Astro v5.12.8"/><meta name="generator" content="Starlight v0.32.6"/><meta property="og:title" content="Use CLI to Migrate"/><meta property="og:type" content="article"/><meta property="og:url" content="https://platform9.github.io/vjailbreak/guides/cli-api/migrating_using_cli_and_kubectl/"/><meta property="og:locale" content="en"/><meta property="og:description" content="Learn how to automate the migration of Virtual Machines from VMware to PCD using vJailbreak"/><meta property="og:site_name" content="vJailbreak"/><meta name="twitter:card" content="summary_large_image"/><meta name="description" content="Learn how to automate the migration of Virtual Machines from VMware to PCD using vJailbreak"/><script>
window.StarlightThemeProvider = (() => {
const storedTheme =
typeof localStorage !== 'undefined' && localStorage.getItem('starlight-theme');
const theme =
storedTheme ||
(window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark');
document.documentElement.dataset.theme = theme === 'light' ? 'light' : 'dark';
return {
updatePickers(theme = storedTheme || 'auto') {
document.querySelectorAll('starlight-theme-select').forEach((picker) => {
const select = picker.querySelector('select');
if (select) select.value = theme;
/** @type {HTMLTemplateElement | null} */
const tmpl = document.querySelector(`#theme-icons`);
const newIcon = tmpl && tmpl.content.querySelector('.' + theme);
if (newIcon) {
const oldIcon = picker.querySelector('svg.label-icon');
if (oldIcon) {
oldIcon.replaceChildren(...newIcon.cloneNode(true).childNodes);
}
}
});
},
};
})();
</script><template id="theme-icons"><svg aria-hidden="true" class="light astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M5 12a1 1 0 0 0-1-1H3a1 1 0 0 0 0 2h1a1 1 0 0 0 1-1Zm.64 5-.71.71a1 1 0 0 0 0 1.41 1 1 0 0 0 1.41 0l.71-.71A1 1 0 0 0 5.64 17ZM12 5a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1a1 1 0 0 0 1 1Zm5.66 2.34a1 1 0 0 0 .7-.29l.71-.71a1 1 0 1 0-1.41-1.41l-.66.71a1 1 0 0 0 0 1.41 1 1 0 0 0 .66.29Zm-12-.29a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.71-.71a1.004 1.004 0 1 0-1.43 1.41l.73.71ZM21 11h-1a1 1 0 0 0 0 2h1a1 1 0 0 0 0-2Zm-2.64 6A1 1 0 0 0 17 18.36l.71.71a1 1 0 0 0 1.41 0 1 1 0 0 0 0-1.41l-.76-.66ZM12 6.5a5.5 5.5 0 1 0 5.5 5.5A5.51 5.51 0 0 0 12 6.5Zm0 9a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Zm0 3.5a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1a1 1 0 0 0-1-1Z"/></svg> <svg aria-hidden="true" class="dark astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21.64 13a1 1 0 0 0-1.05-.14 8.049 8.049 0 0 1-3.37.73 8.15 8.15 0 0 1-8.14-8.1 8.59 8.59 0 0 1 .25-2A1 1 0 0 0 8 2.36a10.14 10.14 0 1 0 14 11.69 1 1 0 0 0-.36-1.05Zm-9.5 6.69A8.14 8.14 0 0 1 7.08 5.22v.27a10.15 10.15 0 0 0 10.14 10.14 9.784 9.784 0 0 0 2.1-.22 8.11 8.11 0 0 1-7.18 4.32v-.04Z"/></svg> <svg aria-hidden="true" class="auto astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> </template><link rel="stylesheet" href="/vjailbreak/_astro/print.BJ0teN4y.css" media="print"><link rel="stylesheet" href="/vjailbreak/_astro/index.V9BDhjML.css">
<style>:root{--sl-badge-default-border: var(--sl-color-accent);--sl-badge-default-bg: var(--sl-color-accent-low);--sl-badge-default-text: #fff;--sl-badge-note-border: var(--sl-color-blue);--sl-badge-note-bg: var(--sl-color-blue-low);--sl-badge-note-text: #fff;--sl-badge-danger-border: var(--sl-color-red);--sl-badge-danger-bg: var(--sl-color-red-low);--sl-badge-danger-text: #fff;--sl-badge-success-border: var(--sl-color-green);--sl-badge-success-bg: var(--sl-color-green-low);--sl-badge-success-text: #fff;--sl-badge-caution-border: var(--sl-color-orange);--sl-badge-caution-bg: var(--sl-color-orange-low);--sl-badge-caution-text: #fff;--sl-badge-tip-border: var(--sl-color-purple);--sl-badge-tip-bg: var(--sl-color-purple-low);--sl-badge-tip-text: #fff}[data-theme=light]:root{--sl-badge-default-bg: var(--sl-color-accent-high);--sl-badge-note-bg: var(--sl-color-blue-high);--sl-badge-danger-bg: var(--sl-color-red-high);--sl-badge-success-bg: var(--sl-color-green-high);--sl-badge-caution-bg: var(--sl-color-orange-high);--sl-badge-tip-bg: var(--sl-color-purple-high)}.sl-badge:where(.astro-avdet4wd){display:inline-block;border:1px solid var(--sl-color-border-badge);border-radius:.25rem;font-family:var(--sl-font-system-mono);line-height:normal;color:var(--sl-color-text-badge);background-color:var(--sl-color-bg-badge);overflow-wrap:anywhere}.sidebar-content .sl-badge:where(.astro-avdet4wd){line-height:1;font-size:var(--sl-text-xs);padding:.125rem .375rem}.sidebar-content a[aria-current=page]>.sl-badge:where(.astro-avdet4wd){--sl-color-bg-badge: transparent;--sl-color-border-badge: currentColor;color:inherit}.default:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-default-bg);--sl-color-border-badge: var(--sl-badge-default-border);--sl-color-text-badge: var(--sl-badge-default-text)}.note:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-note-bg);--sl-color-border-badge: var(--sl-badge-note-border);--sl-color-text-badge: var(--sl-badge-note-text)}.danger:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-danger-bg);--sl-color-border-badge: var(--sl-badge-danger-border);--sl-color-text-badge: var(--sl-badge-danger-text)}.success:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-success-bg);--sl-color-border-badge: var(--sl-badge-success-border);--sl-color-text-badge: var(--sl-badge-success-text)}.tip:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-tip-bg);--sl-color-border-badge: var(--sl-badge-tip-border);--sl-color-text-badge: var(--sl-badge-tip-text)}.caution:where(.astro-avdet4wd){--sl-color-bg-badge: var(--sl-badge-caution-bg);--sl-color-border-badge: var(--sl-badge-caution-border);--sl-color-text-badge: var(--sl-badge-caution-text)}.small:where(.astro-avdet4wd){font-size:var(--sl-text-xs);padding:.125rem .25rem}.medium:where(.astro-avdet4wd){font-size:var(--sl-text-sm);padding:.175rem .35rem}.large:where(.astro-avdet4wd){font-size:var(--sl-text-base);padding:.225rem .45rem}.sl-markdown-content :is(h1,h2,h3,h4,h5,h6) .sl-badge:where(.astro-avdet4wd){vertical-align:middle}
.card-grid:where(.astro-zntqmydn){display:grid;grid-template-columns:100%;gap:1rem}.card-grid:where(.astro-zntqmydn)>*{margin-top:0!important}@media (min-width: 50rem){.card-grid:where(.astro-zntqmydn){grid-template-columns:1fr 1fr;gap:1.5rem}.stagger:where(.astro-zntqmydn){--stagger-height: 5rem;padding-bottom:var(--stagger-height)}.stagger:where(.astro-zntqmydn)>*:nth-child(2n){transform:translateY(var(--stagger-height))}}
.card:where(.astro-v5tidmuc){--sl-card-border: var(--sl-color-purple);--sl-card-bg: var(--sl-color-purple-low);border:1px solid var(--sl-color-gray-5);background-color:var(--sl-color-black);padding:clamp(1rem,calc(.125rem + 3vw),2.5rem);flex-direction:column;gap:clamp(.5rem,calc(.125rem + 1vw),1rem)}.card:where(.astro-v5tidmuc):nth-child(4n+1){--sl-card-border: var(--sl-color-orange);--sl-card-bg: var(--sl-color-orange-low)}.card:where(.astro-v5tidmuc):nth-child(4n+3){--sl-card-border: var(--sl-color-green);--sl-card-bg: var(--sl-color-green-low)}.card:where(.astro-v5tidmuc):nth-child(4n+4){--sl-card-border: var(--sl-color-red);--sl-card-bg: var(--sl-color-red-low)}.card:where(.astro-v5tidmuc):nth-child(4n+5){--sl-card-border: var(--sl-color-blue);--sl-card-bg: var(--sl-color-blue-low)}.title:where(.astro-v5tidmuc){font-weight:600;font-size:var(--sl-text-h4);color:var(--sl-color-white);line-height:var(--sl-line-height-headings);gap:1rem;align-items:center}.card:where(.astro-v5tidmuc) .icon:where(.astro-v5tidmuc){border:1px solid var(--sl-card-border);background-color:var(--sl-card-bg);padding:.2em;border-radius:.25rem}.card:where(.astro-v5tidmuc) .body:where(.astro-v5tidmuc){margin:0;font-size:clamp(var(--sl-text-sm),calc(.5rem + 1vw),var(--sl-text-body))}
svg:where(.astro-c6vsoqas){color:var(--sl-icon-color);font-size:var(--sl-icon-size, 1em);width:1em;height:1em}
starlight-tabs:where(.astro-esqgolmp){display:block}.tablist-wrapper:where(.astro-esqgolmp){overflow-x:auto}:where(.astro-esqgolmp)[role=tablist]{display:flex;list-style:none;border-bottom:2px solid var(--sl-color-gray-5);padding:0}.tab:where(.astro-esqgolmp){margin-bottom:-2px}.tab:where(.astro-esqgolmp)>:where(.astro-esqgolmp)[role=tab]{display:flex;align-items:center;gap:.5rem;padding:0 1.25rem;text-decoration:none;border-bottom:2px solid var(--sl-color-gray-5);color:var(--sl-color-gray-3);outline-offset:var(--sl-outline-offset-inside);overflow-wrap:initial}.tab:where(.astro-esqgolmp) :where(.astro-esqgolmp)[role=tab][aria-selected=true]{color:var(--sl-color-white);border-color:var(--sl-color-text-accent);font-weight:600}.tablist-wrapper:where(.astro-esqgolmp)~[role=tabpanel]{margin-top:1rem}
.sl-steps{--bullet-size: calc(var(--sl-line-height) * 1rem);--bullet-margin: .375rem;list-style:none;counter-reset:steps-counter var(--sl-steps-start, 0);padding-inline-start:0}.sl-steps>li{counter-increment:steps-counter;position:relative;padding-inline-start:calc(var(--bullet-size) + 1rem);padding-bottom:1px;min-height:calc(var(--bullet-size) + var(--bullet-margin))}.sl-steps>li+li{margin-top:0}.sl-steps>li:before{content:counter(steps-counter);position:absolute;top:0;inset-inline-start:0;width:var(--bullet-size);height:var(--bullet-size);line-height:var(--bullet-size);font-size:var(--sl-text-xs);font-weight:600;text-align:center;color:var(--sl-color-white);background-color:var(--sl-color-gray-6);border-radius:99rem;box-shadow:inset 0 0 0 1px var(--sl-color-gray-5)}.sl-steps>li:after{--guide-width: 1px;content:"";position:absolute;top:calc(var(--bullet-size) + var(--bullet-margin));bottom:var(--bullet-margin);inset-inline-start:calc((var(--bullet-size) - var(--guide-width)) / 2);width:var(--guide-width);background-color:var(--sl-color-hairline-light)}.sl-steps>li>:first-child{--lh: calc(1em * var(--sl-line-height));--shift-y: calc(.5 * (var(--bullet-size) - var(--lh)));transform:translateY(var(--shift-y));margin-bottom:var(--shift-y)}.sl-steps>li>:first-child:where(h1,h2,h3,h4,h5,h6){--lh: calc(1em * var(--sl-line-height-headings))}@supports (--prop: 1lh){.sl-steps>li>:first-child{--lh: 1lh}}
.sl-link-button:where(.astro-xwgiixxa){align-items:center;border:1px solid transparent;border-radius:999rem;display:inline-flex;font-size:var(--sl-text-sm);gap:.5em;line-height:1.1875;outline-offset:.25rem;padding:.4375rem 1.125rem;text-decoration:none}.sl-link-button:where(.astro-xwgiixxa).primary{background:var(--sl-color-text-accent);border-color:var(--sl-color-text-accent);color:var(--sl-color-black)}.sl-link-button:where(.astro-xwgiixxa).primary:hover{color:var(--sl-color-black)}.sl-link-button:where(.astro-xwgiixxa).secondary{border-color:inherit;color:var(--sl-color-white)}.sl-link-button:where(.astro-xwgiixxa).minimal{color:var(--sl-color-white);padding-inline:0}.sl-link-button:where(.astro-xwgiixxa) svg{flex-shrink:0}@media (min-width: 50rem){.sl-link-button:where(.astro-xwgiixxa){font-size:var(--sl-text-base);padding:.9375rem 1.25rem}}.sl-markdown-content .sl-link-button:where(.astro-xwgiixxa){margin-inline-end:1rem}.sl-markdown-content .sl-link-button:where(.astro-xwgiixxa):not(:where(p *)){margin-block:1rem}
</style><script type="module" src="/vjailbreak/_astro/page.Es7s6Xc5.js"></script></head> <body class="astro-bguv2lll"> <a href="#_top" class="astro-7q3lir66">Skip to content</a> <div class="page sl-flex astro-vrdttmbt"> <header class="header astro-vrdttmbt"><div class="header sl-flex astro-3ef6ksr2"> <div class="title-wrapper sl-flex astro-3ef6ksr2"> <a href="/vjailbreak/" class="site-title sl-flex astro-m46x6ez3"> <img class="astro-m46x6ez3" alt src="/vjailbreak/_astro/platform9-logo.PaszzYBQ.svg" width="120" height="60"> <span class="sr-only astro-m46x6ez3" translate="no"> vJailbreak </span> </a> </div> <div class="sl-flex print:hidden astro-3ef6ksr2"> <site-search class="astro-3ef6ksr2 astro-v37mnknz" data-translations="{&#34;placeholder&#34;:&#34;Search&#34;}"> <button data-open-modal disabled aria-label="Search" aria-keyshortcuts="Control+K" class="astro-v37mnknz"> <svg aria-hidden="true" class="astro-v37mnknz astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21.71 20.29 18 16.61A9 9 0 1 0 16.61 18l3.68 3.68a.999.999 0 0 0 1.42 0 1 1 0 0 0 0-1.39ZM11 18a7 7 0 1 1 0-14 7 7 0 0 1 0 14Z"/></svg> <span class="sl-hidden md:sl-block astro-v37mnknz" aria-hidden="true">Search</span> <kbd class="sl-hidden md:sl-flex astro-v37mnknz" style="display: none;"> <kbd class="astro-v37mnknz">Ctrl</kbd><kbd class="astro-v37mnknz">K</kbd> </kbd> </button> <dialog style="padding:0" aria-label="Search" class="astro-v37mnknz"> <div class="dialog-frame sl-flex astro-v37mnknz"> <button data-close-modal class="sl-flex md:sl-hidden astro-v37mnknz"> Cancel </button> <div class="search-container astro-v37mnknz"> <div id="starlight__search" class="astro-v37mnknz"></div> </div> </div> </dialog> </site-search> <script>
(() => {
const openBtn = document.querySelector('button[data-open-modal]');
const shortcut = openBtn?.querySelector('kbd');
if (!openBtn || !(shortcut instanceof HTMLElement)) return;
const platformKey = shortcut.querySelector('kbd');
if (platformKey && /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)) {
platformKey.textContent = '⌘';
openBtn.setAttribute('aria-keyshortcuts', 'Meta+K');
}
shortcut.style.display = '';
})();
</script> <script type="module" src="/vjailbreak/_astro/Search.astro_astro_type_script_index_0_lang.PKSD7nbt.js"></script> </div> <div class="sl-hidden md:sl-flex print:hidden right-group astro-3ef6ksr2"> <div class="sl-flex social-icons astro-3ef6ksr2"> <a href="https://github.com/platform9/vjailbreak" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg> </a><a href="https://join.slack.com/t/vjailbreak/shared_invite/zt-314pppw43-F1vzd6ZaPW5PoZqF~aa8lA" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">Slack</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52Zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313ZM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834Zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312Zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834Zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312Zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52Zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313Z"/></svg> </a> </div> <div class="sl-flex release-dropdown astro-3ef6ksr2"> <!-- Dropdown --><div class="select-container"> <label for="release-select" class="select-label">Latest Release:</label> <select id="release-select" class="release-select"> <option>Loading releases...</option> </select> </div> <script>(function(){const astroBaseURL = "https://platform9.github.io/";
document.addEventListener('DOMContentLoaded', async () => {
const CACHE_KEY = 'githubReleases';
const CACHE_EXPIRY = 60 * 60 * 1000; // 1 hour
const select = document.getElementById('release-select');
// Check cache first
if (typeof window !== 'undefined' && window.localStorage) {
const cachedReleases = localStorage.getItem(CACHE_KEY);
const cacheExpiry = localStorage.getItem(`${CACHE_KEY}_expiry`);
if (cachedReleases && cacheExpiry && Date.now() < Number(cacheExpiry)) {
try {
console.debug("Reading releases from cache:", JSON.parse(cachedReleases)); // Debug log
populateDropdown(JSON.parse(cachedReleases));
return;
} catch (e) {
console.warn("Cache corrupted clearing", e);
localStorage.removeItem(CACHE_KEY)
localStorage.removeItem(`${CACHE_KEY}_expiry`)
}
}
}
try {
console.debug("Fetching releases from GitHub"); // Debug log
const response = await fetch('https://api.github.com/repos/platform9/vjailbreak/releases');
const data = await response.json();
const releases = data.slice(0, 5);
// Store in cache
if (typeof window !== 'undefined' && window.localStorage) {
localStorage.setItem(CACHE_KEY, JSON.stringify(releases));
localStorage.setItem(`${CACHE_KEY}_expiry`, String(Date.now() + CACHE_EXPIRY));
}
populateDropdown(releases);
} catch (error) {
console.error("Error fetching releases:", error);
populateDropdown([{
id: 0,
name: "v0.1.7",
html_url: "https://github.com/platform9/vjailbreak/releases/tag/v0.1.7"
}]);
}
function populateDropdown(releases) {
const currentURL = astroBaseURL || window.location.origin; // Use Astro.site if available
const pathPrefix = astroBaseURL ? '/vjailbreak/release_docs/' : '/release_docs/';
select.innerHTML = releases.map(release => {
const nameModified = release.name.replace(/\./g, '');
const releaseDocsURL = `${currentURL}${pathPrefix}${nameModified}/`;
return `<option value="${release.name}">${release.name}</option>`;
}).join('');
select.selectedIndex = 0;
localStorage.setItem('vjailbreakSelectedVersion', select.value);
select.onchange = (e) => {
localStorage.setItem('vjailbreakSelectedVersion', e.target.value);
const version = e.target.value;
const btns = document.querySelectorAll('.version-btn');
btns.forEach(btn => {
if (btn.textContent === version) {
btn.click();
}
});
};
}
});
})();</script> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select value="auto" autocomplete="off" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
StarlightThemeProvider.updatePickers();
</script> <script type="module">const r="starlight-theme",o=e=>e==="auto"||e==="dark"||e==="light"?e:"auto",c=()=>o(typeof localStorage<"u"&&localStorage.getItem(r));function n(e){typeof localStorage<"u"&&localStorage.setItem(r,e==="light"||e==="dark"?e:"")}const l=()=>matchMedia("(prefers-color-scheme: light)").matches?"light":"dark";function t(e){StarlightThemeProvider.updatePickers(e),document.documentElement.dataset.theme=e==="auto"?l():e,n(e)}matchMedia("(prefers-color-scheme: light)").addEventListener("change",()=>{c()==="auto"&&t("auto")});class s extends HTMLElement{constructor(){super(),t(c()),this.querySelector("select")?.addEventListener("change",a=>{a.currentTarget instanceof HTMLSelectElement&&t(o(a.currentTarget.value))})}}customElements.define("starlight-theme-select",s);</script> <script type="module">class s extends HTMLElement{constructor(){super();const e=this.querySelector("select");e&&(e.addEventListener("change",t=>{t.currentTarget instanceof HTMLSelectElement&&(window.location.pathname=t.currentTarget.value)}),window.addEventListener("pageshow",t=>{if(!t.persisted)return;const n=e.querySelector("option[selected]")?.index;n!==e.selectedIndex&&(e.selectedIndex=n??0)}))}}customElements.define("starlight-lang-select",s);</script> </div> </div> </header> <nav class="sidebar print:hidden astro-vrdttmbt" aria-label="Main"> <starlight-menu-button class="print:hidden astro-jif73yzw"> <button aria-expanded="false" aria-label="Menu" aria-controls="starlight__sidebar" class="sl-flex md:sl-hidden astro-jif73yzw"> <svg aria-hidden="true" class="astro-jif73yzw astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M3 8h18a1 1 0 1 0 0-2H3a1 1 0 0 0 0 2Zm18 8H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Zm0-5H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2Z"/></svg> </button> </starlight-menu-button> <script type="module">class s extends HTMLElement{constructor(){super(),this.btn=this.querySelector("button"),this.btn.addEventListener("click",()=>this.toggleExpanded());const t=this.closest("nav");t&&t.addEventListener("keyup",e=>this.closeOnEscape(e))}setExpanded(t){this.setAttribute("aria-expanded",String(t)),document.body.toggleAttribute("data-mobile-menu-expanded",t)}toggleExpanded(){this.setExpanded(this.getAttribute("aria-expanded")!=="true")}closeOnEscape(t){t.code==="Escape"&&(this.setExpanded(!1),this.btn.focus())}}customElements.define("starlight-menu-button",s);</script> <div id="starlight__sidebar" class="sidebar-pane astro-vrdttmbt"> <div class="sidebar-content sl-flex astro-vrdttmbt"> <sl-sidebar-state-persist data-hash="0iup75e" class="astro-kku4brbg"> <script aria-hidden="true">
(() => {
try {
if (!matchMedia('(min-width: 50em)').matches) return;
/** @type {HTMLElement | null} */
const target = document.querySelector('sl-sidebar-state-persist');
const state = JSON.parse(sessionStorage.getItem('sl-sidebar-state') || '0');
if (!target || !state || target.dataset.hash !== state.hash) return;
window._starlightScrollRestore = state.scroll;
customElements.define(
'sl-sidebar-restore',
class SidebarRestore extends HTMLElement {
connectedCallback() {
try {
const idx = parseInt(this.dataset.index || '');
const details = this.closest('details');
if (details && typeof state.open[idx] === 'boolean') details.open = state.open[idx];
} catch {}
}
}
);
} catch {}
})();
</script> <ul class="top-level astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="0"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Introduction</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/introduction/what_is_vjailbreak/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">What is vJailbreak</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/introduction/getting_started/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Getting Started</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/introduction/prerequisites/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Prerequisites</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/introduction/faq/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">FAQ</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="1"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Concepts</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/user-management/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">User Credential Management</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/credential-management/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Credential Management</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/network-persistence/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Network Persistence</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/network-storage-mapping/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Network &amp; Storage Mapping</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/migration-options/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Migration Options</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/cluster-conversion/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Cluster Conversion</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/storage-accelerated-copy/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Storage Accelerated Copy</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/concepts/vjailbreak-accelerated-copy/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">vJailbreak Accelerated Copy</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="2"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Architecture</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/architecture/architecture-overview/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Architecture</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/architecture/vjailbreak-vm/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">vJailbreak VM</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/architecture/components/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Components</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="3"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Guide</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="4"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">CLI-API</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/cli-api/migrating_rdm_disk_windows_cluster_machine_using_cli/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Migrating RDM Disk</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/cli-api/migrating_using_cli_and_kubectl/" aria-current="page" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Use CLI to Migrate</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="5"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Cluster-Conversion</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/cluster-conversion/cluster-conversion/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Cluster Conversion</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/cluster-conversion/maas-enablement/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Add ESXi to MAAS</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="6"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">How-to</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/ai_analysis/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">AI-Powered Migration Failure Analysis</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/building/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Build vJailbreak</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/enable_kvm_nested_virtualization/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Enable KVM for virt-v2v (Nested Virtualization)</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/firstboot_script_doc/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Firstboot Script</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/gpo_migration/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Group Policy Object (GPO) VM Migration</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/injecting_custom_env/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Inject Environment Variables</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/migration_templates/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Migration Templates</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/network-traffic-separation/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configuring Dedicated Data Network for Migrations</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/networking-101/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">One-Stop Migration Networking</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/ntp_timezone/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Configure Time Zone and NTP Servers</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/perform_admin_cutover/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Perform Admin Cutover</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/profiles/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Profiles</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/retry_failed_migration/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Retry a Failed Migration</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/scaling/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Scale vJailbreak</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/stream_logs/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Stream Logs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/upgrade_vjailbreak/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Upgrade vJailbreak</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/virtio_doc/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Inject VirtIO Windows Driver</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/vjailbreak_settings/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Use vJailbreak Settings</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/vtpm_migration/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Virtual Trusted Platform Module (vTPM) VM Migration</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/how-to/windows-ldm-migration/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Windows Dynamic Disk (LDM) Migration</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="7"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Troubleshooting</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/troubleshooting/debug_vjailbreak_install/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Debug vJailbreak Installation</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/troubleshooting/debuglogs/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Debug Logs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/troubleshooting/nbdcopy-fails-after-vm-moved-esxi-host/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">nbdcopy fails during disk copy (often DNS resolution)</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/troubleshooting/troubleshooting/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Troubleshooting vJailbreak</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/troubleshooting/vmware_residual_artifacts/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">VMware Residual Artifacts</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/guides/troubleshooting/windows-offline-disks/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Windows Offline Disks After Migration</span> </a> </li> </ul> </details> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="8"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Reference</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/reference/reference/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">vJailbreak CRDs</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/reference/compatibility/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Compatibility Matrix</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/reference/known-limitations/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Known Limitations</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="9"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Release Notes</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/release_docs/v0410/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">v0.4.10</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/release_docs/v046/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">v0.4.6</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/release_docs/v047/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">v0.4.7</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/release_docs/v048/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">v0.4.8</span> </a> </li><li class="astro-3ii7xxms"> <a href="/vjailbreak/release_docs/v049/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">v0.4.9</span> </a> </li> </ul> </details> </li><li class="astro-3ii7xxms"> <details open class="astro-3ii7xxms"> <sl-sidebar-restore data-index="10"></sl-sidebar-restore> <summary class="astro-3ii7xxms"> <div class="group-label astro-3ii7xxms"> <span class="large astro-3ii7xxms">Archives</span> </div> <svg aria-hidden="true" class="caret astro-3ii7xxms astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.25rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </summary> <ul class="astro-3ii7xxms"> <li class="astro-3ii7xxms"> <a href="/vjailbreak/archives/release_notes/" aria-current="false" class="astro-3ii7xxms"> <span class="astro-3ii7xxms">Archived Releases</span> </a> </li> </ul> </details> </li> </ul> <script aria-hidden="true">
(() => {
const scroller = document.getElementById('starlight__sidebar');
if (!window._starlightScrollRestore || !scroller) return;
scroller.scrollTop = window._starlightScrollRestore;
delete window._starlightScrollRestore;
})();
</script> </sl-sidebar-state-persist> <div class="md:sl-hidden"> <div class="mobile-preferences sl-flex astro-wu23bvmt"> <div class="sl-flex social-icons astro-wu23bvmt"> <a href="https://github.com/platform9/vjailbreak" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">GitHub</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M12 .3a12 12 0 0 0-3.8 23.38c.6.12.83-.26.83-.57L9 21.07c-3.34.72-4.04-1.61-4.04-1.61-.55-1.39-1.34-1.76-1.34-1.76-1.08-.74.09-.73.09-.73 1.2.09 1.83 1.24 1.83 1.24 1.08 1.83 2.81 1.3 3.5 1 .1-.78.42-1.31.76-1.61-2.67-.3-5.47-1.33-5.47-5.93 0-1.31.47-2.38 1.24-3.22-.14-.3-.54-1.52.1-3.18 0 0 1-.32 3.3 1.23a11.5 11.5 0 0 1 6 0c2.28-1.55 3.29-1.23 3.29-1.23.64 1.66.24 2.88.12 3.18a4.65 4.65 0 0 1 1.23 3.22c0 4.61-2.8 5.63-5.48 5.92.42.36.81 1.1.81 2.22l-.01 3.29c0 .31.2.69.82.57A12 12 0 0 0 12 .3Z"/></svg> </a><a href="https://join.slack.com/t/vjailbreak/shared_invite/zt-314pppw43-F1vzd6ZaPW5PoZqF~aa8lA" rel="me" class="sl-flex astro-wy4te6ga"><span class="sr-only astro-wy4te6ga">Slack</span><svg aria-hidden="true" class="astro-wy4te6ga astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M5.042 15.165a2.528 2.528 0 0 1-2.52 2.523A2.528 2.528 0 0 1 0 15.165a2.527 2.527 0 0 1 2.522-2.52h2.52v2.52Zm1.271 0a2.527 2.527 0 0 1 2.521-2.52 2.527 2.527 0 0 1 2.521 2.52v6.313A2.528 2.528 0 0 1 8.834 24a2.528 2.528 0 0 1-2.521-2.522v-6.313ZM8.834 5.042a2.528 2.528 0 0 1-2.521-2.52A2.528 2.528 0 0 1 8.834 0a2.528 2.528 0 0 1 2.521 2.522v2.52H8.834Zm0 1.271a2.528 2.528 0 0 1 2.521 2.521 2.528 2.528 0 0 1-2.521 2.521H2.522A2.528 2.528 0 0 1 0 8.834a2.528 2.528 0 0 1 2.522-2.521h6.312Zm10.122 2.521a2.528 2.528 0 0 1 2.522-2.521A2.528 2.528 0 0 1 24 8.834a2.528 2.528 0 0 1-2.522 2.521h-2.522V8.834Zm-1.268 0a2.528 2.528 0 0 1-2.523 2.521 2.527 2.527 0 0 1-2.52-2.521V2.522A2.527 2.527 0 0 1 15.165 0a2.528 2.528 0 0 1 2.523 2.522v6.312Zm-2.523 10.122a2.528 2.528 0 0 1 2.523 2.522A2.528 2.528 0 0 1 15.165 24a2.527 2.527 0 0 1-2.52-2.522v-2.522h2.52Zm0-1.268a2.527 2.527 0 0 1-2.52-2.523 2.526 2.526 0 0 1 2.52-2.52h6.313A2.527 2.527 0 0 1 24 15.165a2.528 2.528 0 0 1-2.522 2.523h-6.313Z"/></svg> </a> </div> <starlight-theme-select> <label style="--sl-select-width: 6.25em" class="astro-4yphtoen"> <span class="sr-only astro-4yphtoen">Select theme</span> <svg aria-hidden="true" class="icon label-icon astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M21 14h-1V7a3 3 0 0 0-3-3H7a3 3 0 0 0-3 3v7H3a1 1 0 0 0-1 1v2a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-2a1 1 0 0 0-1-1ZM6 7a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v7H6V7Zm14 10a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-1h16v1Z"/></svg> <select value="auto" autocomplete="off" class="astro-4yphtoen"> <option value="dark" class="astro-4yphtoen">Dark</option><option value="light" class="astro-4yphtoen">Light</option><option value="auto" selected class="astro-4yphtoen">Auto</option> </select> <svg aria-hidden="true" class="icon caret astro-4yphtoen astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1em;"><path d="M17 9.17a1 1 0 0 0-1.41 0L12 12.71 8.46 9.17a1 1 0 1 0-1.41 1.42l4.24 4.24a1.002 1.002 0 0 0 1.42 0L17 10.59a1.002 1.002 0 0 0 0-1.42Z"/></svg> </label> </starlight-theme-select> <script>
StarlightThemeProvider.updatePickers();
</script> </div> </div> </div> </div> </nav> <div class="main-frame astro-vrdttmbt"> <script type="module">const a=document.getElementById("starlight__sidebar"),n=a?.querySelector("sl-sidebar-state-persist"),o="sl-sidebar-state",i=()=>{let t=[];const e=n?.dataset.hash||"";try{const s=sessionStorage.getItem(o),r=JSON.parse(s||"{}");Array.isArray(r.open)&&r.hash===e&&(t=r.open)}catch{}return{hash:e,open:t,scroll:a?.scrollTop||0}},c=t=>{try{sessionStorage.setItem(o,JSON.stringify(t))}catch{}},d=()=>c(i()),l=(t,e)=>{const s=i();s.open[e]=t,c(s)};n?.addEventListener("click",t=>{if(!(t.target instanceof Element))return;const e=t.target.closest("summary")?.closest("details");if(!e)return;const s=e.querySelector("sl-sidebar-restore"),r=parseInt(s?.dataset.index||"");isNaN(r)||l(!e.open,r)});addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&d()});addEventListener("pageHide",d);</script> <div class="lg:sl-flex astro-67yu43on"> <aside class="right-sidebar-container print:hidden astro-67yu43on"> <div class="right-sidebar astro-67yu43on"> <div class="lg:sl-hidden astro-pb3aqygn"><mobile-starlight-toc data-min-h="2" data-max-h="3" class="astro-doynk5tl"><nav aria-labelledby="starlight__on-this-page--mobile" class="astro-doynk5tl"><details id="starlight__mobile-toc" class="astro-doynk5tl"><summary id="starlight__on-this-page--mobile" class="sl-flex astro-doynk5tl"><div class="toggle sl-flex astro-doynk5tl">On this page<svg aria-hidden="true" class="caret astro-doynk5tl astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1rem;"><path d="m14.83 11.29-4.24-4.24a1 1 0 1 0-1.42 1.41L12.71 12l-3.54 3.54a1 1 0 0 0 0 1.41 1 1 0 0 0 .71.29 1 1 0 0 0 .71-.29l4.24-4.24a1.002 1.002 0 0 0 0-1.42Z"/></svg> </div><span class="display-current astro-doynk5tl"></span></summary><div class="dropdown astro-doynk5tl"><ul class="isMobile astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"> <a href="#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#flow-of-information-and-resource-creation" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Flow of information and resource creation</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#glossary" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Glossary</span> </a> </li> </ul> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#how-to-migrate-a-vm-using-cli-or-kubectl" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">How to migrate a VM using CLI or kubectl?</span> </a> <ul class="isMobile astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#what-are-we-going-to-do" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">What are we going to do?</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#assumptions" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Assumptions</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#gather-information" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Gather Information</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#creation-of-kubernetes-resources" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Creation of Kubernetes resources</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#monitor-the-progress" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Monitor the progress</span> </a> </li> </ul> </li> </ul> </div></details></nav></mobile-starlight-toc><script type="module" src="/vjailbreak/_astro/MobileTableOfContents.astro_astro_type_script_index_0_lang.C181hMzK.js"></script></div><div class="right-sidebar-panel sl-hidden lg:sl-block astro-pb3aqygn"><div class="sl-container astro-pb3aqygn"><starlight-toc data-min-h="2" data-max-h="3"><nav aria-labelledby="starlight__on-this-page"><h2 id="starlight__on-this-page">On this page</h2><ul class="astro-g2bywc46" style="--depth: 0;"> <li class="astro-g2bywc46" style="--depth: 0;"> <a href="#_top" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Overview</span> </a> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#flow-of-information-and-resource-creation" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">Flow of information and resource creation</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#glossary" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Glossary</span> </a> </li> </ul> </li><li class="astro-g2bywc46" style="--depth: 0;"> <a href="#how-to-migrate-a-vm-using-cli-or-kubectl" class="astro-g2bywc46" style="--depth: 0;"> <span class="astro-g2bywc46" style="--depth: 0;">How to migrate a VM using CLI or kubectl?</span> </a> <ul class="astro-g2bywc46" style="--depth: 1;"> <li class="astro-g2bywc46" style="--depth: 1;"> <a href="#what-are-we-going-to-do" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">What are we going to do?</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#assumptions" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Assumptions</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#gather-information" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Gather Information</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#creation-of-kubernetes-resources" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Creation of Kubernetes resources</span> </a> </li><li class="astro-g2bywc46" style="--depth: 1;"> <a href="#monitor-the-progress" class="astro-g2bywc46" style="--depth: 1;"> <span class="astro-g2bywc46" style="--depth: 1;">Monitor the progress</span> </a> </li> </ul> </li> </ul> </nav></starlight-toc><script type="module" src="/vjailbreak/_astro/TableOfContents.astro_astro_type_script_index_0_lang.CKWWgpjV.js"></script></div></div> </div> </aside> <div class="main-pane astro-67yu43on"> <main data-pagefind-body class="astro-bguv2lll" lang="en" dir="ltr"> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"> <h1 id="_top" class="astro-j6tvhyss">Use CLI to Migrate</h1> </div> </div> <div class="content-panel astro-7nkwcw3z"> <div class="sl-container astro-7nkwcw3z"> <div class="sl-markdown-content"> <p>vJailbreak comprises multiple Kubernetes Controllers which work on Custom Resources (CRs). When we perform the migrations through the UI, the UI itself takes care of creating these CRs for us, hence paving the way for migration to happen. In this tutorial, we will understand how we can migrate a VM using vJailbreak via CLI.</p>
<h2 id="flow-of-information-and-resource-creation">Flow of information and resource creation</h2>
<p>Before moving to the action, let’s understand the various resources that will be created to perform a migration, and how they are related to each other.
<img alt="image" loading="lazy" decoding="async" fetchpriority="auto" width="3318" height="2964" src="/vjailbreak/_astro/information-flow.BFhbn3Pl_ZCVctI.webp" ></p>
<p><strong>Note</strong>: In the diagram above, the specification/configuration flows towards the arrow, and the status travels backwards (from <code dir="auto">v2v-helper</code> Pod up till <code dir="auto">MigrationPlan</code>).</p>
<h3 id="glossary">Glossary</h3>
<p>Let’s get familiar with the resources mentioned in the diagram above. These resources are used by vJailbreak to perform the migration.</p>
<ul>
<li><strong>NetworkMapping</strong>: Defines how source VMware networks map to destination OpenStack networks. Required for configuring network interfaces for VM’s during migration.</li>
<li><strong>StorageMapping</strong>: Maps source VMware datastores to OpenStack storage backends.</li>
<li><strong>MigrationTemplate</strong>: It defines a reusable set of configurations for migrating virtual machines (VM’s) from VMware to OpenStack.</li>
<li><strong>MigrationPlan</strong>: MigrationPlan contains the VM’s to be migrated, provides reference to migration template which needs to be followed, and also specifies the way VM’s have to be migrated. A migration plan can be used for migrating multiple VM’s in batches.</li>
<li><strong>Migration</strong>: For each VM, there is an individual migration custom resource, which provides reference to the migration plan to be followed and the pod which is going to execute the migration. Migration custom resource is maintained by the vJailbreak controller itself.</li>
<li><strong>Job</strong>: With migration custom resource in place, the vJailbreak controller creates a Kubernetes Job, which will in turn create the v2v-helper pod to execute migration for the particular VM mentioned in the Migration custom resource.</li>
<li><strong>v2v-helper pods</strong>: Based on the definition of the job created by vJailbreak controller, kubernetes creates a pod to perform the actual VM migration. These pods are temporary workloads that run the helper logic and handle all the migration steps such as image conversion, driver injection, guest customization, transfer, and creation of OpenStack resources.</li>
</ul>
<p><strong>Note</strong>: <code dir="auto">NetworkMapping</code>, <code dir="auto">StorageMapping</code>, <code dir="auto">MigrationTemplate</code>, <code dir="auto">MigrationPlan</code>, and <code dir="auto">Migration</code> are Custom Resources.</p>
<p>Now that we have a basic understanding of the resources that will be useful during our journey, let’s start on the migration part.</p>
<h2 id="how-to-migrate-a-vm-using-cli-or-kubectl">How to migrate a VM using CLI or kubectl?</h2>
<h3 id="what-are-we-going-to-do">What are we going to do?</h3>
<p>First, we will gather some configuration details. We will use those pieces of configuration details together to create some custom resources, which will be then picked by the Migration Controller, and the migration will take place accordingly. While migration takes place, we will check various resources to monitor the progress of the migration.</p>
<ul>
<li><a href="#gather-information">Gather Information</a>
<ul>
<li><a href="#gather-the-credentials-to-vmware-vcenter-and-openstack">Gather the credentials to VMware vCenter and OpenStack</a></li>
<li><a href="#gather-the-details-of-the-vm-to-be-migrated">Gather the details of the VM to be migrated</a></li>
<li><a href="#gather-the-details-of-openstack-networks-and-volumetypes">Gather the details of OpenStack networks and volumeTypes</a></li>
</ul>
</li>
<li><a href="#creation-of-kubernetes-resources">Creation of Kubernetes resources</a>
<ul>
<li><a href="#create-the-storagemapping-custom-resource">Create the StorageMapping custom resource</a></li>
<li><a href="#create-the-networkmapping-custom-resource">Create the NetworkMapping custom resource</a></li>
<li><a href="#optional-explicitly-select-the-target-openstack-flavor">(Optional) Explicitly select the target OpenStack flavor</a></li>
<li><a href="#create-the-migrationtemplate-custom-resource">Create the MigrationTemplate custom resource</a></li>
<li><a href="#create-the-migrationplan-custom-resource">Create the MigrationPlan custom resource</a></li>
</ul>
</li>
<li><a href="#monitor-the-progress">Monitor the progress</a>
<ul>
<li><a href="#migration-custom-resource">Checking Migration (custom resource)</a></li>
<li><a href="#migration-job">Checking Migration Job</a></li>
<li><a href="#v2v-helper-pod">Checking v2v-helper pod</a></li>
</ul>
</li>
</ul>
<h3 id="assumptions">Assumptions</h3>
<p>Before we start, ensure the following prerequisites are fulfilled:</p>
<ul>
<li>vJailbreak is installed and configured properly</li>
<li>VMware vCenter credentials and OpenStack credentials are already set up</li>
<li>User is familiar with Kubernetes and has access to the vJailbreak VM</li>
<li>All the resources will be created in the same namespace</li>
</ul>
<p>Ensure that you follow the steps in sequence to gather information and create respective Kubernetes objects in sequence to initiate migration for a VM from VMware to PCD.</p>
<h3 id="gather-information">Gather Information</h3>
<p>For creating the resources, we will need some values to put into the YAML manifests. Let’s gather those values first.</p>
<h4 id="gather-the-credentials-to-vmware-vcenter-and-openstack">Gather the credentials to VMware vCenter and OpenStack</h4>
<p>Check the resource name for the VMware vCenter credentials using the following command:</p>
<div class="expressive-code"><link rel="stylesheet" href="/vjailbreak/_astro/ec.tm3va.css"><script type="module" src="/vjailbreak/_astro/ec.8zarh.js"></script><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl get vmwarecreds -n &#x3C;namespace></span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl get vmwarecreds -n <namespace>"><div></div></button></div></figure></div>
<p><strong>Note</strong>: The default namespace for vJailbreak ecosystem is <code dir="auto">migration-system</code>.</p>
<p>Copy the name of the <code dir="auto">VMwareCreds</code> resource that refers to the vCenter hosting the VM you want to migrate. This will be used when creating the MigrationTemplate. For example, if following is the output of the above command:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ kubectl get vmwarecreds -n migration-system</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">NAME STATUS</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">vcenter-a Succeeded</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ kubectl get vmwarecreds -n migration-systemNAME STATUSvcenter-a Succeeded"><div></div></button></div></figure></div>
<p>Then, the name of the <code dir="auto">VMwareCreds</code> would be <code dir="auto">vcenter-a</code>.</p>
<p>Similarly, check the resource name for the OpenStack credentials using the following command:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl get openstackcreds -n &#x3C;namespace></span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl get openstackcreds -n <namespace>"><div></div></button></div></figure></div>
<p>Copy the name of the <code dir="auto">OpenstackCreds</code> resource that refers to the OpenStack where you want to migrate the VM. This will also be used when creating the MigrationTemplate.</p>
<p>For example, if following is the output of the above command:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ kubectl get openstackcreds -n migration-system</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">NAME STATUS</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">openstack-a Succeeded</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ kubectl get openstackcreds -n migration-systemNAME STATUSopenstack-a Succeeded"><div></div></button></div></figure></div>
<p>Then the name of the <code dir="auto">OpenStackcreds</code> would be <code dir="auto">openstack-a</code>.</p>
<h4 id="gather-the-details-of-the-vm-to-be-migrated">Gather the details of the VM to be migrated</h4>
<p>Get the details of the VM using <code dir="auto">VMwareMachine</code> resource and details are correct:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl get vmwaremachine -n &#x3C;namespace> &#x3C;vm-name> -o yaml</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl get vmwaremachine -n <namespace> <vm-name> -o yaml"><div></div></button></div></figure></div>
<p>From the YAML, note down the following:</p>
<ul>
<li>VM’s name using <code dir="auto">spec.vms.name</code></li>
<li>Get the datastores under <code dir="auto">spec.vms.datastores</code>. This will be used for storage mapping.</li>
<li>Get the networks under <code dir="auto">spec.vms.networks</code>. This will be used for network mapping.</li>
<li>(Optional) Get the Operating System type under <code dir="auto">spec.vms.osFamily</code>. The reason for keeping it optional is that vJailbreak can auto-detect the OS most of the time, if the VM is turned on in VMware. For cold migration or migration of a VM that is in powered off state, this field will be required.</li>
<li>(Optional) Note the VM’s <code dir="auto">spec.vms.cpu</code> and <code dir="auto">spec.vms.memory</code>. If you don’t explicitly choose a target flavor (see <a href="#optional-explicitly-select-the-target-openstack-flavor">Explicitly select the target OpenStack flavor</a> below), vJailbreak uses these values to auto-select the closest matching OpenStack flavor at migration time.</li>
</ul>
<p>For example, if following is the output of the above command:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ kubectl get vmwaremachines -n migration-system vm-1 -o yaml</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">apiVersion: vjailbreak.k8s.pf9.io/v1alpha1</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kind: VmwareMachine</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">metadata:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">name: vm-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">namespace: migration-system</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">creationTimestamp: "2025-05-27T09:27:34Z"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">generation: 1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">labels:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">pcd-vm-openstack-a: d3f3d5c7-f6d8-410e-bb9f-a7afe4j8nhg</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">vmwarecreds.k8s.pf9.io-vcenter-a: "true"</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">spec:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">vms:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">clusterName: cluster-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">esxiName: esxi-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">ipAddress: &#x3C;ip-of-the-vm></span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">cpu: 1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">memory: 4096</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">name: vm-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">osFamily: linuxGuest</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">vmState: running</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">datastores:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- datastore-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- datastore-2</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">disks:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- Hard disk 1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- Hard disk 2</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">networks:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- network-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- network-2</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ kubectl get vmwaremachines -n migration-system vm-1 -o yamlapiVersion: vjailbreak.k8s.pf9.io/v1alpha1kind: VmwareMachinemetadata: name: vm-1 namespace: migration-system creationTimestamp: &#x22;2025-05-27T09:27:34Z&#x22; generation: 1 labels: pcd-vm-openstack-a: d3f3d5c7-f6d8-410e-bb9f-a7afe4j8nhg vmwarecreds.k8s.pf9.io-vcenter-a: &#x22;true&#x22;spec: vms: clusterName: cluster-1 esxiName: esxi-1 ipAddress: <ip-of-the-vm> cpu: 1 memory: 4096 name: vm-1 osFamily: linuxGuest vmState: running datastores: - datastore-1 - datastore-2 disks: - Hard disk 1 - Hard disk 2 networks: - network-1 - network-2"><div></div></button></div></figure></div>
<p>Then:</p>
<ul>
<li>The name of the datastores would be: <code dir="auto">datastore-1</code> and <code dir="auto">datastore-2</code></li>
<li>The name of the networks would be: <code dir="auto">network-1</code> and <code dir="auto">network-2</code></li>
<li>The OS family would be: <code dir="auto">linuxGuest</code></li>
</ul>
<p>After gathering the information about the source VM’s datastores and networks, we will need to gather the information about the networks and volume types present on the OpenStack, so that we can create proper StorageMapping and NetworkMapping configurations.</p>
<h4 id="gather-the-details-of-openstack-networks-and-volumetypes">Gather the details of OpenStack networks and volumeTypes</h4>
<p>Using the name of the OpenstackCreds resource that we recently checked, run the following command to get the configuration:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl get openstackcreds -n &#x3C;namespace> &#x3C;openstackcreds-resource-name> -o yaml</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl get openstackcreds -n <namespace> <openstackcreds-resource-name> -o yaml"><div></div></button></div></figure></div>
<p>From the YAML, note down the following:</p>
<ul>
<li>List of the networks available on OpenStack at <code dir="auto">status.openstack.networks</code></li>
<li>List of volume types available on OpenStack at <code dir="auto">status.openstack.volumeTypes</code></li>
</ul>
<p>For example, if following is the output of the above command:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ kubectl get openstackcreds -n migration-system openstack-a -o yaml</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">apiVersion: vjailbreak.k8s.pf9.io/v1alpha1</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kind: OpenstackCreds</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">metadata:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">name: openstack-a</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53"># …</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">spec:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53"># …</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">status:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">openstack:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">networks:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- vlan1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- vlan2</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- vlan3</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">volumeTypes:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- lvm</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- lvm-class-2</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- lvm-class-3</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ kubectl get openstackcreds -n migration-system openstack-a -o yamlapiVersion: vjailbreak.k8s.pf9.io/v1alpha1kind: OpenstackCredsmetadata: name: openstack-a # …spec: # …status: openstack: networks: - vlan1 - vlan2 - vlan3 volumeTypes: - lvm - lvm-class-2 - lvm-class-3"><div></div></button></div></figure></div>
<p>Then:</p>
<ul>
<li>VMware networks <code dir="auto">network-1</code> and <code dir="auto">network-2</code> can be translated to OpenStack networks <code dir="auto">vlan1</code>/<code dir="auto">vlan2</code>/<code dir="auto">vlan3</code></li>
<li>VMware datastores <code dir="auto">datastore-1</code> and <code dir="auto">datastore-2</code> can be translated to OpenStack volume types <code dir="auto">lvm</code>/<code dir="auto">lvm-class-2</code>/<code dir="auto">lvm-class-3</code></li>
</ul>
<p>We will see these translations in action when we create NetworkMapping and StorageMapping resources in the next section, respectively.</p>
<h3 id="creation-of-kubernetes-resources">Creation of Kubernetes resources</h3>
<p>Now that we have gathered the information that we required, let’s start creating the Kubernetes resources to initiate the migration.</p>
<h4 id="create-the-storagemapping-custom-resource">Create the StorageMapping custom resource</h4>
<p>Let’s create the <code dir="auto">StorageMapping</code> custom resource to ensure that virtual disks are placed correctly in the destination environment. Below is how its manifest would look like:</p>
<h5 id="manifest">Manifest</h5>
<p>In the manifest, we need to provide a mapping between the source datastores that we captured from the <code dir="auto">VMwareMachine</code> (namely <code dir="auto">datastore-1</code> and <code dir="auto">datastore-2</code>), and will map them with the target volume types that we captured from the <code dir="auto">OpenstackCreds</code>.</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ cat storage-mapping.yaml</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">apiVersion: vjailbreak.k8s.pf9.io/v1alpha1</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kind: StorageMapping</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">metadata:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">name: storagemapping</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">namespace: migration-system</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">spec:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">storages:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- source: datastore-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">target: lvm</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- source: datastore-2</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">target: lvm</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ cat storage-mapping.yamlapiVersion: vjailbreak.k8s.pf9.io/v1alpha1kind: StorageMappingmetadata: name: storagemapping namespace: migration-systemspec: storages: - source: datastore-1 target: lvm - source: datastore-2 target: lvm"><div></div></button></div></figure></div>
<h5 id="how-to-apply-this-configuration">How to apply this configuration?</h5>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl apply -f storage-mapping.yaml</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl apply -f storage-mapping.yaml"><div></div></button></div></figure></div>
<p>Read more about <code dir="auto">StorageMapping</code> in <a href="https://platform9.github.io/vjailbreak/reference/reference/#datastore-mapping">the CRDs reference document</a>.</p>
<h4 id="create-the-networkmapping-custom-resource">Create the NetworkMapping custom resource</h4>
<p>Now, let’s create a <code dir="auto">NetworkMapping</code> custom resource to define how networks will be translated from VMware to OpenStack. Below is how its Kubernetes manifest would look like.</p>
<h5 id="manifest-1">Manifest</h5>
<p>In the manifest, we need to provide target networks for both the networks that we captured from the VM (namely <code dir="auto">network-1</code> and <code dir="auto">network-2</code>), and will map them with the target networks that we captured from the <code dir="auto">OpenstackCreds</code>.</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ cat network-mapping.yaml</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">apiVersion: vjailbreak.k8s.pf9.io/v1alpha1</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kind: NetworkMapping</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">metadata:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">name: networkmapping</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">namespace: migration-system</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">spec:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">networks:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- source: network-1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">target: vlan1</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- source: network-2</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">target: vlan2</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ cat network-mapping.yamlapiVersion: vjailbreak.k8s.pf9.io/v1alpha1kind: NetworkMappingmetadata: name: networkmapping namespace: migration-systemspec: networks: - source: network-1 target: vlan1 - source: network-2 target: vlan2"><div></div></button></div></figure></div>
<h5 id="how-to-apply-this-configuration-1">How to apply this configuration?</h5>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl apply -f network-mapping.yaml</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl apply -f network-mapping.yaml"><div></div></button></div></figure></div>
<p>Read more about <code dir="auto">NetworkMapping</code> in <a href="https://platform9.github.io/vjailbreak/reference/reference/#network-mapping">the CRDs reference document</a>.</p>
<h4 id="optional-explicitly-select-the-target-openstack-flavor">(Optional) Explicitly select the target OpenStack flavor</h4>
<p>By default, vJailbreak picks the target VM’s OpenStack flavor automatically: it looks for a flavor whose vCPU and RAM exactly match the source VM, or the next best match if there is no exact match. This “best guess” match is based on size alone, so if your OpenStack environment has multiple flavors with the same vCPU/RAM but different extra specs or tags (for example, different host aggregates, GPU passthrough, or hotplug support), vJailbreak may not pick the one you intended.</p>
<p>To avoid this, you can explicitly pin a VM to a specific flavor by setting <code dir="auto">spec.targetFlavorId</code> on its <code dir="auto">VMwareMachine</code> custom resource, before creating the <code dir="auto">MigrationPlan</code>.</p>
<p>First, find the flavor ID you want to use. Using the OpenStack CLI against your target OpenStack/PCD environment, list the available flavors:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">openstack flavor list</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="openstack flavor list"><div></div></button></div></figure></div>
<p>This prints each flavor’s ID, name, vCPU count, RAM, and disk size, for example:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">+--------------------------------------+--------------+------+------+-----------+-------+-----------+</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">+--------------------------------------+--------------+------+------+-----------+-------+-----------+</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">| d2a1e2d0-1111-4a3e-9c3e-abc123456789 | m1.medium.gpu| 8192 | 40 | 0 | 4 | True |</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">| f8b2c3d1-2222-4b4f-8d4f-def456789012 | m1.medium | 8192 | 40 | 0 | 4 | True |</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">+--------------------------------------+--------------+------+------+-----------+-------+-----------+</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="+--------------------------------------+--------------+------+------+-----------+-------+-----------+| ID | Name | RAM | Disk | Ephemeral | VCPUs | Is Public |+--------------------------------------+--------------+------+------+-----------+-------+-----------+| d2a1e2d0-1111-4a3e-9c3e-abc123456789 | m1.medium.gpu| 8192 | 40 | 0 | 4 | True || f8b2c3d1-2222-4b4f-8d4f-def456789012 | m1.medium | 8192 | 40 | 0 | 4 | True |+--------------------------------------+--------------+------+------+-----------+-------+-----------+"><div></div></button></div></figure></div>
<p>Identify the flavor that matches what you want (by name and/or by inspecting its extra specs/tags with <code dir="auto">openstack flavor show &#x3C;flavor-name-or-id></code>), and copy its <code dir="auto">ID</code> column.</p>
<p>Once you’ve identified the flavor ID you want (<code dir="auto">d2a1e2d0-1111-4a3e-9c3e-abc123456789</code> in this example), patch the <code dir="auto">VMwareMachine</code> resource for the VM being migrated:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl patch vmwaremachine -n migration-system &#x3C;vm-name> --type merge -p '{"spec":{"targetFlavorId":"d2a1e2d0-1111-4a3e-9c3e-abc123456789"}}'</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl patch vmwaremachine -n migration-system <vm-name> --type merge -p &#x27;{&#x22;spec&#x22;:{&#x22;targetFlavorId&#x22;:&#x22;d2a1e2d0-1111-4a3e-9c3e-abc123456789&#x22;}}&#x27;"><div></div></button></div></figure></div>
<p>You can confirm it was set correctly with:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl get vmwaremachine -n migration-system &#x3C;vm-name> -o jsonpath='{.spec.targetFlavorId}'</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl get vmwaremachine -n migration-system <vm-name> -o jsonpath=&#x27;{.spec.targetFlavorId}&#x27;"><div></div></button></div></figure></div>
<p><strong>Note</strong>: <code dir="auto">targetFlavorId</code> is read once, when vJailbreak creates the migration ConfigMap for the VM (as part of <code dir="auto">MigrationPlan</code> processing). Set it on the <code dir="auto">VMwareMachine</code> before creating the <code dir="auto">MigrationPlan</code> for that VM. If it is left blank, vJailbreak falls back to the automatic best-match flavor selection described above.</p>
<h4 id="create-the-migrationtemplate-custom-resource">Create the MigrationTemplate custom resource</h4>
<p>Now that we have <code dir="auto">StorageMapping</code> and <code dir="auto">NetworkMapping</code> resources in place, let’s create a <code dir="auto">MigrationTemplate</code>. As the name suggests, <code dir="auto">MigrationTemplate</code> can be created once for a set of <code dir="auto">VMwareCreds</code>, <code dir="auto">OpenstackCreds</code> and the corresponding <code dir="auto">NetworkMapping</code> and <code dir="auto">StorageMapping</code>. This can be reused between various <code dir="auto">MigrationPlan</code> resources.</p>
<h5 id="manifest-2">Manifest</h5>
<p>In the <code dir="auto">MigrationTemplate</code>, we need to provide the following details:</p>
<ul>
<li>Name of the <code dir="auto">NetworkMapping</code> resource</li>
<li>Name of the <code dir="auto">StorageMapping</code> resource</li>
<li><code dir="auto">VMwareCreds</code> resource name</li>
<li><code dir="auto">OpenstackCreds</code> resource name</li>
<li>Type of the OS (Optional)</li>
</ul>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ cat migration-template.yaml</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">apiVersion: vjailbreak.k8s.pf9.io/v1alpha1</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kind: MigrationTemplate</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">metadata:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">name: migrationtemplate</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">namespace: migration-system</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">spec:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">networkMapping: networkmapping</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">storageMapping: storagemapping</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">osFamily: linux # valid values: linux, windows (optional — auto-detected when VM is powered on)</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">source:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">vmwareRef: vcenter-a</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">destination:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">openstackRef: openstack-a</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ cat migration-template.yamlapiVersion: vjailbreak.k8s.pf9.io/v1alpha1kind: MigrationTemplatemetadata: name: migrationtemplate namespace: migration-systemspec: networkMapping: networkmapping storageMapping: storagemapping osFamily: linux # valid values: linux, windows (optional — auto-detected when VM is powered on) source: vmwareRef: vcenter-a destination: openstackRef: openstack-a"><div></div></button></div></figure></div>
<h5 id="how-to-apply-this-configuration-2">How to apply this configuration?</h5>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl apply -f migration-template.yaml</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl apply -f migration-template.yaml"><div></div></button></div></figure></div>
<p>Read more about <code dir="auto">MigrationTemplate</code> in <a href="https://platform9.github.io/vjailbreak/reference/reference/#migrationtemplate">the CRDs reference document</a>.</p>
<h4 id="create-the-migrationplan-custom-resource">Create the MigrationPlan custom resource</h4>
<p>After creating the <code dir="auto">MigrationTemplate</code>, we need to create the <code dir="auto">MigrationPlan</code> to configure how migration will be executed. Whether it will be a hot migration, or cold migration? When will the cutover happen? Will the cutover happen automatically or manually? etc. Let’s create a <code dir="auto">MigrationPlan</code> resource.</p>
<h5 id="manifest-3">Manifest</h5>
<p>In the manifest, we will provide the name of the <code dir="auto">MigrationTemplate</code> to be used, and various different configurations related to migration execution.</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">$ cat migration-plan.yaml</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">apiVersion: vjailbreak.k8s.pf9.io/v1alpha1</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kind: MigrationPlan</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">metadata:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">name: migrationplan</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">namespace: migration-system</span></div></div><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">spec:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">migrationTemplate: migrationtemplate</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">migrationStrategy:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">type: hot</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">adminInitiatedCutOver: false</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">performHealthChecks: false</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">healthCheckPort: "443"</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">virtualMachines:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#d6deeb;--1:#403f53"> </span></span><span style="--0:#d6deeb;--1:#403f53">- - vm-1</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="$ cat migration-plan.yamlapiVersion: vjailbreak.k8s.pf9.io/v1alpha1kind: MigrationPlanmetadata: name: migrationplan namespace: migration-systemspec: migrationTemplate: migrationtemplate migrationStrategy: type: hot adminInitiatedCutOver: false performHealthChecks: false healthCheckPort: &#x22;443&#x22; virtualMachines: - - vm-1"><div></div></button></div></figure></div>
<p>To know more about all the supported fields for advanced use-cases, refer to the <a href="https://platform9.github.io/vjailbreak/reference/reference/#migrationplan">MigrationPlan section of the CRD reference document</a>.</p>
<h5 id="optional-migrationplan-fields">Optional MigrationPlan Fields</h5>
<p>The example above shows the minimum required fields. The following optional fields are also supported:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="yaml"><code><div class="ec-line"><div class="code"><span style="--0:#7FDBCA;--1:#111111">spec</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">migrationTemplate</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#3B61B0">migrationtemplate</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#919F9F;--1:#5F636F"># Retry the migration automatically if it fails</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">retry</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#FF6A83;--1:#A24848">false</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#919F9F;--1:#5F636F"># Shell script executed on first boot of the destination VM</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">firstBootScript</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#C792EA;--1:#8844AE">|</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#ECC48D;--1:#3B61B0"> </span></span><span style="--0:#ECC48D;--1:#3B61B0">echo "Add your startup script here!"</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#919F9F;--1:#5F636F"># Schedule data copy and cutover windows (RFC 3339 datetime)</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">migrationStrategy</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">type</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#ECC48D;--1:#3B61B0">hot</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">dataCopyStart</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">2024-06-01T02:00:00Z</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># when to start copying data</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">vmCutoverStart</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">2024-06-01T04:00:00Z</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># start of cutover window</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">vmCutoverEnd</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">2024-06-01T05:00:00Z</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># end of cutover window</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">adminInitiatedCutOver</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#FF6A83;--1:#A24848">false</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">performHealthChecks</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#FF6A83;--1:#A24848">false</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">healthCheckPort</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">443</span><span style="--0:#D9F5DD;--1:#111111">"</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#919F9F;--1:#5F636F"># Post-migration actions on the source VM in VMware</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">postMigrationAction</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">renameVm</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#FF6A83;--1:#A24848">true</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">suffix</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">_migrated_to_pcd</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># appended to source VM name</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">moveToFolder</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#FF6A83;--1:#A24848">true</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">folderName</span><span style="--0:#D6DEEB;--1:#403F53">: </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">migrated</span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#D6DEEB;--1:#403F53"> </span><span style="--0:#919F9F;--1:#5F636F"># VMware folder to move source VM into</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#919F9F;--1:#5F636F"># Advanced: override volume types, networks, or ports per VM</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">advancedOptions</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">granularVolumeTypes</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">- </span><span style="--0:#ECC48D;--1:#3B61B0">lvm</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">granularNetworks</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">- </span><span style="--0:#ECC48D;--1:#3B61B0">vlan1</span></div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">granularPorts</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">- </span><span style="--0:#D9F5DD;--1:#111111">"</span><span style="--0:#ECC48D;--1:#984E4D">port-uuid-1</span><span style="--0:#D9F5DD;--1:#111111">"</span></div></div><div class="ec-line"><div class="code">
</div></div><div class="ec-line"><div class="code"><span class="indent"> </span><span style="--0:#7FDBCA;--1:#111111">virtualMachines</span><span style="--0:#D6DEEB;--1:#403F53">:</span></div></div><div class="ec-line"><div class="code"><span class="indent"><span style="--0:#D6DEEB;--1:#403F53"> </span></span><span style="--0:#D6DEEB;--1:#403F53">- - </span><span style="--0:#ECC48D;--1:#3B61B0">vm-1</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="spec: migrationTemplate: migrationtemplate # Retry the migration automatically if it fails retry: false # Shell script executed on first boot of the destination VM firstBootScript: | echo &#x22;Add your startup script here!&#x22; # Schedule data copy and cutover windows (RFC 3339 datetime) migrationStrategy: type: hot dataCopyStart: &#x22;2024-06-01T02:00:00Z&#x22; # when to start copying data vmCutoverStart: &#x22;2024-06-01T04:00:00Z&#x22; # start of cutover window vmCutoverEnd: &#x22;2024-06-01T05:00:00Z&#x22; # end of cutover window adminInitiatedCutOver: false performHealthChecks: false healthCheckPort: &#x22;443&#x22; # Post-migration actions on the source VM in VMware postMigrationAction: renameVm: true suffix: &#x22;_migrated_to_pcd&#x22; # appended to source VM name moveToFolder: true folderName: &#x22;migrated&#x22; # VMware folder to move source VM into # Advanced: override volume types, networks, or ports per VM advancedOptions: granularVolumeTypes: - lvm granularNetworks: - vlan1 granularPorts: - &#x22;port-uuid-1&#x22; virtualMachines: - - vm-1"><div></div></button></div></figure></div>
<h5 id="how-to-apply-this-configuration-3">How to apply this configuration?</h5>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl apply -f migration-plan.yaml</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl apply -f migration-plan.yaml"><div></div></button></div></figure></div>
<p>Now that we have created all the required resources, let’s see what are the additional resources being created in the background, how do they interconnect, how to find out where the migration of a particular VM is happening, and how to check its progress.</p>
<h3 id="monitor-the-progress">Monitor the progress</h3>
<h4 id="migration-custom-resource">Migration (custom resource)</h4>
<p>Whenever a <code dir="auto">MigrationPlan</code> is created, vJailbreak controller creates a <code dir="auto">Migration</code> custom resource for individual VM’s mentioned in the <code dir="auto">MigrationPlan</code>.</p>
<h5 id="check-the-migration-custom-resource">Check the Migration custom resource</h5>
<p>Following the standard naming conventions used by vJailbreak, the <code dir="auto">Migration</code> custom resource has a name like <code dir="auto">migration-&#x3C;vm-name></code>. We can confirm if the <code dir="auto">MigrationPlan</code> and VM name are correct or not. To check the specifications of a migration custom resource, run the following command:</p>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl get migration -n &#x3C;namespace> migration-&#x3C;vm-name> -o yaml</span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl get migration -n <namespace> migration-<vm-name> -o yaml"><div></div></button></div></figure></div>
<ul>
<li>MigrationPlan will be available under: <code dir="auto">metadata.labels.migrationplan</code> or <code dir="auto">spec.migrationPlan</code></li>
<li>VM’s name will be placed under: <code dir="auto">spec.vmName</code></li>
<li>Once sure that the migration resource is related to the VM we want to track the migration of, check the pod prefix under: <code dir="auto">spec.podRef</code></li>
</ul>
<h4 id="migration-job">Migration Job</h4>
<p>Migration Job is a Kubernetes Job responsible for migrating one VM from VMware to OpenStack. It runs a pod which performs all tasks required to migrate a single VM including disk extraction, conversion, transfer, and VM creation in the target OpenStack environment. These jobs are created dynamically and are not declared by the user.</p>
<h5 id="check-the-migration-job">Check the Migration Job</h5>
<ul>
<li>Following the standard naming conventions followed by vJailbreak, the job has a name like <code dir="auto">v2v-helper-&#x3C;vm-name></code>.</li>
<li>We can check the status of the job under the <code dir="auto">status</code> section.</li>
</ul>
<h4 id="v2v-helper-pod">v2v-helper pod</h4>
<p>v2v-helper pod is the Kubernetes Pod created by Migration Job. It is the runtime unit that performs the actual VM migration, including disk extraction, transformation, and transfer from vSphere to OpenStack. It is the execution engine for migrating one VM. It runs the v2v-helper utility to perform these actions.</p>
<h5 id="check-the-v2v-helper-pod-logs">Check the v2v-helper pod logs</h5>
<ul>
<li>After getting the pod name from the migration custom resource, you can check the logs of the pod using the following command:</li>
</ul>
<div class="expressive-code"><figure class="frame not-content"><figcaption class="header"></figcaption><pre data-language="plaintext"><code><div class="ec-line"><div class="code"><span style="--0:#d6deeb;--1:#403f53">kubectl logs -n &#x3C;namespace> &#x3C;pod-name></span></div></div></code></pre><div class="copy"><button title="Copy to clipboard" data-copied="Copied!" data-code="kubectl logs -n <namespace> <pod-name>"><div></div></button></div></figure></div>
<ul>
<li>To tail the live logs, we can use the <code dir="auto">-f</code> flag.</li>
</ul>
<p>This way, we can automate the migration for n numbers of Virtual Machines, from VMware to OpenStack, using vJailbreak via kubectl.</p> </div> <footer class="sl-flex astro-3yyafb3n"> <div class="meta sl-flex astro-3yyafb3n"> <a href="https://platform9.github.io/vjailbreak/src/content/docs/guides/CLI-API/migrating_using_cli_and_kubectl.md" class="sl-flex print:hidden astro-eez2twj6"><svg aria-hidden="true" class="astro-eez2twj6 astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.2em;"><path d="M22 7.24a1 1 0 0 0-.29-.71l-4.24-4.24a1 1 0 0 0-1.1-.22 1 1 0 0 0-.32.22l-2.83 2.83L2.29 16.05a1 1 0 0 0-.29.71V21a1 1 0 0 0 1 1h4.24a1 1 0 0 0 .76-.29l10.87-10.93L21.71 8c.1-.1.17-.2.22-.33a1 1 0 0 0 0-.24v-.14l.07-.05ZM6.83 20H4v-2.83l9.93-9.93 2.83 2.83L6.83 20ZM18.17 8.66l-2.83-2.83 1.42-1.41 2.82 2.82-1.41 1.42Z"/></svg> Edit page</a> </div> <div class="pagination-links print:hidden astro-u2l5gyhi" dir="ltr"> <a href="/vjailbreak/guides/cli-api/migrating_rdm_disk_windows_cluster_machine_using_cli/" rel="prev" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17 11H9.41l3.3-3.29a1.004 1.004 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33 1 1 0 0 0 0 .76 1 1 0 0 0 .21.33l5 5a1.002 1.002 0 0 0 1.639-.325 1 1 0 0 0-.219-1.095L9.41 13H17a1 1 0 0 0 0-2Z"/></svg> <span class="astro-u2l5gyhi"> Previous <br class="astro-u2l5gyhi"> <span class="link-title astro-u2l5gyhi">Migrating RDM Disk</span> </span> </a> <a href="/vjailbreak/guides/cluster-conversion/cluster-conversion/" rel="next" class="astro-u2l5gyhi"> <svg aria-hidden="true" class="astro-u2l5gyhi astro-c6vsoqas" width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style="--sl-icon-size: 1.5rem;"><path d="M17.92 11.62a1.001 1.001 0 0 0-.21-.33l-5-5a1.003 1.003 0 1 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1.002 1.002 0 0 0 .325 1.639 1 1 0 0 0 1.095-.219l5-5a1 1 0 0 0 .21-.33 1 1 0 0 0 0-.76Z"/></svg> <span class="astro-u2l5gyhi"> Next <br class="astro-u2l5gyhi"> <span class="link-title astro-u2l5gyhi">Cluster Conversion</span> </span> </a> </div> </footer> </div> </div> </main> </div> </div> </div> </div> </body></html>