Page 1 of 1

Virtualize a partition linux on OSX (Dual Boot)

Posted: 4. Nov 2015, 11:08
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

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

Posted: 4. Nov 2015, 11:11
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.

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

Posted: 4. Nov 2015, 12:09
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 ?

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

Posted: 4. Nov 2015, 12:12
by mpack
I suggest you read the topics on accessing bootcamp partitions from a VM. The permission and most other problems are the same.