Como recuperar um disco virtual danificado
Apresentando erro VDI Unavailable.
Ok, to do that, create a new vdi larger than the one that is damaged. Preferably use the command line:
xe vdi-create sr-uuid=bc4c43f3-1321-2b17-bef0-3b58686a8075 name-label=copy virtual-size=210130436096
the sr-uuid is the storage where you want to put the copy. Take note of the uuid that comes up after you execute the command
get the uuid of your xenserver control domain by doing
xe vm-list name-label=Control\ domain\ on\ host:\ <name of your xenserver host> params=uuid
then create the vbd
xe vbd-create vm-uuid=<vm-uuid you got from the previous command> vdi-uuid=<vdi uuid you got from the vdi-create command> device=0
plug the vbd
xe vbd-plug uuid=<vbd uuid you got from the previous command>
then do the copy
dd if=/dev/mapper/VG_XenStorage--bc4c43f3--1321--2b17--bef0--3b58686a8075- VHD--b079b55a--6679--47a1--b2a2--d207a476494e of=/dev/xvda
The copy will take several minutes. When finished unplug the vbd
xe vbd-unplug uuid=<vbd uuid you got from the vbd-create command>
xe vbd-destroy uuid=<vbd uuid you got from the vbd-create command>
Afterwards, you can connect the new vdi to a vm and see if you can recover anything.
Última modificação 6 anos atrás
Última modificação em 21/05/2015 15:58:14