Virtualize a partition linux on OSX (Dual Boot)

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
gaugautier
Posts: 2
Joined: 4. Nov 2015, 11:04

Virtualize a partition linux on OSX (Dual Boot)

Post by gaugautier »

Hi,

I have a dual boot on my macbook with Kali linux.

I would like to have a VM of my kali in my OS X.I have found some subject for windows but I have found nothing for linux.

I hope you could help me,

Thank you
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Virtualize a partition linux on OSX (Dual Boot)

Post by mpack »

Linux doesn't bind itself strongly to particular hardware and hence doesn't require any special tricks to make it bootable in two hosts, except perhaps NIC naming could be a problem. Just create a VMDK descriptor to refer to the drive or partition, as described in the other instructions you mention, then create a VM around the VMDK.

Personally I think you should consider going a much simpler route: create a normal Kali VM, not one that uses raw disk access. If you need access to specific files then keep them in some common folder. This configuration would be much less brittle.
gaugautier
Posts: 2
Joined: 4. Nov 2015, 11:04

Re: Virtualize a partition linux on OSX (Dual Boot)

Post by gaugautier »

My linux is installed on the disk0 and the partition 5

I tried the command "sudo VBoxManage internalcommands createrawvmdk -filename test.vmdk -rawdisk /dev/disk0 -partitions 5"

The vmdk has been created, but when i tried to create the VM, I have the followed error :
Failed to open the disk image file /Users/Gautier/test.vmdk.

Permission problem accessing the file for the medium '/Users/Gautier/test.vmdk' (VERR_ACCESS_DENIED).

Result Code: VBOX_E_FILE_ERROR (0x80BB0004)
Component: MediumWrap
Interface: IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee: IVirtualBox {0169423f-46b4-cde9-91af-1e9d5b6cd945}
Callee RC: VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

Do you have an idea ? What I did wrong ?
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Virtualize a partition linux on OSX (Dual Boot)

Post by mpack »

I suggest you read the topics on accessing bootcamp partitions from a VM. The permission and most other problems are the same.
Post Reply