当前位置:网站首页>Process record of a failed migration of vmfstools from exsi
Process record of a failed migration of vmfstools from exsi
2022-04-21 07:25:00 【longyu_ wlz】
vmkfstools do ?
vmkfstools It's for management VMFS volume 、 Storage devices and virtual disks ESXi Shell Command one . have access to vmkfstools The command performs many storage operations . for example , You can create and manage on physical partitions VMFS data storage , Or operation VMFS or NFS A virtual disk file stored in a data store .( Excerpt from vmware Official website )
from EXSI System migration vmfstools Attempts to
pack vmfstools Program and dependency Library
EXSI System missing ldd command , You cannot directly query the dependent dynamic library , You can set LD_TRACE_LOADED_OBJECTS by 1 To get vmfstools Dependent dynamic libraries .
The content obtained is as follows :
[root@localhost] vmkfstools
libvmkfslib.so => /lib64/libvmkfslib.so (0x0000003f23cff000)
libvmlibs.so => /lib64/libvmlibs.so (0x0000003f23f15000)
libvmsnapshot.so => /lib64/libvmsnapshot.so (0x0000003f2444d000)
libpollDefault.so => /lib64/libpollDefault.so (0x0000003f249be000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003f24bc4000)
libc.so.6 => /lib64/libc.so.6 (0x0000003f24de1000)
librt.so.1 => /lib64/librt.so.1 (0x0000003f25190000)
libcrypto.so.1.0.2 => /lib64/libcrypto.so.1.0.2 (0x0000003f25398000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003f2585e000)
libssl.so.1.0.2 => /lib64/libssl.so.1.0.2 (0x0000003f25a63000)
libz.so.1 => /lib64/libz.so.1 (0x0000003f25cd7000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003f25ef2000)
/lib64/ld-linux-x86-64.so.2 (0x0000003ee3adc000)
libtreestructs.so => /lib64/libtreestructs.so (0x0000003f26109000)
Directly package dependent libraries and executable programs , Execute... In the target environment chroot, The following errors are reported after execution :
[root@localhost test]# chroot . /bin/vmkfstools
MD5 signature mismatch with running vmkernel built on _Unknown_ (my build date: Apr 3 2018 14:22:21)
The error message indicates ,vmkfstools Added verification for kernel version information .
strace track vmfstools Program execution
perform strace -f chroot . /bin/vmkfstools Get the following key information :
uname({
sys="Linux", node="sasl", ...}) = 0
access("/etc/vmware/hostd/mockupEsxHost.txt", F_OK) = -1 ENOENT (No such file or directory)
write(2, "MD5 signature mismatch with runn"..., 102MD5 signature mismatch with running vmkernel built on _Unknown_ (my build date: Apr 3 2018 14:22:21)
The information above indicates that , This procedure is through uname The system call is used to obtain the kernel version information , Then check . Can pass hook uname Library function to skip this check .
hook uname
#include <sys/utsname.h>
#include <string.h>
#define SYSNAME "VMkernel"
#define NODENAME "localhost"
#define RELEASE "6.7.0"
#define VERSION "#1 SMP Release build-8169922 Apr 3 2018 14:48:22"
#define MACHINE "x86_64"
int uname(struct utsname *name)
{
if (!name)
return 0;
memcpy(name->sysname, SYSNAME, sizeof(SYSNAME));
memcpy(name->nodename, NODENAME, sizeof(NODENAME));
memcpy(name->release, RELEASE, sizeof(RELEASE));
memcpy(name->version, VERSION, sizeof(VERSION));
memcpy(name->machine, MACHINE, sizeof(MACHINE));
return 0;
}
Execute the following command to compile the dynamic library :
gcc -fPIC -shared uname.c -o uname.so
Verify that it works :
[root@localhost ~]# LD_PRELOAD="/root/uname.so" uname -a
VMkernel localhost 6.7.0 #1 SMP Release build-8169922 Apr 3 2018 14:48:22 x86_64 x86_64 x86_64 GNU/Linux
The above output information indicates that it is effective .
chroot Environmental Science preload
Execute on chroot The following command line settings LD_PRELOAD Variable is , It is found that the program runs with an error . So in chroot Add... To your environment etc/ld.so.preload file , And set the file content to /lib64/uname.so. Later copy uname.so To chroot Environmental lib64 Directory .
Re execution chroot . /bin/vmkfstools, At this time, the following error is reported :
[root@localhost test]# chroot . /bin/vmkfstools
Error during version check: Failed to get vmkernel version: 0xffffffda
The first kernel version Verification passed , The error message indicates that there are other verification methods in addition .
continue strace track
strace -f chroot . /bin/vmkfstools Get the following key information :
syscall_1024(0x7ffcaf2fb6ac, 0, 0, 0x7ffcaf2fb300, 0xb, 0x3) = -1 (errno 38)
write(2, "Error during version check: Fail"..., 71Error during version check: Failed to get vmkernel version: 0xffffffda
This information indicates that ,vmkfstools The running kernel implements a system call for verifying the version , The kernel used in our system does not implement this system call , Then the test failed .
Confirm the return value 38 Indicates that the function is not implemented , Related definitions are as follows :
#define ENOSYS 38 /* Function not implemented */
strace Compare the system call when executing this command on the native environment , I don't see any special projects , Feel a little strange , I have to give up first .
版权声明
本文为[longyu_ wlz]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204210618507909.html
边栏推荐
- PowerShell - delay start sleep
- Eal:Error reading from file descriptor 33: Input/output error
- WordPress地址siteurl错误 无法登录的解决方法
- 力扣-354.俄罗斯套娃信封问题
- 【保姆安装教程】Linux操作系统中源码下载MySQL5.7
- WordPress plugin - easy WP SMTP
- 获取进程最后一次执行的 cpu 核的方法及原理
- PowerShell - 因为在此系统上禁止运行脚本
- 「Tarjan」有向图强连通分量
- 传染病模型进行仿真Matlab(仅做Matlab仿真学习与练习,非实际情况与应用)
猜你喜欢

Database splitting under microservice architecture

「Tarjan」无向图强连通分量

What is PAAS? Platform as a service introduction

数据的导出

【眼见非实-Bugku CTF】

WordPress plugin - display posts

Could not initialize cudnn ,please check cudnn installation.

从 systemd-udevd 运行 log 中研究其自动加载内核模块的过程

【论文精读】Deep Surface Normal Estimation with Hierarchical RGB-D Fusion

力扣-300.最长递增子序列
随机推荐
Sakura Substring思维
There are three ways of asynchronous RPC: asynchronous call, asynchronous listening and callback call
C#数组
Change picture suffix
一次从 EXSI 移植 vmfstools 失败的过程记录
图形学基础|实时阴影渲染
Substring Inversion (Easy Version)
Reading notes - refinement of thinking
Fundamentals of graphics | area light rendering based on LTC
如何使用u深度启动u盘清除系统登录密码
C#类和方法的定义
setpci 命令与内核 pci_enable_device 与 pci_disable_device 函数
Integers Have Friends 区间gcd + 双指针
效率工具|专用截图辅助软件PureRef
MySQL workbench cannot use clear text authentication over non SSL connections problem solving
数据库——《对数据进行排序》
在ensp上配置安全策略
Reflection cannot find the class message classnotfound of UDF when executing flinksql code
【LeetCode 67】二个进制数求和
Missing key(s) in state_dict: “module.resnet50.conv1.weight“