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

[经验分享] VMWare File Format Learning && Use VHD File To Boot VMWare && CoreOS Docker Conf

[复制链接]

尚未签到

发表于 2015-4-9 10:45:27 | 显示全部楼层 |阅读模式
  目录



1. Virtual Machine Introduce
2. Vmware Image File Format
3. VHD File Format
4. Convert VHD File Into VMDK
5. Run Virtual PC virtual machine in VMware Workstation
6. CoreOS Docker Configuration And Running && Vagrant + CoreOS + docker
7. Create A CoreOS ISO VM with CoreOS VHD
  
  1. Virtual Machine Introduce
  A virtual machine (VM) shares physical hardware resources with other users but isolates the operating system or application to avoid changing the end-user experience.
  A virtual machine (VM) is an operating system OS or application environment that is installed on software which imitates dedicated hardware. The end user has the same experience on a virtual machine as they would have on dedicated hardware.
  Vm diff from Physic Machine



1. Non-virtualized computers
they load and execute hundreds or thousands of individual files, including operating-system kernel files, device drivers, application components and data files.
2. Virtualization abstracts the software from the underlying hardware and puts all the constituent data for a given virtual machine (VM) in a single disk file. The disk file is essentially a complete and independent virtual machine.
  Relevant Link:



http://searchservervirtualization.techtarget.com/definition/virtual-machine
http://whatis.techtarget.com/fileformat/VMDK-Virtual-Machine-Disk-file-for-VMware-virtual-machines
  
  2. Vmware Image File Format



1. .vmx: 虚拟机名称.vmx
存储虚拟机设置的主要配置文件。如果虚拟机是使用之前版本的 Workstation 在 Linux 主机上创建的,这类文件的扩展名可能为 .cfg
2. .log: 虚拟机名称.log or vmware.log
主要日志文件。如果您需要排除某个问题,可以参考该文件。该文件与 .vmx 文件存储在同一个目录中
3. .nvram: 虚拟机名称.nvram or nvram
NVRAM 文件,用于存储虚拟机 BIOS 的状态。该文件与 .vmx 文件存储在同一个目录中
4. .vmdk
1) 虚拟机名称.vmdk
虚拟磁盘文件,用于存储虚拟机硬盘驱动器的内容。这些文件与 .vmx 文件存储在同一个目录中
一个虚拟磁盘由一个或多个虚拟磁盘文件构成。虚拟机设置显示集中第一个文件的名称。该文件包含指向集中其他文件的指针。
如果您指定在创建虚拟磁盘时分配所有的磁盘空间,这些文件一开始就会是最大大小,之后也不会再增长。文件中几乎所有的内容都是虚拟机数据。有一小部分文件会分配用于虚拟机开销
如果虚拟机直接连接到物理磁盘,虚拟磁盘文件将存储有关虚拟机可访问分区的信息
2) 虚拟机名称-s###.vmdk
如果指定文件大小可以增加,文件名的文件编号部分将包含一个 s,例如 Windows 7-s001.vmdk。
如果您指定将虚拟磁盘拆分为 2 GB 大小的文件,文件数量取决于虚拟磁盘的大小。随着数据被添加到虚拟磁盘,每个文件最大可以扩至 2 GB
3) 虚拟机名称-f###.vmdk
如果在创建磁盘时分配了磁盘空间,文件名中将包含一个 f,例如 Windows 7-f001.vmdk
4) 虚拟机名称-磁盘-###.vmdk
如果虚拟机有一个或多个快照,则会有一些重做日志文件。这些文件存储虚拟机运行期间对虚拟磁盘所做的更改。### 表示 Workstation 为避免文件名重复而添加的唯一后缀
5. vmem
1) uuid.vmem
虚拟机分页文件,用于在主机文件系统上备份客户机主内存。该文件只在虚拟机运行或发生故障时存在。它存储在工作目录中。
2) 快照名称及编号.vmem
已开启虚拟机的每个快照都有一个关联的 .vmem 文件,该文件保存为快照的一部分,包含客户机操作系统的主内存
6. .vmsd: 虚拟机名称.vmsd
用于集中存储快照相关信息和元数据的文件。它存储在工作目录中
7. .vmsn: 虚拟机名称.Snapshot.vmsn
快照状态文件,用于存储拍摄快照时虚拟机的运行状态。它存储在工作目录中
8. .vmss: 虚拟机名称.vmss
挂起状态文件,用于存储挂起虚拟机的状态。它存储在工作目录中
9. 其他文件(如锁定文件)也可能存储在虚拟机目录中。某些文件只在虚拟机运行期间出现
  Relevant Link:



http://pubs.vmware.com/workstation-10/index.jsp?topic=%2Fcom.vmware.ws.using.doc%2FGUID-A968EF50-BA25-450A-9D1F-F8A9DEE640E7.html
https://www.vmware.com/support/ws5/doc/ws_learning_files_in_a_vm.htm
  
  3. VHD File Format

  The Virtual Hard Disk (VHD) format is a publicly-available image format specification that allows encapsulation of the hard disk into an individual file for use by the operating system as a virtual disk in all the same ways physical hard disks are used. These virtual disks are capable of hosting native file systems (NTFS, FAT, exFAT, and UDFS) while supporting standard disk and file operations. VHD API support allows management of the virtual disks. Virtual disks created with the VHD API can function as boot disks.
  VHD files are used in



