[{"data":1,"prerenderedAt":577},["ShallowReactive",2],{"blog-\u002Fen\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi":3,"blog-\u002Fen\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi-surround":521,"blog-\u002Fen\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi-certifications":576},{"id":4,"title":5,"body":6,"categories":509,"cover":510,"cover_contain":511,"credly_badge_id":509,"date":512,"description":513,"extension":514,"meta":515,"navigation":511,"path":516,"related_certifications":509,"seo":517,"slug":518,"stem":519,"__hash__":520},"blog\u002Fen\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi.md","Editing the vmx, vmxf, vmdk, and nvram Files on VMware ESXi",{"type":7,"value":8,"toc":502},"minimark",[9,14,18,56,107,111,139,173,176,191,194,215,221,225,228,242,245,260,263,275,278,287,290,318,321,334,337,416,435,438,461,464,468,471,477,483,488,491,495,498],[10,11,13],"h2",{"id":12},"real-world-use-case","Real-world use case",[15,16,17],"p",{},"You need to rename an ESXi VM end to end, files included: here's how to properly edit the vmx, vmxf, vmdk, and nvram files.",[15,19,20,21,25,26,29,30,33,34,37,38,41,42,45,46,49,50,33,53,55],{},"The goal of this article is to ",[22,23,24],"strong",{},"understand how to rename"," an entire ",[22,27,28],{},"VM"," in ",[22,31,32],{},"ESXi",".",[35,36],"br",{},"\nA ",[22,39,40],{},"virtual machine"," uses a ",[22,43,44],{},"path"," and ",[22,47,48],{},"configuration files"," stored in a ",[22,51,52],{},"datastore",[35,54],{},"\nThere are 4 files that let the virtual machine start:",[57,58,59,75,85,98],"ul",{},[60,61,62,63,66,67,70,71,74],"li",{},"a ",[22,64,65],{},".vmx"," file that contains ",[22,68,69],{},"all"," the ",[22,72,73],{},"configuration data",", including absolute paths, etc…",[60,76,62,77,80,81,84],{},[22,78,79],{},".vmxf"," file, which is an ",[22,82,83],{},"additional configuration"," file.",[60,86,62,87,90,91,94,95,33],{},[22,88,89],{},".vmdk"," file, which corresponds to the ",[22,92,93],{},"content"," of the virtual machine's ",[22,96,97],{},"hard drive",[60,99,62,100,103,104,33],{},[22,101,102],{},".nvram"," file, which represents the virtual machine's ",[22,105,106],{},"BIOS",[10,108,110],{"id":109},"backing-up-the-machine-to-rename","Backing up the machine to rename",[15,112,113,114,116,117,120,121,33,124,126,127,130,131,134,135,138],{},"Before doing anything with the ",[22,115,40],{},", it must be ",[22,118,119],{},"powered off"," and have no ",[22,122,123],{},"snapshots",[35,125],{},"\nYou can make a ",[22,128,129],{},"clone"," of the \".",[22,132,133],{},"vmdk","\" to have a fallback, using the \"",[22,136,137],{},"vmkfstools","\" tool:",[140,141,146],"pre",{"className":142,"code":143,"language":144,"meta":145,"style":145},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","vmkfstools -i vm_prod.vmdk vm_prod_save.vmdk -d thin \n","bash","",[147,148,149],"code",{"__ignoreMap":145},[150,151,154,157,161,164,167,170],"span",{"class":152,"line":153},"line",1,[150,155,137],{"class":156},"sBMFI",[150,158,160],{"class":159},"sfazB"," -i",[150,162,163],{"class":159}," vm_prod.vmdk",[150,165,166],{"class":159}," vm_prod_save.vmdk",[150,168,169],{"class":159}," -d",[150,171,172],{"class":159}," thin\n",[15,174,175],{},"Don't forget to move the clone to a different folder:",[140,177,179],{"className":142,"code":178,"language":144,"meta":145,"style":145},"mv vm_prod_save.vmdk ..\u002Fvm_prod_save\u002F\n",[147,180,181],{"__ignoreMap":145},[150,182,183,186,188],{"class":152,"line":153},[150,184,185],{"class":156},"mv",[150,187,166],{"class":159},[150,189,190],{"class":159}," ..\u002Fvm_prod_save\u002F\n",[15,192,193],{},"And to copy the important side files into that directory:",[140,195,197],{"className":142,"code":196,"language":144,"meta":145,"style":145},"cp vm_prod.vmx vm_prod.vmxf vm_prod.nvram ..\u002Fvm_prod_save\u002F\n",[147,198,199],{"__ignoreMap":145},[150,200,201,204,207,210,213],{"class":152,"line":153},[150,202,203],{"class":156},"cp",[150,205,206],{"class":159}," vm_prod.vmx",[150,208,209],{"class":159}," vm_prod.vmxf",[150,211,212],{"class":159}," vm_prod.nvram",[150,214,190],{"class":159},[15,216,217,218,33],{},"Once these steps are done, go ahead and start ",[22,219,220],{},"working on the VM",[10,222,224],{"id":223},"renaming-the-virtual-machines-folder","Renaming the virtual machine's folder",[15,226,227],{},"My machine is stored in datastore1:",[140,229,231],{"className":142,"code":230,"language":144,"meta":145,"style":145},"cd \u002Fvmfs\u002Fvolumes\u002Fdatastore1\u002F\n",[147,232,233],{"__ignoreMap":145},[150,234,235,239],{"class":152,"line":153},[150,236,238],{"class":237},"s2Zo4","cd",[150,240,241],{"class":159}," \u002Fvmfs\u002Fvolumes\u002Fdatastore1\u002F\n",[15,243,244],{},"Rename the \"vm_prod\" folder to \"prod\":",[140,246,248],{"className":142,"code":247,"language":144,"meta":145,"style":145},"mv vm_prod\u002F prod\n",[147,249,250],{"__ignoreMap":145},[150,251,252,254,257],{"class":152,"line":153},[150,253,185],{"class":156},[150,255,256],{"class":159}," vm_prod\u002F",[150,258,259],{"class":159}," prod\n",[15,261,262],{},"Move into the \"prod\" folder:",[140,264,266],{"className":142,"code":265,"language":144,"meta":145,"style":145},"cd prod\u002F\n",[147,267,268],{"__ignoreMap":145},[150,269,270,272],{"class":152,"line":153},[150,271,238],{"class":237},[150,273,274],{"class":159}," prod\u002F\n",[15,276,277],{},"List all the available files:",[140,279,281],{"className":142,"code":280,"language":144,"meta":145,"style":145},"ls\n",[147,282,283],{"__ignoreMap":145},[150,284,285],{"class":152,"line":153},[150,286,280],{"class":156},[15,288,289],{},"The following output appears:",[140,291,293],{"className":142,"code":292,"language":144,"meta":145,"style":145},"vm_prod-flat.vmdk  vm_prod.nvram      vm_prod.vmdk       vm_prod.vmsd       vm_prod.vmx        vm_prod.vmxf       vmware.log\n",[147,294,295],{"__ignoreMap":145},[150,296,297,300,303,306,309,312,315],{"class":152,"line":153},[150,298,299],{"class":156},"vm_prod-flat.vmdk",[150,301,302],{"class":159},"  vm_prod.nvram",[150,304,305],{"class":159},"      vm_prod.vmdk",[150,307,308],{"class":159},"       vm_prod.vmsd",[150,310,311],{"class":159},"       vm_prod.vmx",[150,313,314],{"class":159},"        vm_prod.vmxf",[150,316,317],{"class":159},"       vmware.log\n",[15,319,320],{},"Edit the \"vm_prod.vmx\" file:",[140,322,324],{"className":142,"code":323,"language":144,"meta":145,"style":145},"vi vm_prod.vmx\n",[147,325,326],{"__ignoreMap":145},[150,327,328,331],{"class":152,"line":153},[150,329,330],{"class":156},"vi",[150,332,333],{"class":159}," vm_prod.vmx\n",[15,335,336],{},"Press the \"i\" key (insert mode) to edit the file as follows:",[140,338,340],{"className":142,"code":339,"language":144,"meta":145,"style":145},"nvram = \"prod.nvram\"\nextendedConfigFile = \"prod.vmxf\"\nscsi0:0.fileName = \"prod.vmdk\"\nsched.swap.derivedName = \"\u002Fvmfs\u002Fvolumes\u002F\"YOUR_DATASTORE_NUMBER_HERE\"\u002Fprod\u002Fprod-e6f7a239.vswp\"\n",[147,341,342,360,375,390],{"__ignoreMap":145},[150,343,344,347,350,354,357],{"class":152,"line":153},[150,345,346],{"class":156},"nvram",[150,348,349],{"class":159}," =",[150,351,353],{"class":352},"sMK4o"," \"",[150,355,356],{"class":159},"prod.nvram",[150,358,359],{"class":352},"\"\n",[150,361,363,366,368,370,373],{"class":152,"line":362},2,[150,364,365],{"class":156},"extendedConfigFile",[150,367,349],{"class":159},[150,369,353],{"class":352},[150,371,372],{"class":159},"prod.vmxf",[150,374,359],{"class":352},[150,376,378,381,383,385,388],{"class":152,"line":377},3,[150,379,380],{"class":156},"scsi0:0.fileName",[150,382,349],{"class":159},[150,384,353],{"class":352},[150,386,387],{"class":159},"prod.vmdk",[150,389,359],{"class":352},[150,391,393,396,398,400,403,406,409,411,414],{"class":152,"line":392},4,[150,394,395],{"class":156},"sched.swap.derivedName",[150,397,349],{"class":159},[150,399,353],{"class":352},[150,401,402],{"class":159},"\u002Fvmfs\u002Fvolumes\u002F",[150,404,405],{"class":352},"\"",[150,407,408],{"class":159},"YOUR_DATASTORE_NUMBER_HERE",[150,410,405],{"class":352},[150,412,413],{"class":159},"\u002Fprod\u002Fprod-e6f7a239.vswp",[150,415,359],{"class":352},[15,417,418,419,421,422,428,429,434],{},"Once you've checked the changes, press the \"esc\" key on your keyboard.",[35,420],{},"\nTo save the changes, type \"",[22,423,424,427],{},[425,426],"wq",{},"!","\"; if you made a mistake, type \"",[22,430,431,427],{},[432,433],"quit",{},"\" and start over.",[15,436,437],{},"Rename the \"vm_prod.vmx\" and \"vm_prod.vmxf\" files:",[140,439,441],{"className":142,"code":440,"language":144,"meta":145,"style":145},"mv vm_prod.vmx prod.vmx\nmv vm_prod.vmxf prod.vmxf\n",[147,442,443,452],{"__ignoreMap":145},[150,444,445,447,449],{"class":152,"line":153},[150,446,185],{"class":156},[150,448,206],{"class":159},[150,450,451],{"class":159}," prod.vmx\n",[150,453,454,456,458],{"class":152,"line":362},[150,455,185],{"class":156},[150,457,209],{"class":159},[150,459,460],{"class":159}," prod.vmxf\n",[15,462,463],{},"You can also do this for \"vm_prod.nvram\" and the \".vswp\" file, but it's not required!",[10,465,467],{"id":466},"starting-the-virtual-machine-after-the-change","Starting the virtual machine after the change",[15,469,470],{},"I recommend removing the old \"vm_prod\" machine from your inventory.",[15,472,473],{},[474,475],"img",{"alt":145,"src":476},"\u002Fimages\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi\u002F2ff36a771d.png",[15,478,479,480,482],{},"With the vSphere client, go to your datastore1 and add \"prod.vmx\" to the ESXi inventory.",[35,481],{},"\nA message appears when starting the virtual machine, click \"I copied it\":",[15,484,485],{},[474,486],{"alt":145,"src":487},"\u002Fimages\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi\u002F3120982488.png",[15,489,490],{},"You have officially renamed your entire virtual machine in VMware ESXi.",[10,492,494],{"id":493},"conclusion","Conclusion",[15,496,497],{},"This article explained how to properly rename a virtual machine in VMware ESXi by working on its .vmx, .vmxf, .vmdk, and .nvram files: first backing up the disk and side files, renaming the folder and files, then updating the paths in the .vmx file before re-adding the VM to the inventory. This method avoids having to recreate the virtual machine from scratch and lets you keep its original disk and configuration. However, it's essential to power off the VM and remove its snapshots before making any changes.",[499,500,501],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}",{"title":145,"searchDepth":362,"depth":362,"links":503},[504,505,506,507,508],{"id":12,"depth":362,"text":13},{"id":109,"depth":362,"text":110},{"id":223,"depth":362,"text":224},{"id":466,"depth":362,"text":467},{"id":493,"depth":362,"text":494},null,"\u002Fimages\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi\u002Fa3ce9b6363.jpg",true,"2013-12-14","Want to rename an entire VM? There are simple, effective solutions! Requirement: an ESXi host with SSH access enabled.","md",{},"\u002Fen\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi",{"title":5,"description":513},"modifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi","en\u002Fblog\u002Fmodifier-vmx-vmxf-vmdk-nvram-sur-vmware-esxi","N7GzrbmmPr4fzs1d5ahFmYG8wkZbX1z7SrUWcvOSKYE",[522,530,538,546,552,558,564,570],{"title":523,"path":524,"stem":525,"date":526,"cover":527,"categories":528,"children":-1},"My Use of the Proprietary Windows 8.1 System","\u002Fen\u002Fblog\u002Fmon-utilisation-systeme-proprietaire-windows","en\u002Fblog\u002Fmon-utilisation-systeme-proprietaire-windows","2013-12-27","\u002Fimages\u002Fblog\u002Fmon-utilisation-systeme-proprietaire-windows\u002Fb36cbda2fc.jpg",[529],"Microsoft",{"title":531,"path":532,"stem":533,"date":534,"cover":535,"categories":536,"children":-1},"Installing CyanogenMod 11 on the Nexus 4","\u002Fen\u002Fblog\u002Finstaller-cyanogenmod-sur-nexus","en\u002Fblog\u002Finstaller-cyanogenmod-sur-nexus","2013-12-25","\u002Fimages\u002Fblog\u002Finstaller-cyanogenmod-sur-nexus\u002F83621431fb.png",[537],"Google",{"title":539,"path":540,"stem":541,"date":542,"cover":543,"categories":544,"children":-1},"Why I Gave a Nexus 7 as a Christmas Gift","\u002Fen\u002Fblog\u002Fpourquoi-offert-une-nexus-noel","en\u002Fblog\u002Fpourquoi-offert-une-nexus-noel","2013-12-22","\u002Fimages\u002Fblog\u002Fpourquoi-offert-une-nexus-noel\u002F10df2223a3.jpg",[545],"Évènement",{"title":547,"path":548,"stem":549,"date":512,"cover":550,"categories":551,"children":-1},"Brocade Absorbs Vyatta: the SDN Specialist","\u002Fen\u002Fblog\u002Fbrocade-absorbe-vyatta-specialiste-sdn","en\u002Fblog\u002Fbrocade-absorbe-vyatta-specialiste-sdn","\u002Fimages\u002Fblog\u002Fbrocade-absorbe-vyatta-specialiste-sdn\u002Fa44b82e35f.jpg",[545],{"title":553,"path":554,"stem":555,"date":556,"cover":557,"categories":509,"children":-1},"Installing ESET NOD32 Antivirus 4 on Arch Linux","\u002Fen\u002Fblog\u002Finstallation-eset-nod32-antivirus-sur-arch-linux","en\u002Fblog\u002Finstallation-eset-nod32-antivirus-sur-arch-linux","2013-12-06","\u002Fimages\u002Fblog\u002Finstallation-eset-nod32-antivirus-sur-arch-linux\u002F6749b4b507.png",{"title":559,"path":560,"stem":561,"date":562,"cover":563,"categories":509,"children":-1},"Installing VMware Workstation 10 on Arch Linux","\u002Fen\u002Fblog\u002Finstallation-vmware-workstation-sur-arch-linux","en\u002Fblog\u002Finstallation-vmware-workstation-sur-arch-linux","2013-11-30","\u002Fimages\u002Fblog\u002Finstallation-vmware-workstation-sur-arch-linux\u002F3c5fd341a5.jpg",{"title":565,"path":566,"stem":567,"date":568,"cover":569,"categories":509,"children":-1},"Upgrading VMware ESXi 5.0 to 5.1 on an OVH mSP Server","\u002Fen\u002Fblog\u002Fmise-niveau-vmware-esxi-vers-sur-msp-ovh","en\u002Fblog\u002Fmise-niveau-vmware-esxi-vers-sur-msp-ovh","2013-11-27","\u002Fimages\u002Fblog\u002Fmise-niveau-vmware-esxi-vers-sur-msp-ovh\u002F4feb6be1a0.jpg",{"title":571,"path":572,"stem":573,"date":574,"cover":575,"categories":509,"children":-1},"Installing a TeamSpeak 3 Server","\u002Fen\u002Fblog\u002Finstallation-serveur-teamspeak","en\u002Fblog\u002Finstallation-serveur-teamspeak","2013-11-24","\u002Fimages\u002Fblog\u002Finstallation-serveur-teamspeak\u002F7048294e7f.png",[],1786644891883]