{"id":2158,"date":"2015-12-03T22:38:36","date_gmt":"2015-12-03T15:38:36","guid":{"rendered":"http:\/\/rachmadona.net\/?p=2158"},"modified":"2015-12-03T22:38:36","modified_gmt":"2015-12-03T15:38:36","slug":"another-script-to-throttle-vm","status":"publish","type":"post","link":"https:\/\/rachmadona.net\/?p=2158","title":{"rendered":"Another Script to Throttle VM"},"content":{"rendered":"<p>When we are in section to simulate feature Distribute Resource Scheduler (DRS) in our vSphere lab, traditional way to force Virtual Machine (VM) doing full load of it&#8217;s vCPU is open application as many you can. Especially an application to encode video or even game. I think it&#8217;s quiet difficult to do and also really take time if we have to set in every VM that we have.<\/p>\n<p>But wait, there is another way which is more easy to do, yeah all just we need is only a script!<\/p>\n<p>This script contain command that makes a VM totally throttled and used of all performance within it. Here is the ingredient:<!--more--><\/p>\n<blockquote><p>Dim goal<\/p>\n<p>Dim before<\/p>\n<p>Dim x<\/p>\n<p>Dim y<\/p>\n<p>Dim i<\/p>\n<p>goal = 2181818<\/p>\n<p>Do While True<\/p>\n<p>before = Timer<\/p>\n<p>For i = 0 to goal<\/p>\n<p>x = 0.000001<\/p>\n<p>y = sin(x)<\/p>\n<p>y = y + 0.00001<\/p>\n<p>Next<\/p>\n<p>y = y + 0.01<\/p>\n<p>Loop<\/p>\n<p>\/code<\/p><\/blockquote>\n<p>Write command above into notepad and save as VBS file (I give it name vCPUbusy.vbs). Copy that file to your VM (Windows based only) and run it. Immediately you&#8217;ll see on task manager load processor increasing as significant.<\/p>\n<p>Normal\/idle VM.<\/p>\n<p><a href=\"http:\/\/adf.ly\/1TsUA0\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2159 size-medium\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2015\/12\/vCPUBusy-300x291.jpg\" alt=\"vCPUBusy\" width=\"300\" height=\"291\" \/><\/a><\/p>\n<p>After run vCPUbusy.vbs suddenly load cpu increasing to 100%<\/p>\n<p><a href=\"http:\/\/adf.ly\/1TsUEY\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2160 size-medium\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2015\/12\/vCPUBusy2-300x285.jpg\" alt=\"vCPUBusy2\" width=\"300\" height=\"285\" \/><\/a><\/p>\n<p>I suggest don&#8217;t run it for long use because it&#8217;s really depleted your cpu resource and also implicitly increase your cpu temperature. So, if DRS has working, let&#8217;s terminated the script. To terminate, just move to processes tab and find &#8216;wscript.exe&#8217;.<\/p>\n<p><a href=\"http:\/\/adf.ly\/1TsUJc\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2161 size-medium\" src=\"https:\/\/rachmadona.net\/wp-content\/uploads\/2015\/12\/vCPUBusy3-300x278.jpg\" alt=\"vCPUBusy3\" width=\"300\" height=\"278\" \/><\/a><\/p>\n<p>Click End Process and you back into normal condition. Ciao..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When we are in section to simulate feature Distribute Resource Scheduler (DRS) in our vSphere lab, traditional way to force Virtual Machine (VM) doing full load of it&#8217;s vCPU is open application as many you can. Especially an application to encode video or even game. I think it&#8217;s quiet difficult to do and also really&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,24,25],"tags":[150,457,474],"class_list":["post-2158","post","type-post","status-publish","format-standard","hentry","category-tips-trick","category-virtualization","category-vmware","tag-drs","tag-vcpu","tag-vmware"],"_links":{"self":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2158"}],"version-history":[{"count":0,"href":"https:\/\/rachmadona.net\/index.php?rest_route=\/wp\/v2\/posts\/2158\/revisions"}],"wp:attachment":[{"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rachmadona.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}