OSDev.org

The Place to Start for Operating System Developers
It is currently Mon May 20, 2024 12:12 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: VMDK to flat image code snippet for VMware based testing.
PostPosted: Wed Dec 02, 2020 9:01 am 
Offline
Member
Member

Joined: Sun Jun 16, 2013 10:13 am
Posts: 28
Here is my whole "Virtual Disk.vmdk" file:
Code:
# Disk DescriptorFile
version=1
CID=fffffffe
parentCID=ffffffff
createType="monolithicFlat"
# Extent description
RW 16777216 FLAT "Virtual Disk.img" 0
# The Disk Data Base
#DDB
ddb.adapterType = "lsilogic"
ddb.geometry.sectors = "63"
ddb.geometry.heads = "255"
ddb.geometry.cylinders = "1044"

And I have a 8GiB "Virtual Disk.img" file along with this vmdk file. This code snippet tells VMware to use that flat disk image as the virtual hard disk for the VM.

This is useful for modern OS'es that does not support floppy or optical media (ugh who still use those IRL anyway...) as it gives your VM a proper virtualized HDD to work with. This code snippet allows you to use a single flat disk image for the development process, by alternating it between host OS and the VM.

Another useful command for those with macOS is "hdiutil attach Virtual\ Disk.img -mount suppressed" which force attaches the flat image, priming it for initialization using "diskutil eraseDisk". (And yes my debug hypervisor is VMware Fusion...)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group