You are not logged in.

Announcement

[2017.09.08] DeployStudio build v1.7.8 (checksum, release note).
[2016.08.26] DeployStudio build v1.6.19 (release note).
[2013.02.23] DeployStudio last universal build v1.5.17 (release note).

#1 2017-09-03 03:40:55

rtrouton
Member
Registered: 2011-03-10

APFS Restore Task is looking for an SSD - cannot image VMs

I am testing DeployStudio's APFS imaging in a VM, but it doesn't appear that I can use APFS imaging with a VM's boot drive. The workflow fails with the following message:

"Cannot find a valid disk for restoration (SSD and not current boot drive.)"

I normally test new versions of DeployStudio with VMs before deploying to production, so not being able to test APFS imaging in a VM is a problem. Can this please be addressed?

Image of error message posted here:

https://imgur.com/3ePBt5J

Offline

#2 2017-09-04 12:52:01

mjsanders
Member
From: Schiedam, Netherlands
Registered: 2008-09-02
Website

Re: APFS Restore Task is looking for an SSD - cannot image VMs

It is good that DeployStudio checks for SSD, since (by default) Apple does not convert HD's to APFS.
Maybe the check should be done differently..

I suspect that one can fake this in the .vmx file have VMware emulate an SSD.
see http://www.virtuallyghetto.com/2013/07/emulating-ssd-virtual-disk-in-vmware.html (too bad from 2013) but it states macOS : SATA can be recognized as SSDs, but IDE and SCSI as mechnical...

I tried to do it, but failed.
In my VM the following settings for my 'boot drive'

sata0:0.present = "TRUE"
sata0:0.fileName = "Virtual Disk-000001.vmdk"
sata0:0.virtualSSD = 1

I added the third line myself, (as the blog explains), tried "1" and "TRUE" as values for virtualSSD but no go...
The diskutil info disk0 states:

diskutil info disk0
---snip---
Device / Media Name:      VMware Virtual SATA Hard Drive
--snip---
  Solid State:              Yes

On a real macbook the similar answer is:

diskutil info disk0
---snip---
 Device / Media Name:      APPLE SSD SM0512G
--snip---
  Solid State:              Yes

There may be issues since the SSD in my MacBook is PCI based, emulated SATA disk that it all gets confused.
I hope is is just a tweak of related settings in the .vmx file, but I lack the time time to investigate more.

Last edited by mjsanders (2017-09-04 13:59:03)

Offline

#3 2017-09-04 13:21:03

mjsanders
Member
From: Schiedam, Netherlands
Registered: 2008-09-02
Website

Re: APFS Restore Task is looking for an SSD - cannot image VMs

Update, It works in my VMware Fusion 8.5.8.

Trick is to use the restore workflow, and select ' First available disk' as target
third line here with virtualSSD added in .vmx file like this:

sata0:0.present = "TRUE"
sata0:0.fileName = "Virtual Disk-000001.vmdk"
sata0:0.virtualSSD = "TRUE"

(maybe the other values worked too, but I did not test properly)

log of DS for the restore (DS1.7.7 10.13b8):

