设为首页 收藏本站
查看: 796|回复: 0

[经验分享] Install ESXi from USB stick

[复制链接]
发表于 2015-10-9 10:08:04 | 显示全部楼层 |阅读模式
  

  from http://www.jonathanmedd.net/2011/01/install-esxi-4-1-from-a-usb-stick.html
  

  
Install ESXi 4.1 from a USB stick
Postedon January 24th, 2011 JonathanMedd 18comments  
Depending on your environment you may find the ability to install ESXi from a USB stick, particularly if you do not have access to a PXE based deployment solution.
With ESXi 4.0 I had used a USB stick with the install ISO on the stick. Whilst starting to test 4.1 I thought it would be a simple case of replacing the 4.0 ISO with 4.1. However, when I did this I was able to boot to the install, but when it got to the partof copying the files I received the error:
“Unable to find the system image to install. This is due to the image not being mounted correctly, or the CD-Rom drive not supported”
A bit of googling revealed that there seems to be a change between 4.0 and 4.1 where the install is hard-coded to look for the files on the CD-Rom drive. Consequently it looks like you need to take a slightly different approach and use the new Scripted Installfeature of ESXi in 4.1
So this post will detail the three steps you need to take to get this working:

  • Creating the bootable USB stick including the installation files
  • Adding the Kickstart script
  • Add a custom mod.tgz file
Creating the bootable USB stick including the installation files
There are many posts on the web detailing how to create a bootable USB stick with syslinux. One I have found particularly useful for this scenario is UNetbootin.This is a GUI based tool that allows you to create bootable USB drives for Ubuntu, Fedora and other Linux distributions by pointing the tool at the install ISO and hitting Go! I found this from DanielBuonocore’s post over at blogs.vmpros.nl
Download the execuatble from UNetbootin andpoint it at the ESXi 4.1 ISO file.


Hit OK and the creation will begin:


You will be prompted to overwrite the file menu.c32 , answer Yes that you wish to do this.


This part is then complete. There is no need to reboot


Adding the Kickstart script
As mentioned earlier we need to specify that the ESXi install files are not on the CD-Rom; we do this by modifying the syslinux.cfg file to include a reference to a Kickstart file on the USB stick. So modifysyslinux.cfg toinclude ks=usb to the append line. Whilst we are here also add - – -  mod.tgz at the end of the same line – more on this in the next section. The resulting file will now look like this:
01defaultmenu.c3202menutitle VMware VMvisor Boot Menu03timeout8004 05labelESXi Installer06menulabel ^ESXi Installer07kernelmboot.c3208appendvmkboot.gz ks=usb --- vmkernel.gz --- sys.vgz --- cim.vgz --- ienviron.vgz --- install.vgz --- mod.tgz09 10label^Boot from local disk11menulabel ^Boot from local disk12localboot0x80We now need to add a Kickstart script to the USB stick. The ESXiInstallable and vCenter Server Setup Guide for 4.1 contains details of the options for this file. For my very simple requirements I have used the following to create a ks.cfg file:
1vmaccepteula2rootpwpassword3autopart--firstdisk --overwritevmfs4installusb5network--bootproto=dhcp--device=vmnic0Add a custom mod.tgz file
At this point you are pretty much there, however if you boot of the stick now you will get the following error on the console constantly repeating:
Totalnumber of sectors not a multiple of sectors per track! Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
It is possible to temporarily get round this via the following method detailed in the VMwarecommunites:
ALT + F1
Log in (root + no password)
echo “mtools_skip_check=1″ >> .mtoolsrc
ALT + F2 to return to original Console window
Press Enter or wait to continue
However, you don’t really want to have to do that everytime. So very helpfully Ivo Beerens over ativobeerens.nl has createda custom mod.tgz file which will automate this part for us.
Download the mod.tgz file and copy it to the USB stick. (Make sure you have modified the syslinux.cfgfile as mentioned earlier in this post to reference the mod.tgz file)
The contents of the USB stick should now look like:


The USB stick is now complete and ready to be boot from. The following three posts were highly useful in helping put this USB stick together.

  • Howto create a bootable ESXi USB Stick with UNetbootin
  • CreatingUSB key to install VMware ESXi 4.1
  • InstallVMware ESXi 4.1 from bootable USB stick
Update 18/02/2001:
The release notes of ESXi 4.1 U1 contain details of the above issue where the additional mod.tgz file is required:
Unable to install ESXi 4.1 using scripted installation from a USB drive
When you try to install ESXi 4.1 by using script saved on a USB drive or if the installation media is on a USB drive, the ESXi 4.1 installation stops and displays the following message:
Total number of sectors not a multiple of sectors per track!
Add mtools_skip_check=1 to your .mtoolsrc file to skip this test.
The issue is resolved in this release.

I tested this and it works fine, so the mod.tgz file is no longer required. Don’t forget to update yoursyslinux.cfg file to remove the reference to – mod.tgz .

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.iyunv.com/thread-124608-1-1.html 上篇帖子: 在 VMware ESXi 上安装 Minix 下篇帖子: ESXI4.0自定义驱动
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表