El Capitan on local partition

Discussions about using Mac OS X guests (on Apple hardware) in VirtualBox.
Post Reply
No Spam
Posts: 5
Joined: 9. Aug 2018, 08:56

El Capitan on local partition

Post by No Spam »

Hello,

tried unsuccessfully to use my old system on a new iMac.
iMac is running High Sierra. El Capitan from backup is stored on a second partition.
Vmdk file is only generated as su. But not with the -partitions property.
VBoxManage internalcommands createrawvmdk -filename capitan.vmdk -rawdisk /dev/disk1s4
The devicename disk1s4 must be used, due to access error when using /dev/disk1 -partitions 4,5

Then in Virtualbox the vmdk file does not work, also access error.
Tried several settings for permissions and user and group on the vmdk file, without any success.
So I need help please, because the old El Capitan system is still needed.

This is the error message I get:
Permission problem accessing the file for the medium '/Users/xxx/capitan.vmdk' (VERR_ACCESS_DENIED).

Fehlercode:VBOX_E_FILE_ERROR (0x80BB0004)
Komponente:MediumWrap
Interface:IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee:IVirtualBox {9570b9d5-f1a1-448a-10c5-e12f5285adad}
Callee RC:VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)
Please any help.
Last edited by socratis on 9. Aug 2018, 09:55, edited 1 time in total.
Reason: Enclosed the information in [quote] tag for better readability
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: El Capitan on local partition

Post by socratis »

First of all, I do *not* recall anyone trying to access a partition that contains an OSX installation. I've done it with an external HD (I still do), which contains a bootable 10.13 installation. There are two major components here:
  • I'm accessing the whole disk.
  • The disk itself is a fine, bootable, complete OSX installation.
When you say:
No Spam wrote:El Capitan from backup is stored on a second partition.
Is that partition bootable? Or is it simply a bunch of files sitting on a 2nd partition in your hard drive?
No Spam wrote:due to access error when using /dev/disk1 -partitions 4,5
Yes, because /dev/disk1 is where your current OS resides, the one that you booted from. Can't do that. Not even root.
No Spam wrote:Tried several settings for permissions and user and group on the vmdk file, without any success.
You need to change the permissions on the /dev/disk1s4 for that to work. As far as the VMDK goes, you don't really care about the permissions that much. It's the raw device that needs RW access. And I bet you don't have RW access to the device. Post the output of the command:
  • 
    ls -al /dev/disk*
Please do NOT obfuscate not even a letter. I can't diagnose and help you if you close my eyes.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Martin
Volunteer
Posts: 2560
Joined: 30. May 2007, 18:05
Primary OS: Fedora other
VBox Version: PUEL
Guest OSses: XP, Win7, Win10, Linux, OS/2

Re: El Capitan on local partition

Post by Martin »

I don't think it will work with disk1s4, because the OS expects a whole disk to boot from, with MBR and partition table, not just a single partition.
Years ago I managed to do something similar on Linux for a Windows guest by using a boot record overlay file with the -mbr parameter to avoid touching the boot record of the active system disk.
But this was probably on a 3.x version... :wink:
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: El Capitan on local partition

Post by socratis »

Martin wrote:the OS expects a whole disk to boot from, with MBR and partition table
Slight correction; GPT, not MBR. All OSX installations use EFI and GPT, which makes it even more difficult. And to be honest, since you can't access via rawdisk the disk that you are booting from, it's going to be kinda difficult. With the latest incarnations of OSX, and especially with APFS, people are having trouble accessing their BootCamp partitions via rawdisk...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
No Spam
Posts: 5
Joined: 9. Aug 2018, 08:56

Re: El Capitan on local partition

Post by No Spam »

Backup and restore was done with CCC, so it should be bootable. CCC told me that.
But diskutil shows it as Apple_HFS.
Trying to boot the system from the partition ends with a forbidden sign.
The recovery partitions are shown as Apple_Boot, but the main partition is also non Apple_Boot.
Therefore I thought VirtualBox can do the job.

Yes, there was no write permission for the disk1s4.
After adding the permission to disk1s4 a vmdk file was created.
But VirtualBox can not use it because

The medium '/Users/xxx/capitan.vmdk' can't be used as the requested device type.

Fehlercode:NS_ERROR_FAILURE (0x80004005)
Komponente:MediumWrap
Interface:IMedium {4afe423b-43e0-e9d0-82e8-ceb307940dda}
Callee:IVirtualBox {9570b9d5-f1a1-448a-10c5-e12f5285adad}
Callee RC:VBOX_E_OBJECT_NOT_FOUND (0x80BB0001)

