I referred to the following URL.
Ubuntu 11.04
VMware ESXi 4.1.0 build-348481
mount ESXi’s vmfs
Ubuntu ---------------------------- ESXi
[ preparation ]
[ on Ubuntu ]
install sshfs
# apt-get install sshfs |
To mount vmfs with sshfs from ubuntu , sftp is needed on a remote machine(ESXi).
copy sftp-server binary file to ESXi’s /sbin/directory.
on Ubuntu , download sftp-server.tar.gz , extract tar.gz , copy sftp-server file to ESXi’s /sbin directory.
# wget http://thebsdbox.co.uk/wp-content/uploads/2010/08/sftp-server.tar.gz # tar xzvf sftp-server.tar.gz sftp-server # file sftp-server sftp-server: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for GNU/Linux 2.2.5, not stripped # scp sftp-server root@vmware:/sbin/ |
confirm there’s sftp-server file under ESXi’s /sbin directory.
[ on ESXi ]
~ # vmware -lv VMware ESXi 4.1.0 build-348481 VMware ESXi 4.1.0 Update 1~ # ls /sbin/sftp-server /sbin/sftp-server |
[ mount a remote ESXi’s vmfs from Ubuntu ]
[ on Ubuntu ]
# sshfs -o idmap=user root@vmware:/ /root/tmp_dir root@vmware's password: # cd /root/tmp_dir/ # ls altbootbank dev lib64 opt sbin tmp vmfs bin etc local.tgz proc scratch usr vmimages bootbank lib locker productLocker store var vmupgrade |
unmount
# fusermount -u /root/tmp_dir |
[ tips ]
Unfortunately , when rebooting ESXi , /sbin/sftp-server file will be removed.
To solve this , copy sftp-server file to ESXi’s oem.tgz file.
[ on Ubuntu ]
# scp root@vmware:/bootbank/oem.tgz . root@vmware's password: oem.tgz 100% 928KB 927.8KB/s 00:00 # cd zzz/ # cp /root/oem.tgz . # pwd /root/zzz # ls oem.tgz # tar xzvf oem.tgz # rm oem.tgz # ls etc lib oem.tgz sbin usr var # cp /root/sftp-server sbin/ # tar czvf oem.tgz * etc/ etc/cim/ etc/vmware/ etc/vmware/init/ etc/vmware/init/manifests/ etc/vmware/init/manifests/Neterion-vxge.mf etc/vmware/init/manifests/LSI-3w-9xxx.mf etc/vmware/pciid/ etc/vmware/pciid/vxge.xml etc/vmware/pciid/3w-9xxx.xml etc/ipmi/ lib/ lib/cim/ sbin/ sbin/sftp-server usr/ usr/lib/ usr/lib/vmware/ usr/lib/vmware/vmkmod/ usr/lib/vmware/vmkmod/vxge.o usr/lib/vmware/vmkmod/3w-9xxx.o usr/lib/ext/ usr/lib/pycim/ var/ var/db/ var/db/esxupdate/ var/db/esxupdate/oem-pkgdb.tgz var/lib/ var/lib/sfcb/ var/lib/sfcb/registration/ |
copy oem.tgz to ESXi’s /bootbank directory
[ on Ubuntu ]
# scp oem.tgz root@vmware:/bootbank/ root@vmware's password: oem.tgz 100% 2002KB 2.0MB/s 00:00 |
[ on ESXi ]
After rebooting ESXi , there’s sftp-server file under /sbin directory.
Tech Support Mode may be disabled by an administrative user. Please consult the ESXi Configuration Guide for additional important information. ~ # ls /sbin/sftp-server /sbin/sftp-server |
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.