<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>WING LOON &#187; Windows</title>
	<atom:link href="http://wingloon.com/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://wingloon.com</link>
	<description>decoding my knowledge through blogging</description>
	<lastBuildDate>Sun, 22 Jan 2012 05:00:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How To Shrink a VMDK File in ESX 4 and Windows</title>
		<link>http://wingloon.com/2011/06/09/how-to-shrink-a-vmdk-file-in-esx-4-and-windows/</link>
		<comments>http://wingloon.com/2011/06/09/how-to-shrink-a-vmdk-file-in-esx-4-and-windows/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 10:21:56 +0000</pubDate>
		<dc:creator>wingloon</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://wingloon.com/?p=1194</guid>
		<description><![CDATA[Today, I would like to share a howto reduce or shrink a VMware VMDK file (aka hard disk) for a Windows VM . Bare in mind that this is not reducing or shrinking a volume in Windows and leaving a free partition space. For this howto, I will be reducing or shrinking the Hard Disk [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I would like to share a howto reduce or shrink a VMware VMDK file (aka hard disk) for a Windows VM . Bare in mind that this is not reducing or shrinking a volume in Windows and leaving a free partition space. For this howto, I will be reducing or shrinking the Hard Disk 2 for a Windows VM from <strong>30GB to 5GB</strong> whereby the example VMDK file name will be <strong>sourcedisk_1.vmdk</strong> which is D:\ drive. Logon to your Windows VM and shrink the target disk 30GB to 5GB. In the Disk Management, right click on the partition that you want to shrink and select &#8220;Shrink Volume&#8221; from the menu.</p>
<p><span id="more-1194"></span></p>
<p>In the Shrink dialog, you will need to enter the amount you want to shrink by and not the new size. For example, if you want to shrink to 5GB partition you need to enter <strong>25600</strong> into the box and you will have <strong>5117</strong> total size after shrink in MB which is <strong>5GB</strong>. Click Shrink button to proceed and you will now have 5GB NTFS partition and the rest is RAW partition. You can proceed to shutdown this VM.</p>
<p>Logon to your ESX host and nagivate to the sourcedisk_1.vmdk file. Edit the VMDK file and look for &#8220;Extent description&#8221; section as below: -</p>
<p><code><br />
# Extent description<br />
RW 62914560 VMFS "sourcedisk_1-flat.vmdk"<br />
</code></p>
<p>The value between &#8216;RW&#8217; and &#8216;VMFS&#8217; is the size of disk. You can use the formula below to determine the value whereby DiskSize is in GB.</p>
<p><code>(DiskSize * 1024 * 1024 * 1024)/512 = 62914560</code></p>
<p>So, we will then change the value to 10485760 to represent 5GB and it should look like below: -</p>
<p><code><br />
# Extent description<br />
RW 10485760 VMFS "sourcedisk_1-flat.vmdk"<br />
</code></p>
<p>Next, run the vmkfstool to clone to a new disk and called it <strong>targetdisk_2.vmdk</strong> as below: -</p>
<p><code>vmkfstool -i sourcedisk_1.vmdk targetdisk_2.vmdk</code></p>
<p>Once the clone is completed, you will discover that the cloned disk now has a new size of 5GB as below: -</p>
<p><code><br />
-rw------- 1 root root  5368709120 Jun  9 18:08 targetdisk_2-flat.vmdk<br />
-rw------- 1 root root         423 Jun  9 18:08 targetdisk_2.vmdk<br />
</code></p>
<p>Now, this is an important part. Edit the targetdisk_2.vmdk file and comment the following line as below: -</p>
<p><code><br />
#ddb.geometry.sectors = "63"<br />
#ddb.geometry.heads = "255"<br />
#ddb.geometry.cylinders = "7832"<br />
</code></p>
<p>Next, remove the sourcedisk_1.vmdk from the VM in Edit Settings and do not delete disk. You can delete it later in the datastore browser. Then, add the new targetdisk_2.vmdk in Edit Settings of the VM.</p>
<p>Finally, power up the VM but you will not be able to see the 5GB hard disk. You&#8217;ll need to switch the disk to &#8220;Online&#8221; status in Disk Management.</p>
<p>I know this is a long process but it does help me. You may reboot the VM one time to make sure you are able to see the 5GB hard disk. If everything is fine, you can proceed to delete of the sourcedisk_1.vmdk file in the datastore browser. Hope this is useful to all VMware Administrator and please do correct me if this is wrong or I had missed out something. Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://wingloon.com/2011/06/09/how-to-shrink-a-vmdk-file-in-esx-4-and-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Retrieve ESX Host Network Info Using vSphere PowerCLI</title>
		<link>http://wingloon.com/2011/04/26/how-to-retrieve-esx-host-network-info-using-vsphere-powercli/</link>
		<comments>http://wingloon.com/2011/04/26/how-to-retrieve-esx-host-network-info-using-vsphere-powercli/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 03:49:57 +0000</pubDate>
		<dc:creator>wingloon</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://wingloon.com/?p=1183</guid>
		<description><![CDATA[Today, I would like to share how to retrieve ESX host network info using vSphere PowerCLI. Make sure you are connected to a vCenter. Below is the one liner command you can retrieve the ESX host network info and export to a CSV file: - Get-VMHost &#124; Where { $_.ConnectionState -eq "Connected"} &#124; Get-VMHostNetwork &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I would like to share how to retrieve ESX host network info using vSphere PowerCLI. Make sure you are connected to a vCenter. Below is the one liner command you can retrieve the ESX host network info and export to a CSV file: -</p>
<p><code>Get-VMHost | Where { $_.ConnectionState -eq "Connected"} | Get-VMHostNetwork | Select Hostname, DomainName, ConsoleGateway, DNSAddress -ExpandProperty ConsoleNic | Select Hostname, DomainName, PortGroupName, IP, SubnetMask, ConsoleGateway, Devicename | Export-Csv -NoTypeInformation C:\Temp\ESXHost.csv</code></p>
]]></content:encoded>
			<wfw:commentRss>http://wingloon.com/2011/04/26/how-to-retrieve-esx-host-network-info-using-vsphere-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Change Virtual Machine Network Adapter Type Using vSphere PowerCLI</title>
		<link>http://wingloon.com/2011/04/22/how-to-change-virtual-machine-network-adapter-type-using-vsphere-powercli/</link>
		<comments>http://wingloon.com/2011/04/22/how-to-change-virtual-machine-network-adapter-type-using-vsphere-powercli/#comments</comments>
		<pubDate>Fri, 22 Apr 2011 07:26:09 +0000</pubDate>
		<dc:creator>wingloon</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://wingloon.com/?p=1178</guid>
		<description><![CDATA[Today, I would like to share how to change VMware virtual machine (VM) network adapter type using vSphere PowerCLI. Make sure the VM is shutdown. Below is the one liner command you can change the network adapter type: - get-vm virtual_machine_name &#124; get-networkadapter &#124; set-networkadapter -type "vmxnet3" To know what network adapter available, you can [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I would like to share how to change VMware virtual machine (VM) network adapter type using vSphere PowerCLI. Make sure the VM is shutdown. Below is the one liner command you can change the network adapter type: -</p>
<p><code>get-vm virtual_machine_name | get-networkadapter | set-networkadapter -type "vmxnet3"</code></p>
<p>To know what network adapter available, you can visit <a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&#038;cmd=displayKC&#038;externalId=1001805" target="_blank">VMware KB1001805</a>.  You need to power up the VM after the successful change of network adapter type. Thank you and enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://wingloon.com/2011/04/22/how-to-change-virtual-machine-network-adapter-type-using-vsphere-powercli/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Mount a VMDK File Using vmware-mount</title>
		<link>http://wingloon.com/2010/12/03/remote-mount-a-vmdk-file-using-vmware-mount/</link>
		<comments>http://wingloon.com/2010/12/03/remote-mount-a-vmdk-file-using-vmware-mount/#comments</comments>
		<pubDate>Thu, 02 Dec 2010 18:14:40 +0000</pubDate>
		<dc:creator>wingloon</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://wingloon.com/?p=1161</guid>
		<description><![CDATA[After years of using VMware products, be it VMware Server, VMware Workstation, VMware Infrastructure and VMware vSphere, I haven&#8217;t encounter failure on booting a Windows OS. But, one fine day this week itself, one of the Windows Server 2003 virtual machine (VM) can&#8217;t boot up because of missing boot.ini file. Without any delay, I download [...]]]></description>
			<content:encoded><![CDATA[<p>After years of using VMware products, be it VMware Server, VMware Workstation, VMware Infrastructure and VMware vSphere, I haven&#8217;t encounter failure on booting a Windows OS. But, one fine day this week itself, one of the Windows Server 2003 virtual machine (VM) can&#8217;t boot up because of missing boot.ini file.</p>
<p>Without any delay, I download the Virtual Disk Development Kit 1.2.1 from http://www.vmware.com/support/developer/vddk/ and I copy out the virtual disk from the shared storage which is virtual_machine_name-flat.vmdk (file name is an example only) with the filesize of 20GB. I tried mounting the VMDK file locally but failed. After several tries, I decided to copy the rest of the files in the VM folder from the share storage. Woot woot, I am able to mount the VMDK file using the command below: -</p>
<p><code># vmware-mount X: "C:\VM\virtual_machine_name.vmdk"</code></p>
<p>Now, the VMDK file is mounted as X: drive letter locally so I begin to copy a good copy of boot.ini file. Copying those files to the shared storage is a pain because I have to wait 30 mins. Once the copying is completed, I begin to power on the VM but it failed to boot up telling me that NTDETECT.com is missing. What the heck, I have to copy thoses file again from shared <img src='http://wingloon.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>After, copying a good copy of NTDETECT.com and a successfully boot up of the VM then I was relief. Its time for me to hack the remote mount a VMDK file. Indeed, I successfully mount the VMDK remotely. Yatta. Please use the command below: -</p>
<p><code># vmware-mount X: "[Shared_Storage] virtual_machine_name/virtual_machine_name.vmdk" /i:"DataCenter/vm/Servers/virtual_machine_name" /h:VCenterName /u:"domain\user_name" /s:your_password</code></p>
<p>With the command above, the VMDK is mounted as X: drive letter. Please take note as below: -</p>
<p><em>[Shared_Storage] virtual_machine_name/virtual_machine_name.vmdk = you can get this path in vSphere Client, Edit Settings on the VM and select the virtual disk<br />
/i:&#8221;DataCenter/<strong>vm</strong>/Servers/virtual_machine_name&#8221; = you can get this in the tree view of vShphere Client, the &#8220;vm&#8221; in this path is complusory</em></p>
<p>To list/view mounted volume(s), run the command below: -</p>
<p><code># vmware-mount /L</code></p>
<p>To umount a mounted volume, run the command below: -</p>
<p><code># vmware-mount X: /d</code></p>
<p>I hope the commands above will help you in your daily VMware job. Please feel free to give comments and suggestions to the commands I shared. Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://wingloon.com/2010/12/03/remote-mount-a-vmdk-file-using-vmware-mount/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How To Create Boot Disk Image File from USB Drive</title>
		<link>http://wingloon.com/2010/09/20/how-to-create-boot-disk-image-file-from-usb-drive/</link>
		<comments>http://wingloon.com/2010/09/20/how-to-create-boot-disk-image-file-from-usb-drive/#comments</comments>
		<pubDate>Mon, 20 Sep 2010 06:12:44 +0000</pubDate>
		<dc:creator>wingloon</dc:creator>
				<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://wingloon.com/?p=1144</guid>
		<description><![CDATA[Found this great software for writing boot disk image file from USB drive, Roadkil&#8217;s Disk Image. Let me start with a simple steps below: - 1. Run the software (I downloaded the standalone version). 2. Click &#8220;Store Image&#8221; tab and select the correct drive to read the image from. 3. Click &#8220;Browse&#8221; button and locate [...]]]></description>
			<content:encoded><![CDATA[<p>Found this great software for writing boot disk image file from USB drive, <a href="http://roadkil.net/program.php/P12/Disk%20Image" target="_blank">Roadkil&#8217;s Disk Image</a>.  Let me start with a simple steps below: -</p>
<p>1. Run the software (I downloaded the standalone version).</p>
<p>2. Click &#8220;Store Image&#8221; tab and select the correct drive to read the image from.</p>
<p>3. Click &#8220;Browse&#8221; button and locate the place you want to store the disk image target file.</p>
<p>4. Once done, click the &#8220;Start&#8221; button to proceed.</p>
<p>Is that simple? Thank you for reading.</p>
<p><em>If you found these helpful, please contribute to help:</em> <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-but04.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYBJ9GuvXrDm+uUNTevYiTUqngFWgJZflJgsVSzahanqrATcHF40BAXq8UgHz7mU9SkfQrXTRyfLbDof1irlxUe+aQTLlTXn7BLtJRJBkc0phx9xmmYNCKVrpFEhkFaHyM+M90y7AApgMK1GiJg8WmbUHtJTatM+Fgy6fWK5Tg/49DELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQIoirLyP428ruAgaAtUd2ShDOR5sHf0yIOKv+KsAqHTWKGklWGg1+vSKMX1QrPBd3ht5U3u3coHqOjFOdZInLFDHYNDZU0WLXwgmxmbto66aAM91lbZEq1VxYJaB6ar5rVBoEP4HoJyA3b6bQOFWkJxP/8MI8GXjiFUqxXTvlKa5BBBVza2YiZovzztBanFK3rhuNGWavjSceQnyp39maKzJUPwwOiYIb7YUcWoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1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EYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMDcxMTAxMTI0MjUwWjAjBgkqhkiG9w0BCQQxFgQUiobJbULWwiXdt2VPzw9U6ntVPhwwDQYJKoZIhvcNAQEBBQAEgYBDMnBJG8cAcxEDQ/1OYl7NxWRULl0qTlTNs9lDp24ueF0o0Mmi6d54Ua+Lahe+vs0ceqFUACmTiN3IZGlSHEFBjbkiplzy+6QZVKh5XO6bGgyU/Idzbrzuut3Cyu+jKA1XoHegoW6r/bxicgxretew3QB5NNJEgThc0sfCbhAv2Q==-----END PKCS7-----
">
</form></p>
]]></content:encoded>
			<wfw:commentRss>http://wingloon.com/2010/09/20/how-to-create-boot-disk-image-file-from-usb-drive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