1. Hyper-V
2. Windows 7 && Windows Server 2008
3. Virtual Server
4. Windows Virtual PC
  These products use the VHD API to contain the Windows operating system image utilized by a virtual machine as its system boot disk.
DSC0000.png
  summary



1. User Mode Native Windows APIs:
1) VirtDisk.dll: Common library for VHD management APIs.
2. User Mode Domain: specific Management Wrappers
1) VDS VHD APIs: VDS Object Model wrappers for the VHD Windows APIs.
3. Kernel Mode Drivers:
1) VDrvRoot.sys: Root virtual drive enumerator.
2) FsDepends.sys: Nested volume dependency management.
3) Vhdmp.sys: VHD parser and dependency property provider.
  Relevant Link:



http://msdn.microsoft.com/ZH-CN/library/windows/desktop/dd323654(v=vs.85).aspx
  
  4. Convert VHD File Into VMDK
  Virtual PC uses its own virtual disk image format called Virtual Hard Disk (.vhd file extension) that stores file system, operating system data, users files and folders like on physical disk. VHD format is also used by Microsoft backup applications and Windows Server operating systems.
  我们需要将这个VHD文件转换为Vmware兼容的格式,并加载到Vmware上
  0x1: Download、Instanll Winima



http://www.winimage.com/download.htm
Name: crsky
Code: 1353A9B
  0x2: Convert
  Select: Convert Virtual Hard Disk image..
DSC0001.png
  Select: Create Fixed Size Virtual Hard Disk
DSC0002.png
  Select, Safe as: VMware VMDK (*vmdk), select target location and type the new (.vmdk) file name



  转换完成
  0x3: Create A VM With Converted VMDK File
  我们已经完成了将CoreOS的VHD文件转换为VMDK文件,但是我们知道,这个VMDK是一个虚拟磁盘文件,并不是一个可以直接启动的虚拟机。在这个VMDK文件中,包括了Boot引导启动CoreOS的主程序
  接下来可以新建一个VM,并挂载VMDK镜像文件

  Relevant Link:



http://blog.vmpros.nl/2012/02/21/vmware-convert-vhd-to-vmdk-with-winimage/
http://www.file-extensions.org/article/run-virtual-pc-machines-in-vmware-workstation
http://www.sqlpanda.com/2012/04/run-windows-2008r2-vhd-under-vmware.html
  除此之外,也可以直接使用工具基于VHD创建一个新的VM



http://www.vmware.com/products/converter/?PID=6146957&PubCID=2470763
  
  5. Run Virtual PC virtual machine in VMware Workstation
  VMware也支持直接使用VHD文件启动
  0x1: 设置Intel VT-x
  如果你要挂载的VM镜像是64位的操作系统,我么需要将CPU的VT-x开关打开,在开机启动的BIOS中设置



http://www.jianhui.org/his-host-supports-intel-vt-x-but-intel-vt-x-is-disabled-issue.html
  0x2: 创建64位的Linux 2.6.x操作系统
  通过VMware Wizard创建一个不带操作系统ISO文件的VM,不采用ISO中的操作系统,而是采用我们挂载的虚拟硬盘中的操作系统进行引导

  0x3: 将VHD文件挂载到新建的VM上

  

  0x4: 运行

  VM创建好,并挂载了VHD之后,就可以直接启动VMware了
  
  
  6. CoreOS Docker Configuration And Running && Vmware + Vagrant + CoreOS + docker

  CoreOS为现代网络的服务器量身定做,Polvi团队对这个服务器操作系统做了最大的精简,所有附加的功能都被剔除了,并将操作系统和应用程序做了完全的分离。CoreOS核心思想是降低操作系统和应用程序的耦合度,使运行这些服务器的公司可以更快速、更廉价地更新自己的线上业务
  CoreOS 444.5.0 主要内容



1. Linux  
2. Docker  
3. 所有主流的云服务商的支持, 包括 Rackspace Cloud, Amazon EC2 (包括 HVM) 和 Google Compute Engine
4. 通过CoreOS Managed Linux的商业支持
  0x1: Install Vagrant
  Vagrant 本质上来说,是对 virtualbox,vmware,kvm 等镜像的管理操作,是一个中间层技术。使用它的前提是你本机必须有 virtualbox,vmware,kvm 等虚拟机



http://havee.me/other/2014-09/basic-vagrant-usage.html
  0x2: Running CoreOS on Vagrant



https://coreos.com/docs/running-coreos/platforms/vagrant/
  0x3: Running CoreOS on Vmware



https://coreos.com/docs/running-coreos/platforms/vmware/
  undone
  Relevant Link:



http://www.yanjingnan.cn/coreos-367.html
https://coreos.com/docs/running-coreos/platforms/vmware/

  
  7. Create A CoreOS System VM With ISO File




1. 使用liveCD将VHD/VMDK文件制作成CoreOS ISO文件
2. 使用ISO文件创建一个新的CoreOS VM


  初始化完成后
  
  Relevant Link:



http://stable.release.core-os.net/amd64-usr/current/coreos_production_xen_image.vhd.bz2
  
  Copyright (c) 2014 LittleHann All rights reserved
  

运维网声明 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.yunweiku.com/thread-55297-1-1.html 上篇帖子: vmware 上使用 EFI 下篇帖子: VMware安装Vista虚拟机
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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