如何 sizing 一台物理机上可以承载多少 VMware 虚拟机? &分享 Vsphere HA 几个实用知识点

如何 sizing 一台物理机上可以承载多少 VMware 虚拟机?

https://mp.weixin.qq.com/s?__biz=MjM5NTk0MTM1Mw==&mid=2650633788&idx=3&sn=374db2238c4df568a67404ea9d8046d5&chksm=bef908ba898e81ac16510955217f0aa10266722a3268e13a75a7eed68c28d7cad25f16663298&scene=21#wechat_redirect

twt企业IT社区 2018-05-18

来自社区“VMware vSphere性能优化设计在线答疑”活动,提问者:sharkbing,由社区专家解答

 

如何去sizing 一台物理机上可以承载多少vmware 虚拟机?

 

@chinesezzqiang 某央企

好问题。

确定了虚拟机的配置后,就可以通过简单计算得出主机的配置。以下只是example:

比如虚拟机的内存为8G,CPU是4核。那么公司预计是100个虚拟机的总量(1年内),那么建议每个主机25个虚拟机,25*8=200G内存,CPU一般不是虚拟机的性能瓶颈。预留一些内存给系统,所以可以采用256G内存、2颗intel12core的主机即可。(不考虑IO方面的需求)

 

@chengzuqiao 江西省农村信用社

这个要根据你们应用使用资源情况分配,没有一定的标准,反正资源可动态调配

 

@Jerry Lee BRS CE

首先,考虑ESX主机的性能效率,一般维持在主机性能压力70%左右。最高不建议超过85%。

其次,若是考虑ESX主机和虚拟机数量平衡,一般会在正式部署前进行性能压力测试,制作多种生产规格的虚拟机模板,并在虚拟机上安装CPU/内存/磁盘IO等压力测试工具,逐批增加各规模虚拟机数量,直至ESX主机达到性能70%、85%。

最后,若对生产的ESX主机有高可用或者容灾要求,部署虚拟机前需要评估虚拟机实际的生产压力,然后平均的在压力空闲的ESX上部署。

 

@a520520168 索菲亚

host的内存有多少,虚机的总和肯定不能超过这个数,这是肯定的了。。。。然后还要预留给系统什么的。一般就OK了。。。。CPU要算那个核数和线程数。超了会争抢。网卡和disk io的话就要观察了。

 

分享 Vsphere HA 几个实用知识点

https://mp.weixin.qq.com/s?__biz=MjM5NTk0MTM1Mw==&mid=2650630395&idx=2&sn=bfde11b0b02fcd35489c504a25b6afb2&chksm=bef9167d898e9f6b6f8cb80a4d024856e87b8078147a152ce69fe0fc4d653a63d2c6afacd473&scene=21#wechat_redirect

penguin23 twt企业IT社区 2017-10-09

1、Vsphere HA的主机准入控制策略

图片

它分为允许故障主机数、资源预留百分比、指定故障转移主机、不预留故资源。

因为在Vsphere HA中每个HOST随时都有可能承担重启HOST切换过来。一般的都将要考虑不同的VM Failover的下一HOST配置。

A.指定故障主机数:给重要的VM预留出本主机的资源。

B.资源预留百分比:按百分比预留整个Cluster资源。如,cluster中主机所有主机内存为220G,预留10%即22G。

C.指定故障转移主机,因为需要一台host一直处于stand by状态。

D.不预留资源。

2、通过设置VM的权重,让重要VM可获取预留的资源。

注意点是当Cluster中有2台host宕机时,他会先启动第1台host上的VM,等启动完成后才会启动第2台host上的VM,尽管第2台host上的VM权重可能比第1台host上的要高。

Find OUT:哪个是Cluster中的第1Host。

3、关于Vsphere主机的标准交换机、分布式交换机的个人总结;

A、标准交换机可配置创建与分布式交换机相同的对应Vlan网络。

B、将Vmkernel单独配置标准交换机种,可避免再删除分布式交换机时候遇到麻烦。

4、Reset Esxi主机,重置root密码,重置Esxi Host网络的配置。

首先,我们可以使用 HTML 和 CSS 来创建一个简单的 9 宫格图片预览。代码如下: ```html <!DOCTYPE html> <html> <head> <title>9宫格图片上传</title> <style> .container { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; } .image { width: 30%; margin: 10px; border: 1px solid #ccc; text-align: center; padding: 5px; box-sizing: border-box; } .image img { max-width: 100%; max-height: 100%; } .file-input { display: none; } .file-label { background-color: #3498db; color: #fff; padding: 10px 20px; border-radius: 5px; text-align: center; cursor: pointer; transition: all 0.3s ease; } .file-label:hover { background-color: #2980b9; } </style> </head> <body> <div class="container"> <div class="image"> <label for="file-input-1"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-1"> </div> <div class="image"> <label for="file-input-2"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-2"> </div> <div class="image"> <label for="file-input-3"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-3"> </div> <div class="image"> <label for="file-input-4"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-4"> </div> <div class="image"> <label for="file-input-5"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-5"> </div> <div class="image"> <label for="file-input-6"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-6"> </div> <div class="image"> <label for="file-input-7"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-7"> </div> <div class="image"> <label for="file-input-8"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-8"> </div> <div class="image"> <label for="file-input-9"> <img src="https://via.placeholder.com/150x150" alt="Placeholder"> </label> <input type="file" class="file-input" id="file-input-9"> </div> </div> <script> const fileInputs = document.querySelectorAll('.file-input'); fileInputs.forEach(fileInput => { fileInput.addEventListener('change', event => { const file = event.target.files[0]; const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = event => { const image = event.target.result; const imageElement = fileInput.previousElementSibling; imageElement.src = image; }; }); }); </script> </body> </html> ``` 以上代码中,我们使用了 Flexbox 布局来创建 9 个等宽的图片容器。每个容器包含一个 label 元素和一个 input[type="file"] 元素。label 元素中包含一个 img 元素,用于显示预览图片。input[type="file"] 元素被隐藏,但是当用户点击对应的 label 元素时,就会触发 input[type="file"] 元素的点击事件,从而打开文件上传对话框。 接下来,我们需要使用 JavaScript 来实现将上传的图片保存到服务器上。由于这需要使用服务器端编程语言(如 PHP、Python 等),所以这里我们只提供一个简单的示例代码,演示如何将图片数据通过 AJAX 发送给服务器。这个示例代码假设服务器端的上传接口是 `/upload`,上传的图片数据被保存在名为 `image` 的 POST 参数中。 ```javascript const fileInputs = document.querySelectorAll('.file-input'); fileInputs.forEach(fileInput => { fileInput.addEventListener('change', event => { const file = event.target.files[0]; const reader = new FileReader(); reader.readAsDataURL(file); reader.onload = event => { const image = event.target.result; const xhr = new XMLHttpRequest(); xhr.open('POST', '/upload'); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onreadystatechange = () => { if (xhr.readyState === 4 && xhr.status === 200) { console.log('Image uploaded successfully'); } }; xhr.send(`image=${encodeURIComponent(image)}`); }; }); }); ``` 以上代码中,我们为每个 input[type="file"] 元素添加了一个 change 事件监听器。当用户选择文件后,会触发该监听器,从而创建一个 FileReader 对象来读取文件数据。读取完后,我们使用 XMLHttpRequest 对象将图片数据发送给服务器。服务器可以根据需要将图片数据保存到磁盘上。需要注意的是,这个示例代码中的上传接口是不安全的,因为它可以接受任何数据,包括恶意代码。实际应用中,我们需要在服务器端对上传的数据进行检查和过滤,以确保安全性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值