How to shrink VMWare disk size?
up vote
0
down vote
favorite
I installed Windows 10 on VMWare and I set its capacity as 60 gigabytes. Now I only want it to have 30 gigabytes and reclaim those 30 gigabytes for my mac. How do I change that?
windows-10 virtualbox virtual-machine vmware-fusion
|
show 3 more comments
up vote
0
down vote
favorite
I installed Windows 10 on VMWare and I set its capacity as 60 gigabytes. Now I only want it to have 30 gigabytes and reclaim those 30 gigabytes for my mac. How do I change that?
windows-10 virtualbox virtual-machine vmware-fusion
First shrink the Windows aprtiton then the virtual hard disk file. What's the file extension of that virtual hard disk?
– Biswapriyo
Jun 16 at 11:59
by default any virtualization software will use a dynamically grown HDD image. Check your vmdk, most certainly it won't be 60GB unless your data inside are almost 60GB or you accidentally set it as fixed size[
– phuclv
Jun 16 at 13:56
@phuclv Yes it's dynamically allocates, but it's .vmdk
– user28603
Jun 16 at 14:15
@Biswapriyo it's .vmdk
– user28603
Jun 16 at 14:16
what do you mean? I asked you to check your vmdk file size. If it's really dynamically sized and already 60GB then there's no way you can reduce it unless you remove files in the VM and run compact
– phuclv
Jun 16 at 14:21
|
show 3 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I installed Windows 10 on VMWare and I set its capacity as 60 gigabytes. Now I only want it to have 30 gigabytes and reclaim those 30 gigabytes for my mac. How do I change that?
windows-10 virtualbox virtual-machine vmware-fusion
I installed Windows 10 on VMWare and I set its capacity as 60 gigabytes. Now I only want it to have 30 gigabytes and reclaim those 30 gigabytes for my mac. How do I change that?
windows-10 virtualbox virtual-machine vmware-fusion
windows-10 virtualbox virtual-machine vmware-fusion
edited Dec 3 at 19:37
Hennes
58.8k792141
58.8k792141
asked Jun 16 at 9:38
user28603
162
162
First shrink the Windows aprtiton then the virtual hard disk file. What's the file extension of that virtual hard disk?
– Biswapriyo
Jun 16 at 11:59
by default any virtualization software will use a dynamically grown HDD image. Check your vmdk, most certainly it won't be 60GB unless your data inside are almost 60GB or you accidentally set it as fixed size[
– phuclv
Jun 16 at 13:56
@phuclv Yes it's dynamically allocates, but it's .vmdk
– user28603
Jun 16 at 14:15
@Biswapriyo it's .vmdk
– user28603
Jun 16 at 14:16
what do you mean? I asked you to check your vmdk file size. If it's really dynamically sized and already 60GB then there's no way you can reduce it unless you remove files in the VM and run compact
– phuclv
Jun 16 at 14:21
|
show 3 more comments
First shrink the Windows aprtiton then the virtual hard disk file. What's the file extension of that virtual hard disk?
– Biswapriyo
Jun 16 at 11:59
by default any virtualization software will use a dynamically grown HDD image. Check your vmdk, most certainly it won't be 60GB unless your data inside are almost 60GB or you accidentally set it as fixed size[
– phuclv
Jun 16 at 13:56
@phuclv Yes it's dynamically allocates, but it's .vmdk
– user28603
Jun 16 at 14:15
@Biswapriyo it's .vmdk
– user28603
Jun 16 at 14:16
what do you mean? I asked you to check your vmdk file size. If it's really dynamically sized and already 60GB then there's no way you can reduce it unless you remove files in the VM and run compact
– phuclv
Jun 16 at 14:21
First shrink the Windows aprtiton then the virtual hard disk file. What's the file extension of that virtual hard disk?
– Biswapriyo
Jun 16 at 11:59
First shrink the Windows aprtiton then the virtual hard disk file. What's the file extension of that virtual hard disk?
– Biswapriyo
Jun 16 at 11:59
by default any virtualization software will use a dynamically grown HDD image. Check your vmdk, most certainly it won't be 60GB unless your data inside are almost 60GB or you accidentally set it as fixed size[
– phuclv
Jun 16 at 13:56
by default any virtualization software will use a dynamically grown HDD image. Check your vmdk, most certainly it won't be 60GB unless your data inside are almost 60GB or you accidentally set it as fixed size[
– phuclv
Jun 16 at 13:56
@phuclv Yes it's dynamically allocates, but it's .vmdk
– user28603
Jun 16 at 14:15
@phuclv Yes it's dynamically allocates, but it's .vmdk
– user28603
Jun 16 at 14:15
@Biswapriyo it's .vmdk
– user28603
Jun 16 at 14:16
@Biswapriyo it's .vmdk
– user28603
Jun 16 at 14:16
what do you mean? I asked you to check your vmdk file size. If it's really dynamically sized and already 60GB then there's no way you can reduce it unless you remove files in the VM and run compact
– phuclv
Jun 16 at 14:21
what do you mean? I asked you to check your vmdk file size. If it's really dynamically sized and already 60GB then there's no way you can reduce it unless you remove files in the VM and run compact
– phuclv
Jun 16 at 14:21
|
show 3 more comments
1 Answer
1
active
oldest
votes
up vote
-1
down vote
You can use the C:Program FilesVMwareVMware Workstationvmware-vdiskmanager.exe command line utility to create a new VMDK file with the lower capaacity.
Assuming that the utility is in your path and you are in the directory with the VMDK, make sure that the virtual machine is powered off and then issue a command like this:
vmware-vdiskmanager.exe -r sourceDisk.vmdk -s 30GB -t 0 destinationDisk.vmdk
Then, backup sourceDisk.vmdk
, rename destinationDisk.vmdk
to sourceDisk.vmd
and confirm that everything works. (If it doesn't, you can simply restore the original VMDK file.)
Note that this does not touch the original VMDK file, it's only a VMDK copy that's created.
Also, this is not a sector-by-sector copy. All data is copied from the original, regardless of its location. Therefore, no data will be lost so long as the destination disk size is large enough to accommodate all of it.
In effect, copying the VMDK file to one that's smaller with this tool automatically performs a partition resize and a Compact during the process. This is safe because VMware is aware of its own virtual disk structure. It's the same underlying technology used by VMware Converter when it creates a cloned virtual machine with a differently sized disk.
1
That sounds like a bad idea. Shrinking the physical medium without first shrinking the filesystem can seriously corrupt the filesystem. Just because less than 30 GB are used doesn’t mean all data is physically located on the first 30 GB.
– Daniel B
Jun 16 at 15:05
@DanielB I worked in technical support at VMware for over twelve years, and I assure you that this is safe. :) But in the worst case, you are not actually touching the original file—if anything goes wrong, it's only the copy that will be affected, and it's easily recovered from. When you copy the disk, it's the data that's copied—it's not sector by sector. In effect, a Compact is automatically performed during the process.
– Jason Bassford
Jun 16 at 15:07
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1331791%2fhow-to-shrink-vmware-disk-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
-1
down vote
You can use the C:Program FilesVMwareVMware Workstationvmware-vdiskmanager.exe command line utility to create a new VMDK file with the lower capaacity.
Assuming that the utility is in your path and you are in the directory with the VMDK, make sure that the virtual machine is powered off and then issue a command like this:
vmware-vdiskmanager.exe -r sourceDisk.vmdk -s 30GB -t 0 destinationDisk.vmdk
Then, backup sourceDisk.vmdk
, rename destinationDisk.vmdk
to sourceDisk.vmd
and confirm that everything works. (If it doesn't, you can simply restore the original VMDK file.)
Note that this does not touch the original VMDK file, it's only a VMDK copy that's created.
Also, this is not a sector-by-sector copy. All data is copied from the original, regardless of its location. Therefore, no data will be lost so long as the destination disk size is large enough to accommodate all of it.
In effect, copying the VMDK file to one that's smaller with this tool automatically performs a partition resize and a Compact during the process. This is safe because VMware is aware of its own virtual disk structure. It's the same underlying technology used by VMware Converter when it creates a cloned virtual machine with a differently sized disk.
1
That sounds like a bad idea. Shrinking the physical medium without first shrinking the filesystem can seriously corrupt the filesystem. Just because less than 30 GB are used doesn’t mean all data is physically located on the first 30 GB.
– Daniel B
Jun 16 at 15:05
@DanielB I worked in technical support at VMware for over twelve years, and I assure you that this is safe. :) But in the worst case, you are not actually touching the original file—if anything goes wrong, it's only the copy that will be affected, and it's easily recovered from. When you copy the disk, it's the data that's copied—it's not sector by sector. In effect, a Compact is automatically performed during the process.
– Jason Bassford
Jun 16 at 15:07
add a comment |
up vote
-1
down vote
You can use the C:Program FilesVMwareVMware Workstationvmware-vdiskmanager.exe command line utility to create a new VMDK file with the lower capaacity.
Assuming that the utility is in your path and you are in the directory with the VMDK, make sure that the virtual machine is powered off and then issue a command like this:
vmware-vdiskmanager.exe -r sourceDisk.vmdk -s 30GB -t 0 destinationDisk.vmdk
Then, backup sourceDisk.vmdk
, rename destinationDisk.vmdk
to sourceDisk.vmd
and confirm that everything works. (If it doesn't, you can simply restore the original VMDK file.)
Note that this does not touch the original VMDK file, it's only a VMDK copy that's created.
Also, this is not a sector-by-sector copy. All data is copied from the original, regardless of its location. Therefore, no data will be lost so long as the destination disk size is large enough to accommodate all of it.
In effect, copying the VMDK file to one that's smaller with this tool automatically performs a partition resize and a Compact during the process. This is safe because VMware is aware of its own virtual disk structure. It's the same underlying technology used by VMware Converter when it creates a cloned virtual machine with a differently sized disk.
1
That sounds like a bad idea. Shrinking the physical medium without first shrinking the filesystem can seriously corrupt the filesystem. Just because less than 30 GB are used doesn’t mean all data is physically located on the first 30 GB.
– Daniel B
Jun 16 at 15:05
@DanielB I worked in technical support at VMware for over twelve years, and I assure you that this is safe. :) But in the worst case, you are not actually touching the original file—if anything goes wrong, it's only the copy that will be affected, and it's easily recovered from. When you copy the disk, it's the data that's copied—it's not sector by sector. In effect, a Compact is automatically performed during the process.
– Jason Bassford
Jun 16 at 15:07
add a comment |
up vote
-1
down vote
up vote
-1
down vote
You can use the C:Program FilesVMwareVMware Workstationvmware-vdiskmanager.exe command line utility to create a new VMDK file with the lower capaacity.
Assuming that the utility is in your path and you are in the directory with the VMDK, make sure that the virtual machine is powered off and then issue a command like this:
vmware-vdiskmanager.exe -r sourceDisk.vmdk -s 30GB -t 0 destinationDisk.vmdk
Then, backup sourceDisk.vmdk
, rename destinationDisk.vmdk
to sourceDisk.vmd
and confirm that everything works. (If it doesn't, you can simply restore the original VMDK file.)
Note that this does not touch the original VMDK file, it's only a VMDK copy that's created.
Also, this is not a sector-by-sector copy. All data is copied from the original, regardless of its location. Therefore, no data will be lost so long as the destination disk size is large enough to accommodate all of it.
In effect, copying the VMDK file to one that's smaller with this tool automatically performs a partition resize and a Compact during the process. This is safe because VMware is aware of its own virtual disk structure. It's the same underlying technology used by VMware Converter when it creates a cloned virtual machine with a differently sized disk.
You can use the C:Program FilesVMwareVMware Workstationvmware-vdiskmanager.exe command line utility to create a new VMDK file with the lower capaacity.
Assuming that the utility is in your path and you are in the directory with the VMDK, make sure that the virtual machine is powered off and then issue a command like this:
vmware-vdiskmanager.exe -r sourceDisk.vmdk -s 30GB -t 0 destinationDisk.vmdk
Then, backup sourceDisk.vmdk
, rename destinationDisk.vmdk
to sourceDisk.vmd
and confirm that everything works. (If it doesn't, you can simply restore the original VMDK file.)
Note that this does not touch the original VMDK file, it's only a VMDK copy that's created.
Also, this is not a sector-by-sector copy. All data is copied from the original, regardless of its location. Therefore, no data will be lost so long as the destination disk size is large enough to accommodate all of it.
In effect, copying the VMDK file to one that's smaller with this tool automatically performs a partition resize and a Compact during the process. This is safe because VMware is aware of its own virtual disk structure. It's the same underlying technology used by VMware Converter when it creates a cloned virtual machine with a differently sized disk.
edited Jun 16 at 15:35
answered Jun 16 at 15:00
Jason Bassford
18719
18719
1
That sounds like a bad idea. Shrinking the physical medium without first shrinking the filesystem can seriously corrupt the filesystem. Just because less than 30 GB are used doesn’t mean all data is physically located on the first 30 GB.
– Daniel B
Jun 16 at 15:05
@DanielB I worked in technical support at VMware for over twelve years, and I assure you that this is safe. :) But in the worst case, you are not actually touching the original file—if anything goes wrong, it's only the copy that will be affected, and it's easily recovered from. When you copy the disk, it's the data that's copied—it's not sector by sector. In effect, a Compact is automatically performed during the process.
– Jason Bassford
Jun 16 at 15:07
add a comment |
1
That sounds like a bad idea. Shrinking the physical medium without first shrinking the filesystem can seriously corrupt the filesystem. Just because less than 30 GB are used doesn’t mean all data is physically located on the first 30 GB.
– Daniel B
Jun 16 at 15:05
@DanielB I worked in technical support at VMware for over twelve years, and I assure you that this is safe. :) But in the worst case, you are not actually touching the original file—if anything goes wrong, it's only the copy that will be affected, and it's easily recovered from. When you copy the disk, it's the data that's copied—it's not sector by sector. In effect, a Compact is automatically performed during the process.
– Jason Bassford
Jun 16 at 15:07
1
1
That sounds like a bad idea. Shrinking the physical medium without first shrinking the filesystem can seriously corrupt the filesystem. Just because less than 30 GB are used doesn’t mean all data is physically located on the first 30 GB.
– Daniel B
Jun 16 at 15:05
That sounds like a bad idea. Shrinking the physical medium without first shrinking the filesystem can seriously corrupt the filesystem. Just because less than 30 GB are used doesn’t mean all data is physically located on the first 30 GB.
– Daniel B
Jun 16 at 15:05
@DanielB I worked in technical support at VMware for over twelve years, and I assure you that this is safe. :) But in the worst case, you are not actually touching the original file—if anything goes wrong, it's only the copy that will be affected, and it's easily recovered from. When you copy the disk, it's the data that's copied—it's not sector by sector. In effect, a Compact is automatically performed during the process.
– Jason Bassford
Jun 16 at 15:07
@DanielB I worked in technical support at VMware for over twelve years, and I assure you that this is safe. :) But in the worst case, you are not actually touching the original file—if anything goes wrong, it's only the copy that will be affected, and it's easily recovered from. When you copy the disk, it's the data that's copied—it's not sector by sector. In effect, a Compact is automatically performed during the process.
– Jason Bassford
Jun 16 at 15:07
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1331791%2fhow-to-shrink-vmware-disk-size%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
First shrink the Windows aprtiton then the virtual hard disk file. What's the file extension of that virtual hard disk?
– Biswapriyo
Jun 16 at 11:59
by default any virtualization software will use a dynamically grown HDD image. Check your vmdk, most certainly it won't be 60GB unless your data inside are almost 60GB or you accidentally set it as fixed size[
– phuclv
Jun 16 at 13:56
@phuclv Yes it's dynamically allocates, but it's .vmdk
– user28603
Jun 16 at 14:15
@Biswapriyo it's .vmdk
– user28603
Jun 16 at 14:16
what do you mean? I asked you to check your vmdk file size. If it's really dynamically sized and already 60GB then there's no way you can reduce it unless you remove files in the VM and run compact
– phuclv
Jun 16 at 14:21