So booting from a partition does not seem to work.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: El Capitan on local partition

Post by socratis »

No Spam wrote:So booting from a partition does not seem to work.
Booting from a partition *does* work. As long as the partition is bootable. You don't even have a bootable partition. VirtualBox can't do magic and turn a non-bootable partition into a bootable one. That's not a limitation, that's a fact of life.

Post the output of:
  • diskutil list
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
No Spam
Posts: 5
Joined: 9. Aug 2018, 08:56

Re: El Capitan on local partition

Post by No Spam »

OK, then I have to return to Carbon Copy Cloner and why the partition is not bootable.
Booting from the external backup devices always worked without problems.
Thanks and I will report later then.
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         121.3 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            120.9 GB   disk0s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *2.0 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:          Apple_CoreStorage Macintosh HD            942.6 GB   disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3
   4:                  Apple_HFS elcap                   1.1 TB     disk1s4
   5:                 Apple_Boot Recovery HD             650.0 MB   disk1s5

/dev/disk2 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           +1.1 TB     disk2
                                 Logical Volume on disk0s2, disk1s2
                                 42897575-9F64-445C-B996-340B8AE527C8
                                 Unencrypted Fusion Drive
Last edited by socratis on 9. Aug 2018, 22:01, edited 1 time in total.
Reason: Enclosed the information in [pre] tag for better readability
No Spam
Posts: 5
Joined: 9. Aug 2018, 08:56

Re: El Capitan on local partition

Post by No Spam »

Probably the device type error appears when the device is mounted.
With an unmounted device VirtualBox accepts the vmdk file, but presents when trying to boot
VD: error VERR_NOT_SUPPORTED opening image file '/Users/xxx/capitan.vmdk' (VERR_NOT_SUPPORTED).

VD: error VERR_ACCESS_DENIED opening image file '/Users/xxx/capitan.vmdk' (VERR_ACCESS_DENIED).

Failed to open image '/Users/xxx/capitan.vmdk' in read-write mode (VERR_ACCESS_DENIED).

AHCI: Failed to attach drive to Port0 (VERR_ACCESS_DENIED).

Fehlercode:NS_ERROR_FAILURE (0x80004005)
Komponente:ConsoleWrap
Interface:IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Permissions on device and vmdk are all set to rw for all.
Last edited by socratis on 9. Aug 2018, 22:04, edited 1 time in total.
Reason: Enclosed the information in [pre] tag for better readability
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: El Capitan on local partition

Post by socratis »

I honestly have no clue what you've done there. Compare your setup, with a typical OSX setup; mine ;) :
$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:          Apple_CoreStorage Macintosh HD            499.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (internal, virtual):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS SGK-MBP2500            +499.1 GB   disk1
                                 Logical Volume on disk0s2
                                 25EC34FC-387D-472E-A02F-C043B99293F6
                                 Unencrypted
You have my complete 500 GB hard disk as a GUID partition scheme (disk0). This is broken down to the 200 MB EFI boot partition (disk0s1), the 650 MB Recovery partition at the end of the disk (disk0s3) and in the middle the "logical" remaining 499 GB CoreStorage (disk0s2). Now, that "disk0s2" is also the same as "disk1", which is pretty much one "disk/partition" formatted as HFS+.

And here's one from a freshly installed 10.13 OSX VM:
$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *64.4 GB    disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS VB-OSX-1013             63.6 GB    disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
This one doesn't have the logical partition, it simply has the EFI (disk0s1), HFS+ (disk0s2) and Recovery (disk0s3) partitions. Simpler, no CoreStorage involved, don't know why...

Now, the part that's troubling in your setup, is that you have nothing close to that scheme. The Recovery partition, which should be in the first disk, is not. Not only that, but you have TWO Recovery partitions. I really don't know how you managed to to that, or how the EFI boot loader manages to find which one is which. I haven't gotten my MSc in EFI yet, not even my basic degree... ;)

I don't even know what you've done with disk0s2. It shows as a logical partition which is then combined with disk1s2 to form your "main" HD, disk2. :shock:

I'm sorry, but I don't know enough to help you with such a convoluted scheme...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
No Spam
Posts: 5
Joined: 9. Aug 2018, 08:56

Re: El Capitan on local partition

Post by No Spam »

This scheme ist not convoluted. It is typical for a fusion drive.
Yours is typical for a normal drive.
As far as I know.

But I am just trying another way. Probably this is the solution.
I will tell you if successful or not.
Post Reply