<?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>danejeffrey.com &#187; vmdk</title>
	<atom:link href="http://danejeffrey.com/blog/tag/vmdk/feed/" rel="self" type="application/rss+xml" />
	<link>http://danejeffrey.com/blog</link>
	<description>Good ways to break things.</description>
	<lastBuildDate>Wed, 05 Oct 2011 00:13:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>VMware ESX: Renaming a Virtual Disk</title>
		<link>http://danejeffrey.com/blog/2009/09/20/vmware-esx-renaming-a-virtual-disk/</link>
		<comments>http://danejeffrey.com/blog/2009/09/20/vmware-esx-renaming-a-virtual-disk/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 08:06:26 +0000</pubDate>
		<dc:creator>danejeff</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[esx]]></category>
		<category><![CDATA[vmdk]]></category>

		<guid isPermaLink="false">http://danejeffrey.com/blog/?p=167</guid>
		<description><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://danejeffrey.com/blog/2009/09/20/vmware-esx-renaming-a-virtual-disk/' addthis:title='VMware ESX: Renaming a Virtual Disk '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>A VMware virtual disk is made up of two files, the disk descriptor (&#60;name&#62;.vmdk) and the disk content itself (&#60;name&#62;-flat.vmdk). Using Virtual Center, you can move virtual disk files around (i.e. folder to folder), but it will not let you rename them. To do this you have two options: mv or vmkfstools. Using mv: SSH [...]<div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://danejeffrey.com/blog/2009/09/20/vmware-esx-renaming-a-virtual-disk/' addthis:title='VMware ESX: Renaming a Virtual Disk ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></description>
			<content:encoded><![CDATA[<div class="addthis_toolbox addthis_default_style " addthis:url='http://danejeffrey.com/blog/2009/09/20/vmware-esx-renaming-a-virtual-disk/' addthis:title='VMware ESX: Renaming a Virtual Disk '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><p>A VMware virtual disk is made up of two files, the disk descriptor (&lt;name&gt;.vmdk) and the disk content itself (&lt;name&gt;-flat.vmdk). Using Virtual Center, you can move virtual disk files around (i.e. folder to folder), but it will not let you rename them. To do this you have two options: mv or vmkfstools.</p>
<p><strong>Using mv:</strong><br />
SSH to the ESX host, cd to the location of the virtual disk. Oh, if the disk was attached to a VM, that VM needs to be powered off. Type:<br />
<code>mv oldname.vdk newname.vmdk<br />
mv oldname-flat.vmdk newname-flat.vmdk</code><br />
Next, need to edit the descriptor file so it can locate the disk (you can use vi, pico, nano):<br />
<code>vi | pico | nano newname.vmdk</code> &#8211; Locate the old name in the file and edit to match the new name. Write out the file.</p>
<p><strong>Using vmkfstools:</strong><br />
vmkfstools can rename the files and update the descriptor all at once (command is all on one line):<br />
<code>vmkfstools -E /vmfs/volumes/path/to/oldname.vmdk<br />
/vmfs/volumes/path/to/newname.vmdk</code></p>
<p>Finally, if the disk was attached to a VM, back in Virtual Center (or by editing the .vmx for the VM) edit settings for the VM and point it to the newly renamed virtual disk. You can then power on the VM.</p>
<img src="http://danejeffrey.com/blog/?ak_action=api_record_view&id=167&type=feed" alt="" /><div class="addthis_toolbox addthis_default_style addthis_32x32_style" addthis:url='http://danejeffrey.com/blog/2009/09/20/vmware-esx-renaming-a-virtual-disk/' addthis:title='VMware ESX: Renaming a Virtual Disk ' ><a class="addthis_button_preferred_1"></a><a class="addthis_button_preferred_2"></a><a class="addthis_button_preferred_3"></a><a class="addthis_button_preferred_4"></a><a class="addthis_button_compact"></a></div>]]></content:encoded>
			<wfw:commentRss>http://danejeffrey.com/blog/2009/09/20/vmware-esx-renaming-a-virtual-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