2017-09-04 12:12:18.685 DeployStudio Runtime.bin[356:55203] Running workflow: '9-restore 10.13 apfs' (3F1A6970-804D-40DF-9388-2547AAB84C7D)
2017-09-04 12:12:35.646 DeployStudio Runtime.bin[356:55364] Restore action:
2017-09-04 12:12:36.129 DeployStudio Runtime.bin[356:55364] Looking for solid-state drives:
2017-09-04 12:12:36.129 DeployStudio Runtime.bin[356:55364] Boot device='/dev/disk2'
2017-09-04 12:12:36.129 DeployStudio Runtime.bin[356:55364] Repository device='(null)'
2017-09-04 12:12:36.129 DeployStudio Runtime.bin[356:55364] Devices to evaluate: /dev/disk0,/dev/disk1,/dev/disk10,/dev/disk11,/dev/disk12,/dev/disk13,/dev/disk14,/dev/disk15,/dev/disk16,/dev/disk17,/dev/disk18,/dev/disk19,/dev/disk2,/dev/disk20,/dev/disk3,/dev/disk4,/dev/disk5,/dev/disk6,/dev/disk7,/dev/disk8,/dev/disk9,
2017-09-04 12:12:36.129 DeployStudio Runtime.bin[356:55364] >> '/dev/disk2': boot disk
2017-09-04 12:12:36.129 DeployStudio Runtime.bin[356:55364] >> '/dev/disk1': ok (SSD)
2017-09-04 12:12:36.129 DeployStudio Runtime.bin[356:55364] >> '/dev/disk0': ok (SSD)
2017-09-04 12:12:36.130 DeployStudio Runtime.bin[356:55364] "/Applications/Utilities/DeployStudio Admin.app/Contents/Plugins/DSRestoreTask.bundle/Contents/Resources/Scripts/deleteparentlvg.sh" /dev/disk0 2>&1
2017-09-04 12:12:36.486 DeployStudio Runtime.bin[356:55364] /usr/sbin/diskutil unmountDisk force /dev/disk0 2>&1
2017-09-04 12:12:36.707 DeployStudio Runtime.bin[356:55364] Forced unmount of all volumes on disk0 was successful
2017-09-04 12:12:36.711 DeployStudio Runtime.bin[356:55364] /usr/sbin/diskutil partitionDisk /dev/disk0 1 GPTFormat APFS _DS_DEV_DISK_X_ 1B 2>&1
2017-09-04 12:12:36.868 DeployStudio Runtime.bin[356:55364] Started partitioning on disk0
2017-09-04 12:12:36.872 DeployStudio Runtime.bin[356:55364] Unmounting disk
2017-09-04 12:12:37.873 DeployStudio Runtime.bin[356:55364] Creating the partition map
2017-09-04 12:12:37.949 DeployStudio Runtime.bin[356:55364] Waiting for partitions to activate
2017-09-04 12:12:37.955 DeployStudio Runtime.bin[356:55364] Formatting disk0s2 as APFS with name _DS_DEV_DISK_X_
2017-09-04 12:12:38.285 DeployStudio Runtime.bin[356:55364] Mounting disk
2017-09-04 12:12:38.434 DeployStudio Runtime.bin[356:55364] Finished partitioning on disk0
2017-09-04 12:12:38.448 DeployStudio Runtime.bin[356:55364] /dev/disk0 (internal, physical):
2017-09-04 12:12:38.448 DeployStudio Runtime.bin[356:55364]    #:                       TYPE NAME                    SIZE       IDENTIFIER
2017-09-04 12:12:38.448 DeployStudio Runtime.bin[356:55364]    0:      GUID_partition_scheme                        *42.9 GB    disk0
2017-09-04 12:12:38.448 DeployStudio Runtime.bin[356:55364]    1:                        EFI EFI                     209.7 MB   disk0s1
2017-09-04 12:12:38.448 DeployStudio Runtime.bin[356:55364]    2:                 Apple_APFS Container disk1         42.7 GB    disk0s2
2017-09-04 12:12:38.450 DeployStudio Runtime.bin[356:55364] /usr/sbin/diskutil mountDisk /dev/disk0 2>&1
2017-09-04 12:12:38.983 DeployStudio Runtime.bin[356:55364] Volume(s) mounted successfully
2017-09-04 12:12:38.988 DeployStudio Runtime.bin[356:55364] '/tmp/DSNetworkRepository/Masters/APFS/osx-10.13-17A358a.apfs.dmg' size: 24696.1 MB
2017-09-04 12:12:38.988 DeployStudio Runtime.bin[356:55364] '/Volumes/_DS_DEV_DISK_X_' size: 42739.9 MB
2017-09-04 12:12:39.146 DeployStudio Runtime.bin[356:55364] "/Applications/Utilities/DeployStudio Admin.app/Contents/Frameworks/DSCore.framework/Resources/Tools/apfsphysicaldeviceid.sh" /Volumes/_DS_DEV_DISK_X_ 2>&1
2017-09-04 12:12:39.293 DeployStudio Runtime.bin[356:55364] Setting boot device to '/dev/disk1s1'.
2017-09-04 12:12:39.293 DeployStudio Runtime.bin[356:55364] /usr/sbin/diskutil unmount force /dev/disk1s1 2>&1
2017-09-04 12:12:39.534 DeployStudio Runtime.bin[356:55364] Volume _DS_DEV_DISK_X_ on disk1s1 force-unmounted
2017-09-04 12:12:39.537 DeployStudio Runtime.bin[356:55364] /usr/sbin/asr restore --source /tmp/DSNetworkRepository/Masters/APFS/osx-10.13-17A358a.apfs.dmg --target /dev/disk0s2 --puppetstrings --noprompt --noverify --erase --buffers 8 --buffersize 8m 2>&1
2017-09-04 12:12:39.795 DeployStudio Runtime.bin[356:55364] XSTA

Last edited by mjsanders (2017-09-04 13:58:01)

Offline

Board footer

Powered by FluxBB