{"id":253,"date":"2013-12-09T06:45:12","date_gmt":"2013-12-09T06:45:12","guid":{"rendered":"http:\/\/www.waters.to\/blog\/?p=253"},"modified":"2015-11-23T16:05:12","modified_gmt":"2015-11-23T16:05:12","slug":"resize-an-ide-drive-in-vmware-vsphere-using-linux","status":"publish","type":"post","link":"http:\/\/www.waters.to\/blog\/resize-an-ide-drive-in-vmware-vsphere-using-linux\/","title":{"rendered":"Resize an IDE drive in VMWare VSphere using Linux"},"content":{"rendered":"<p>I needed to increase the size of a hard drive in a Windows XP VM on VMWare VSphere ESXi 5, but discovered that VSphere does not support resizing IDE drives.<\/p>\n<p>While it is possible to convert the drive to SCSI and then resize, that creates may render the drive un-bootable due to SCSI device drivers on XP.<\/p>\n<p>I discovered an easier way, assuming you have a Linux VM available:<\/p>\n<ol>\n<li>\nPrepare XP for resizing\n<\/li>\n<p>a) run chkdsk \/f and restart. This cleans up any minor disk corruption that may interfere with later steps.<br \/>\nb) Stop your VM, then edit your XP VM settings. Add a new, larger drive to your VM. Choose &#8220;IDE&#8221; in advanced options. (If the VM is not stopped, you won&#8217;t see IDE as a choice)<\/p>\n<li>Temporarily give the drives to the Linux VM<\/li>\n<p>a) With XP stopped, edit the Linux VM to add two new drives, using the EXISTING XP drive images.<br \/>\nb) As root on the linux box, run dmesg. You should see the new drives like this:<\/p>\n<p><code><br \/>\n[1087836.865331] vmw_pvscsi: msg: device added at scsi0:1:0<br \/>\n[1087836.867284] scsi 2:0:1:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: 2<br \/>\n[1087836.870663] sd 2:0:1:0: Attached scsi generic sg2 type 0<br \/>\n<strong><em>[1087836.870904] sd 2:0:1:0: [sdb] 33554432 512-byte logical blocks: (17.1 GB\/16.0 GiB)<\/em><\/strong><br \/>\n[1087885.031428] vmw_pvscsi: msg type: 0x0 - MSG RING: 6\/5 (5)<br \/>\n[1087885.031435] vmw_pvscsi: msg: device added at scsi0:2:0<br \/>\n[1087885.031612] scsi 2:0:2:0: Direct-Access VMware Virtual disk 1.0 PQ: 0 ANSI: 2<br \/>\n<strong><em>[1087885.031829] sd 2:0:2:0: [sdc] 16777216 512-byte logical blocks: (8.58 GB\/8.00 GiB)<\/em><\/strong><br \/>\n<\/code><\/p>\n<p>You can see here that sdb is the new 16 gig drive, and sdc is the 8 gig drive.<\/p>\n<li>Use linux to migrate data and repartition<\/li>\n<p>a) as root on the linux box, run:<br \/>\ndd if=\/dev\/sdX of=\/dev\/sdY &amp;<br \/>\nwhere X is the drive letter of your old drive, and Y is the drive letter of your new drive.<br \/>\n<strong>BE CAREFUL NOT TO CONFUSE DRIVE LETTERS<\/strong> or you <strong>WILL<\/strong> destroy your data.<\/p>\n<p>b) You can check your progress periodically via:<br \/>\n# pkill -USR1 dd<br \/>\n465913+0 records in<br \/>\n465913+0 records out<br \/>\n238547456 bytes (239 MB) copied, 6.09248 s, 39.2 MB\/s<\/p>\n<p>c) run gparted \/dev\/sdY to repartition your drive. Right-click resize, then click apply. (This step may fail if you skipped step 1a&#8230;)<\/p>\n<li>Finalize VM configuration<\/li>\n<p>a) Edit your Linux VM one last time, removing both XP drives<br \/>\nb) Edit your XP VM and remove the old drive. Make sure the new drive is listed in IDE slot 0:0<\/p>\n<li>Restart windows<\/li>\n<p>a) Power up your XP VM. Say yes when Windows prompts you to reboot due to system updates.<br \/>\nb) That&#8217;s it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to increase the size of a hard drive in a Windows XP VM on VMWare VSphere ESXi 5, but discovered that VSphere does not support resizing IDE drives. While it is possible to convert the drive to SCSI &hellip; <a href=\"http:\/\/www.waters.to\/blog\/resize-an-ide-drive-in-vmware-vsphere-using-linux\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[22],"class_list":["post-253","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-vmware"],"aioseo_notices":[],"_links":{"self":[{"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/posts\/253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/comments?post=253"}],"version-history":[{"count":9,"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/posts\/253\/revisions"}],"predecessor-version":[{"id":326,"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/posts\/253\/revisions\/326"}],"wp:attachment":[{"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/media?parent=253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/categories?post=253"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.waters.to\/blog\/wp-json\/wp\/v2\/tags?post=253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}