免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1864 | 回复: 0
打印 上一主题 下一主题

Updating the VMWare ESXi Disk Dump File [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-01-15 16:34 |只看该作者 |倒序浏览

Updating the VMWare ESXi Disk Dump File
View


  • Track

    Tue, 08/19/2008 - 11:47 — Cameron
    So in my previous blog I said I used iSCSI to mount the VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd disk dump included in the VMWare ESXi install...I recieved a few comments about this as it is a heavy handed way of getting the support you need, so I figured out a non-iscsi way of mounting the VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd file.
    If you haven't read my other blog the VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd file is on the VMWare installer media inside the install.tgz file as VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd.bz2. This file is a bziped disk dump of a complete hard drive...it has 6 partitions defined inside of it. The first thing you need to do is determine the offset to the parttition you wish to mount..in our case that is most likely partition 5 as it contains the oem.tgz file:
  • Untar-gz install.tgz (mkdir /tmp/esx-temp; tar -xzvf install.tgz -C /tmp/esx-temp)
  • Unbzip2 the disk image (cd /tmp/esx-temp/usr/lib/vmware/installer;bunzip2 VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd.bz2)
  • Determine the sector size (fdisk -ul VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd)
    This should print out the following:

    [root@cbrunner-f8 installer]# fdisk -ul VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd
    You must set cylinders.
    You can do this from the extra functions menu.
    Disk VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd: 0 MB, 0 bytes
    64 heads, 32 sectors/track, 0 cylinders, total 0 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x00000000
    Device Boot      Start         End      Blocks   Id  System
    VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd1            8192     1535999      763904    5  Extended
    VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd4   *          32        8191        4080    4  FAT16

    As you can see the sector size is 512 bytes...so now you can mount any of the partions by passing the "offset" option to mount with a value equal to the start block * 512. Here are the steps...
  • Make a temp mout directory (mkdir /tmp/esx-5)
  • Mount the partition 5 through the loopback device (mount -o loop,offset=$((512*8224)) VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd /tmp/esx-5/ )
    The $((512*8224)) automatically does the multiplication for you...isn't that nice. (Note 8224 is the start block for partition 5). At this point if you do a "ls /tmp/esx-5" you get:

    [root@cbrunner-f8 installer]# ls /tmp/esx-5/
    binmod.tgz  boot.cfg  cim.tgz  environ.tgz  license.tgz  oem.tgz  vmkernel.gz

    You can now update the oem.tgz file. When you are done you need to "umount /tmp/esx-5 ", bzip the disk image "bzip2 VMware-VMvisor-big-3.5.0_Update_2-103909.i386.dd", and then rebuild install.tgz (cd /tmp/esx-temp/; tar czvf ../install.tgz sbin/ usr/).
    -Cameron


    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/8059/showart_2150082.html
  • 您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP