notAperson535 / OneClick-macOS-Simple-KVM

Tools to set up a easy, quick macOS VM in QEMU, accelerated by KVM. Works on Linux AND Windows.
https://notAperson535.github.io/OneClick-macOS-Simple-KVM
MIT License
661 stars 52 forks source link

GCP #89

Closed john-peterson closed 1 year ago

john-peterson commented 1 year ago

Screenshot_20230623-072738

gcloud compute instances create mac --provisioning-model spot --scopes https://www.googleapis.com/auth/devstorage.full_control --boot-disk-size 200 --enable-nested-virtualization --machine-type n1-standard-8 --image-project ubuntu-os-cloud --image-family ubuntu-minimal-2304-amd64 --boot-disk-type pd-balanced

sudo apt install apt-file qemu-system-x86 qemu-utils dmg2img git htop screen nano
john-peterson commented 1 year ago

Screenshot_20230623-082349

cat /volumes/untitled/var/log/install.log
john-peterson commented 1 year ago

Stumped in reading the log outside in normal text. Input appreciated

sudo modprobe nbd max_part=8
sudo qemu-nbd --connect=/dev/nbd0 macOS.qcow2
sudo fdisk /dev/nbd0 -l
sudo fsapfsinfo /dev/nbd0p2
sudo fsapfsmount -f 1 /dev/nbd0p2 /mnt/mac

That corresponds to


ls /volumes/untitled\ 1

In the recovery boot ??? ! ??

/Volumes/untitled is the actual content but I don't know how it magically conjures that mount. Any insight appreciated

It doesn't have many commands to help

findmnt /volumes/untitled
Command not found
notAperson535 commented 1 year ago

Screenshot_20230623-072738


gcloud compute instances create mac --provisioning-model spot --scopes https://www.googleapis.com/auth/devstorage.full_control --boot-disk-size 200 --enable-nested-virtualization --machine-type n1-standard-8 --image-project ubuntu-os-cloud --image-family ubuntu-minimal-2304-amd64 --boot-disk-type pd-balanced

sudo apt install apt-file qemu-system-x86 qemu-utils dmg2img git htop screen nano

Same thing happened to me. Try getting an offline installer for ventura like an iso.

john-peterson commented 1 year ago

I don't immediately understand the procedure. This should work. I am again stumped by getting the log


sudo qemu-nbd --connect=/dev/nbd0 macOS.qcow2
sudo fshfsinfo /dev/nbd0p2
sudo fshfsmount /dev/nbd0p2 hfs

tree -a hfs
├── .HFS+ Private Directory Data\x0d
├── .fseventsd
│   └── fseventsd-uuid
├── .journal
├── .journal_info_block
├── macOS Install Data
│   ├── InstallAssistant.pkg.integrityDataV1
│   ├── InstallAssistant.pkg.partial
│   ├── Locked Files
│   │   ├── .disk_label
│   │   ├── .disk_label.contentDetails
│   │   ├── .disk_label_2x
│   │   └── Boot Files
│   └── index.sproduct
└── ␀␀␀␀HFS+ Private Data

7 directories, 9 files

WHERE IS THE INSTALL FOLDER I'm going nuts. I can't even read the log. I give up

notAperson535 commented 1 year ago

I think the way the newest ventura installer grabs files from online is different then before. Try Monterey first if you don't/can't want to find an offline installer for ventura

notAperson535 commented 1 year ago

Stumped in reading the log outside in normal text. Input appreciated


sudo modprobe nbd max_part=8

sudo qemu-nbd --connect=/dev/nbd0 macOS.qcow2

sudo fdisk /dev/nbd0 -l

sudo fsapfsinfo /dev/nbd0p2

sudo fsapfsmount -f 1 /dev/nbd0p2 /mnt/mac

That corresponds to


ls /volumes/untitled\ 1

In the recovery boot ??? ! ??

/Volumes/untitled is the actual content but I don't know how it magically conjures that mount. Any insight appreciated

It doesn't have many commands to help


findmnt /volumes/untitled

Command not found

This might be the opencore disk.

john-peterson commented 1 year ago

But the log file has to be inside macOS.qcow2 right? What am I missing. I don't think I'm reading the entire disk correctly. It has some magic way to conjure up /Volumes/Untitled

I just have to read the log file. Obsessed with this conundrum

/Dev/disk6 is mapped to /volumes but NOTHING IS MOUNTED IN /VOLUMES/UNTITLED. Yet it exist. In any case how do I extract this from the image file. There is absolutely no way it's not in it. /volumes/untitled has to be inside the install image. There is no other way to place it. It contains the failed install an logs. I'm stuck with having no telnet to the recover console. Controlling that trough GUI is a nightmare. They could easily have put sshd in it it takes ten meg

notAperson535 commented 1 year ago

If you want to open the installer log press "window" in the top bar and select "installer log"

john-peterson commented 1 year ago

Maybe I can be so snyde as to ask for a Ventura image. Pre installed. There was one on vagrant but alas, parallels only :-[

vagrant box add logantbond/ventura
vagrant box list
It was a pre installed parallels image :-\

I am impressed with vagrant I will try to upload a qemu box if I can ever install it. Trying the Monterey> Ventura upgrade route now

softwareupdate -d -a

Will look for a offline installer DMG image and post the link here

notAperson535 commented 1 year ago

I do have offline installers but they're 15 gigs so I don't know how to share em.

notAperson535 commented 1 year ago

Just search up "ventura iso" on Google and it'll be there. But do not share links here please. I don't wanna get this repo taken down.

john-peterson commented 1 year ago

So there is NO OFFICIAL OFFLINE INSTALLER? How are they created? What about InstallAssistant.pkg. There is no way to mount that in qemu?

notAperson535 commented 1 year ago

@john-peterson apple is dumb. for a 100% official installer, u need a mac. If you know any online service that can host a 15gb file, I can make an offline installer for you, since I have a mac I can use.

maurhub commented 1 year ago

Just for the record, trying to install ventura using setupArch.sh throws the same error to me.

OSISHelperProxy blessUpdateBundleAtPath:mutableProductPath:enclosingMountPoint:]_block_invoke_2: Error Domain=NSCocoaErrorDomain Code=260 "The file “bootbase.efi” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Volumes/Mac SSD/macOS Install Data/UpdateBundle/AssetData/./boot/Firmware/System/Library/CoreServices/bootbase.efi, NSUnderlyingError=0x600002df8930 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

I took this from other thread but the error is exaclty the same. Monterey installs ok.

So to update Ventura you need to get an ISO, you won't be able to do it via script right?

notAperson535 commented 1 year ago

Sadly it seems the answer for that is yes.