when i create a vmware disk with vmware-vdiskmanager, i want to setup the partition without vmware workstation. Anyone knows which tool or method can help me do this?
Are you looking for creating vmdk's of fixed size prior to VM creation?
Regards
Anil
Save the planet, Go Green
if you found my answer to be useful, feel free to mark it as Helpful or Correct.
I have created a disk of fixed size with vmware-vdiskmanager. What I want to do is to mount this disk and copy some file to it, so I need to partition this disk first before I can mount it with vmware-mount. So what I wonder is how to partition this vmware disk without vmware workstation.
What I have tried is to map the -flat.vmdk file as a loop device, then fdisk this loop device. But it failed. I can see the partition table with "vmware-mount -p .vmdk", but can not mount it. Do you know why?
Hello,
The Guest OS handles VMDK disk partitioning, so you will need to install an OS into the Guest in order to partition it, or boot from a LiveCD to do the same.
Best regards,
Edward L. Haletky
VMware Communities User Moderator, VMware vExpert 2009
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
That's just what I don't want to do.
I'm just thinking that since we have tools to create an empty disk, and to mount a partitioned disk without workstation, why can't we partition an empty disk without running any guest OS?
Hello. The commands below will create a vmdk formatted with NTFS.
touch ntfs.img
mkntfs -fF ntfs.img 1000000
qemu-img convert ntfs.img -O vmdk ntfs.vmdk
Good Luck!
Great, qemu-img is a really helpful tool.
Thank you very much:)
Hello,
For linux fdisk/sfdisk/qparted may work on an image file as well. I have never used them like that but they may work.
Best regards,
Edward L. Haletky
VMware Communities User Moderator, VMware vExpert 2009
====
Author of the book 'VMWare ESX Server in the Enterprise: Planning and Securing Virtualization Servers', Copyright 2008 Pearson Education.
Blue Gears and SearchVMware Pro Blogs -- Top Virtualization Security Links -- Virtualization Security Round Table Podcast
Hi
visit boot-land.net and search for posts from Jaclaz - he has written a batch that can exactly do what you are looking for.
Partition a newly created vmdk without the need to boot it inside a VM first.
All other tools referenced in the previous answers can't do what you are looking for
Ulli
___________________________________
description of vmx-parameters:
Thank you for the information.
I searched the posts from Jaclaz at boot-land.net, but I'm not sure whether you refer to the tool MBRBATCH. I found MBRBATCH is meant for Windows, but I work in Linux. Do you know any similar tools for Linux?
A tool like that for Linux ? - no - I don't know any.
You can boot a small Windows LiveCD and run the batch against some vmdks you store on Linux ... sorry - no other ideas
___________________________________
description of vmx-parameters:
All other tools referenced in the previous answers can't do what you are looking for
The commands listed below will create a vmdk that is formatted with NTFS:
touch ntfs.img
mkntfs -fF ntfs.img 1000000
qemu-img convert ntfs.img -O vmdk ntfs.vmdk
I issued these 3 commands on my Linux host, assigned ntfs.vmdk to a Windows XP virtual machine and disk manager saw a NTFS formatted volume. I also was able to write files to it within XP.
It is no problem at all to create a NTFS formatted partition - image.
Creating a blank vmdk from scratch and make it work as a real disk-image (including an MBR) is something very different
___________________________________
description of vmx-parameters:
Can someone fix the commands below so that copy (and format) doesn't fail?
# Linux
touch disk.imgmkntfs -fF disk.img 100000qemu-img convert disk.img -O vmdk disk.vmdkdd if=/dev/zero of=file.10mb bs=10M count=1# Windowsvmware-mount z: disk.vmdkcopy file.10mb z:\A device attached to the system is not functioning.0 file(s) copied.format z: /q Creating file system structures. The first NTFS boot sector is unwriteable. All NTFS boot sectors are unwriteable. Cannot continue. Format failed.mkntfs -V mkntfs v2012.1.15AR.1 (libntfs-3g) qemu-img qemu-img version 1.0, Copyright (c) 2004-2008 Fabrice Bellardcat /etc/issue Ubuntu 12.04 LTS \n \lvmware-mount /?VMware DiskMount Utility version 4.2.0 build-321138verMicrosoft Windows [Version 6.1.7601]