LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > dr_agon
User Name
Password

Notices


Rate this Entry

creating VMDK file for raw disk access by virtualbox on linux host

Posted 05-19-2014 at 03:32 PM by dr_agon

Recently I repartitioned my harddrive and had to recreate VMDK file which is used to access some of my physical partitions by guest machine.
You can do it using the command
Code:
$ sudo vboxmanage internalcommands createrawvmdk -filename test.vmdk -rawdisk /dev/sda -partitions 1,3
The result did not satisfy me, because guest machine required RW access to entire /dev/sda.
Looking for description of VMDK format I have found this.
So, I modified the lines in VMDK file replacing /dev/sda by /dev/sda1 and sda3 respectively, and removed the offset.
Example:
original line:
Code:
RW 61432497 FLAT "/dev/sda" 63
new line:
Code:
RW 61432497 FLAT "/dev/sda1"
Now I can grant RW permissions only to selected partitions (I described it in my earlier blog).
Posted in Uncategorized
Views 1656 Comments 0
« Prev     Main     Next »

  



All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration