Recrear una cabecera de un disco virtual (VMDK) perdido en VMWARE
La situación es la siguiente:
Supongamos que tenemos una máquina virtual corriendo en un VMWARE ESXi 5.0 ó menor... de repente se va la luz y cuando vuelve, la máquina virtual no arranca!. Cuando revisamos los archivos de configuración nos damos cuenta de que el disco virtual *-flat.vmdk está, pero la cabecera del mismo, un archivo *.vmdk ya no está!. Pero no se preocupen (demasiado), hay forma de regenerarlo:
1- Mediante un cliente SSH, como PuTTY, nos conectamos al servidor ESXi y autenticamos con el usuario y contraseña del root. Si no podemos entrar por SSH, sigue estas instrucciones para habilitarlo.
Ya estando adentro, cambiamos de directorio hasta donde está la máquina virtual en cuestión:
cd /vmfs/volumes/poolData/Servidor1/
poolData es el contenedor donde están las máquinas virtuales, ustedes deben haberle dado otro nombre. Y Servidor1, es el nombre de la máquina virtual.
2- Entonces, listamos los archivos con las extensión *.vmdk:
ls -ltr *.vmdk
La salida será el archivo Servidor1-flat.vmdk, pero Servidor1.vmdk no existe y por eso es que lo vamos a recuperar.
3- Identificamos el controlador SCSI con el comando:
less *.vmdk | grep -i virtualdev
Lo cual nos arrojará algo como lo que sigue:
scsi0.virtualDev = "lsilogic"
4- La próxima información que necesitamos es el tamaño exacto del disco virtual *-flat.vmdk. Y lo obtenemos con el siguiente comando:
ls -l *-flat.vmdk
La salida será parecida a esta:
-rw------- 1 root root 6563673896 feb 10 05:18 Servidor1-flat.vmdk
5- Ahora usamos el comando vmkfstools para crear un disco temporal (flat .vmdk) y su respectiva cabecera asociada .vmdk, con el siguiente formato:
vmkfstools -c tamañoArchivo -a tipoSCSI -d thin nombreArchivo.vmdk
Lo cual quedará así:
vmkfstools -c 6563673896 -a lsilogic -d thin temp.vmdk
6- Ya creado, cambiamos el nombre del archivo temporal por el nombre del archivo perdido .vmdk:
mv temp.vmdk Servidor1.vmdk
7- Ahora edita el archivo de cabecera Servidor1.vmdk con vi y cambias temp-flat.vmdk por Servidor1-flat.vmdk, cambiando esta línea:
RW 6563673896 VMFS "temp-flat.vmdk"
Por esta:
RW 6563673896 VMFS "Servidor1-flat.vmdk"
El archivo de cabecera original, que se perdió, no era un "thin provisioned", por eso también borra la línea:
ddb.thinProvisioned = "1"
8- Ahora el siguiente paso es iniciar la máquina virtual y voila!.
BASADO EN HECHO REALES! xD
LATINCHAIN PLATFORM
Understanding the LatinChain Ecosystem
Your gateway to decentralized applications on the Pi Network.
Welcome to the LatinChain Ecosystem portal. As a decentralized application (dApp) built on the Pi Network, our goal is to provide real utility and seamless interaction for the Pi community. Whether you are a developer, a pioneer, or a casual user, understanding the difference between our Mainnet and Testnet environments is crucial for maximizing your experience.
Staking Pi to Boost Rank
Did you know you can directly support the growth of LatinChain Mainnet?
By Staking Pi on our app within the Pi Browser, you help boost our ranking in the ecosystem directory. A higher rank means more visibility, bringing more Pioneers into our community and increasing the value of the network for everyone.
Support us today and help LatinChain reach the top!
Why Choose the Mainnet?
The LatinChain Mainnet (latinchain.pinet.com) is the live production environment where real value is exchanged. By accessing the Mainnet, you are interacting with the fully operational version of our blockchain application.
- Real Utility: Every action contributes to the genuine activity of the network.
- Verified Status: Users who choose to support the ecosystem via donations can unlock "Verified" status. This signals your commitment to the community.
- Double Utility Bonus: Active usage on the Mainnet contributes to your Pi utility usage bonus.
The Role of the Testnet
The Testnet serves as our sandbox environment. It is designed for users who want to explore new features, test transaction flows, or understand the mechanics of the LatinChain token without using real Pi. It is the perfect training ground for new pioneers to get comfortable with Web3 interactions before moving to the Mainnet.
How the LatinChain Token Works
LatinChain is designed to foster a digital economy within the Pi Browser. By participating in either network, you are helping to stress-test and improve a growing financial ecosystem.
Select an option above to begin your journey.
The Evolution of Cryptocurrency: From Bitcoin's Genesis to Pi Network's Ecosystem (2008-nowadays)
The world of finance was forever changed in the aftermath of the 2008 global financial crisis. What started as an obscure proposal on a cryptography mailing list has transformed into a global technological revolution. Here is the journey of cryptocurrency from its inception to the present day.
The Genesis: Bitcoin and the Decentralized Dream (2008-2010)
In October 2008, an anonymous entity named Satoshi Nakamoto published a whitepaper titled "Bitcoin: A Peer-to-Peer Electronic Cash System." It introduced a revolutionary concept: a decentralized digital currency that required no central bank or administrator.
- The Genesis Block: On January 3, 2009, the first block of the Bitcoin network was mined, setting the foundation for a new financial paradigm.
- Proof of Work: This brilliant consensus mechanism solved the double-spending problem, ensuring complete trust in a trustless digital environment.
Programmable Money: Ethereum and the DeFi Explosion (2015-2021)
While Bitcoin proved the concept of digital scarcity, developers soon realized blockchain technology could do much more. In 2015, Ethereum launched, introducing "smart contracts"—self-executing code that lives directly on the blockchain.
- Decentralized Finance (DeFi): Ethereum enabled the creation of lending platforms, decentralized exchanges, and automated market makers.
- Mainstream Awareness: By 2021, the crypto market reached unprecedented heights, driven by global retail interest, digital art (NFTs), and the exciting promise of Web3.
Maturation and Institutional Adoption (2022-2024)
Following the euphoric highs of previous years, the industry entered a vital period of maturation. The global focus shifted from pure speculation to building robust, scalable infrastructure.
- Layer 2 Solutions: New networks built on top of base blockchains made transactions significantly faster and cheaper.
- Wall Street Entry: Major traditional financial institutions embraced Bitcoin ETFs, permanently cementing cryptocurrency as a legitimate and highly sought-after asset class.
The Accessibility Revolution: Pi Network (2025-nowadays)
Despite massive industry growth, a major barrier remained: traditional crypto mining was expensive and technically complex. Enter Pi Network, a visionary project designed to put cryptocurrency directly into the hands of everyday people. By nowadays, Pi Network has beautifully solidified its vision of creating a truly inclusive digital economy.
- Mobile-First Innovation: Pi revolutionized accessibility by allowing users to mine directly from their smartphones without draining battery life or data.
- Global Community: It successfully built one of the largest, most engaged, and widely distributed communities in the entire Web3 space.
- Everyday Utility: With a robust ecosystem of decentralized applications (dApps) and an innovative native KYC solution, Pi Network empowers millions of everyday users to transact, build, and interact seamlessly.
Takeaway: The journey from 2008 to nowadays highlights a monumental shift from niche cryptography to universal accessibility, paving the way for a financial future that truly includes everyone.
Claro una vez modificas el apuntador al flat en vmdk el archivo no queda legible para la VM es decir de nuevo no tienes cabecera, la solución no sirve.
ReplyDeleteVMware
KB: 1002511
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1002511
Gracias por el comentario.
DeleteProbablemente sea porque en la línea:
ReplyDeleteRW 8388608 VMFS "temp-flat.vmdk"
debes cambiar el tamaño del archivo por el que te había salido cuando ejecutaste 'ls' al flat original:
ls -l *-flat.vmdk
La salida será parecida a esta:
-rw------- 1 root root 6563673896 feb 10 05:18 Servidor1-flat.vmdk
En este caso la línea en la cabecera en quedaría de la siguiente forma:
RW 6563673896 VMFS "Servidor1-flat.vmdk"
Fue un error mio al momento de publicarlo. Saludos.
Ya lo cambié. Gracias por comentar.
ReplyDelete