Jump to content

DWomack

Members
  • Posts

    39
  • Joined

  • Last visited

Posts posted by DWomack

  1. On 2/13/2024 at 1:21 PM, DWomack said:

    Looking for an annotated user script that will remove all of what Macinabox has touched, so a new macinabox can be created.

     

    A script would be much better than touch this, and this, delete this, etc.

     

    Maybe the script could remove all VMs and the dockers necessary.

     

    Sure I can stumble through all the steps, but a script that always works without mistakes would be much better.

     

    Thanks to iamtim2 for posting his guide above.

    This seems to work, you guys have comments?

     

    I made this an UnRaid User Script:

     

    #!/bin/bash
    #description=This script completely removes all references to the BigSur_VM
    #foregroundOnly=true
    #arrayStarted=true
    #name=remove_macinabox_BigSur_VM
    
    # Replace "name_of_VM" with the actual name of your VM
    
    echo VM_NAME="Macinabox BigSur"
    VM_NAME="Macinabox BigSur"
    echo
    
    sleep 2
    
    # Undefine the VM (remove it from libvirt)
    
    echo virsh undefine --nvram "$VM_NAME"
    virsh undefine --nvram "$VM_NAME"
    echo
    
    sleep 2
    
    # Delete the VM's XML configuration file
    # Navigate to the directory where VM XML files are stored
    # Usually located at /etc/libvirt/qemu/
    # Delete the XML file corresponding to your VM
    # For example:
    
    echo ls -la /etc/libvirt/qemu/
    ls -la /etc/libvirt/qemu/
    echo
    
    # echo rm /etc/libvirt/qemu/"$VM_NAME".xml
    # rm /etc/libvirt/qemu/"$VM_NAME".xml
    # echo
    
    sleep 2
    
    # Restart the libvirt service
    # This step ensures that the changes take effect
    # You can restart the entire server or just the libvirt service
    #
    # For example:
    # systemctl restart libvirtd
    #
    # Or since this is Slackware:
    # /etc/rc.d/rc.libvirt restart
    
    echo /etc/rc.d/rc.libvirt restart
    /etc/rc.d/rc.libvirt restart
    echo
    
    sleep 2
    
    # Optionally, you can also delete the VM's disk image
    # Locate the VM disk image and delete it
    # For example:
    # rm /mnt/user/domains/"$VM_NAME"/disk.img
    
    echo rm -r /mnt/user/domains/"$VM_NAME"
    rm -r /mnt/user/domains/"$VM_NAME"
    echo
    
    sleep 2
    
    echo rm -r /mnt/user/isos/BigSur-install.img
    rm -r /mnt/user/isos/BigSur-install.img
    echo
    
    sleep 2
    
    echo rm /mnt/user/system/custom_ovmf/*
    rm /mnt/user/system/custom_ovmf/*
    echo
    
    sleep 2
    
    # Notify any relevant services or users about the VM removal
    # You can customize this part based on your setup
    # For example, send a notification using Unraid's built-in notification system:
    # /usr/local/emhttp/webGui/scripts/notify -i normal -s "VM $VM_NAME removed"
    
    # Clean up any other associated files or directories as needed
    
    echo rm -r /boot/config/plugins/user.scripts/scripts/1_macinabox_vmready_notify
    rm -r /boot/config/plugins/user.scripts/scripts/1_macinabox_vmready_notify
    echo
    
    sleep 2
    
    echo rm -r /boot/config/plugins/user.scripts/scripts/1_macinabox_helper
    rm -r /boot/config/plugins/user.scripts/scripts/1_macinabox_helper
    echo
    
    sleep 2
    
    # Done! The VM traces should now be completely removed.
    
    # Remember to make this script executable:
    # chmod +x /path/to/your/script.sh
    
    echo Script complete!

     

    Is there a way to script stopping and deleting…

    the macinabox docker

    the vm

    the macinabox docker template

     

    If I want to start a fresh, I want to just run a script.  

  2. Looking for an annotated user script that will remove all of what Macinabox has touched, so a new macinabox can be created.

     

    A script would be much better than touch this, and this, delete this, etc.

     

    Maybe the script could remove all VMs and the dockers necessary.

     

    Sure I can stumble through all the steps, but a script that always works without mistakes would be much better.

     

    Thanks to iamtim2 for posting his guide above.

  3. On 1/15/2024 at 9:20 PM, austin said:

    So I successfully booted up and even got updated to the latest OpenCore! I was hodge poding a lot of docs but at the end of the day, it's working perfect. I have iMessage working (I cloned an actual serial number for an old broken laptop I have laying around) and everything is smooth!

     

    I learned pretty quickly that people seem to hate on OpenCore Configurator, so I switched and used a number of different tools to get to the endpoint.

    1. I used MountEFI.py at first https://github.com/corpnewt/MountEFI to mount my EFI

    2. Then OCAT (OpenCoreAuxillaryTools) https://github.com/ic005k/OCAuxiliaryTools to upgrade my EFI to the latest opencore, there is a button to do this and it handles it all for you. You just need to mount the EFI, which I ended up having to do with OpenCoreConfigurator's mount option (I already had installed, but didnt end up using it besides for mounting) to mount the EFI that the unraid box was actually using. By default MountEFI.py was mounting the EFI of the boot drive and not the secondary disk from the unraid VM. 

    3. After updating you'll have an exclamation point at the top center of OCAT, this runs OCValidate which checks your config.plst. I had to update only one configuration to fix, which I just googled. It required me to go to NVRAM in OCAT and delete one of the reocrds and replace with a new value.

    4.I think I might've had to do something in ACPI by running https://github.com/acidanthera/MaciASL and changing some CPU pinning thing or something, I did so many random things that I probably have all of this wrong. BUT, it works! So I dont care.

     

    Have you seen EFI-Agent on GitHub?
     

    So, what version of macOS do you have running?  I am at Big Sur. 

     

    When I start the VM it runs thru a bunch of code, which are boot messages from OpenCore?

     

    Then it is at an OpenCore picker screen and I pick Big Sur and it boots.

     

    How do I get it to go straight to Big Sur?

     

    I hope SpaceInvader One is progressing along to the new release of Macinabox.

     

     

    Dennis

     

  4. 6 hours ago, PeteAsking said:

    No you dint need to install a mongodb container. It is included. 
     

    I think you type 

    sudo service unifi stop

    sudo systemctl disable unifi

     


    Thank you for your help on this New Years Day.  
     

    Your suggestion above does stop it on the Ubuntu box.  Likewise 

    sudo service unifi start

    will start it back up. 
     

    I am still having issues with adopting.  It doesn’t want to adopt.  I think the fly in the ointment is the meshing ability.  When it is trying to adopt it is trying to get there through an AP that hasn’t been adopted.  
     

    How in UniFi can you force wired only?  No meshing at all.  I know meshing can provide some redundancy if wired fails but this ridiculous. 
     

     

    Dennis

     

     

  5. I am completely new to running UniFi on Docker, and Docker in Unraid, hence the questions.

     

    Do I have to install the Mondo container or is it included in UniFi.Unraid.Reborn?

     

    I have run the Cloud Key, and a RaspberryPi as controllers in the past.  Currently it is running on a Ubuntu 22.04 box.  Short of just shutting down the Ubuntu box, what do I enter at the command line to shut down the running controller?

     

     

     

     

  6. I have a prior version of the UniFi Controller running on a Ubuntu 22.04 box.  It is not on docker.  
     

    I have installed this docker on UnRaid and it runs. 
     

    I have only two APs running in this home environment.  I want to migrate the APs to this new docker based controller.  
     

    I have tried to move them one at a time. 
     

    I tell the prior to forget an AP and it does.  
     

    The new docker controller sees the AP that was forgotten.  I tell it to adopt it, but it never does.  Adopting……
     

    I tell the prior to adopt it and it does. 
     

    What am I doing wrong?

     

    I even tried hardware reset on the AP but it won’t adopt on the new, but will on the old.  
     

    Firmware on the AP is the latest. 
     

    I am stumped. 
     

    Thanks

     

     

    Dennis

  7. 8 hours ago, alturismo said:

    they are processed by the internal cron i would say, but about the logs ...

     

    either webui, or if you want to process them manually

     

    sample

     

    image.png.495138b66dd675d82c24f3428f84579c.png

     

    it is unique for each script, not for each run ... (which i personally abolutely wouldnt want ...)

    I understand that but what I would like would look like…

    log.Encode.timestamp.txt

     

    If I download log.txt from multiple scripts that run, the download directory winds up full of stuff like log.txt, log1.txt, log2.txt…. Names are not tied to the script they came from. 

     

     

  8. On 10/26/2023 at 12:41 AM, alturismo said:

    you should see your logs on the user scripts page

     

    image.thumb.png.b9d3eeeca6301bb18ce2a1cd8cc30f9b.png

     

    if you manually want to copy them over

     

    they are located in Ram ...

    image.thumb.png.8d79b2b94e34019e2700f828772f0993.png

     

    so a cp ..../log.txt /mnt/user/whereever ... will copy them to a persistent storage.

     

    So, are the user scripts processed by a script?

     

    I would like to modify the processing so that instead of log.txt the file name would be something like...

    user_script_name_timestamp.txt

     

    This would allow the log to be downloaded or stored as a unique file.

     

    Thanks.

  9. 15 minutes ago, Lazirus33 said:

    I know you can use which ever settings you want, but this worked for me, 

     

    So I installed the MariaDB-Official by mgutt and these are the settings I used.

     

    Repository: mariadb:10

    Port: 3306

    Generate Random Pass: Yea

    Database Name: speedtest_tracker

    Database User: speedy

    Database Password: password

     

    Then with the speedtest-tracker docker the settings are

     

    WebUI Port: 8943

    Puid: 1000

    PGID: 1000

    Database: mysql

    Database host: IP of your unraid server

    Database Port: 3306

    Database Name: speedtest_tracker

    Database username: speedy

    Database Password: password

    host Port 2: 9999

    My repository is

    lscr.io/linuxserver/mariadb

     

    That is the default. 
     

    I don’t see a Generate Random Pass

  10. So this is not working.  I used the sqlite version previously and it worked.

     

    Here is my mariadb container:

     

    docker run
      -d
      --name='mariadb'
      --net='bridge'
      -e TZ="America/New_York"
      -e HOST_OS="Unraid"
      -e HOST_HOSTNAME="NucBerthaPlus"
      -e HOST_CONTAINERNAME="mariadb"
      -e 'MYSQL_ROOT_PASSWORD'='mySQL.Root'
      -e 'MYSQL_DATABASE'='speedtest_tracker'
      -e 'MYSQL_USER'='speedtest'
      -e 'MYSQL_PASSWORD'='speedtest.DB'
      -e 'REMOTE_SQL'='http://URL1/your.sql,https://URL2/your.sql'
      -e 'PUID'='99'
      -e 'PGID'='100'
      -e 'UMASK'='022'
      -l net.unraid.docker.managed=dockerman
      -l net.unraid.docker.icon='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mariadb-logo.png'
      -p '3306:3306/tcp'
      -v '/mnt/user/appdata/mariadb':'/config':'rw' 'lscr.io/linuxserver/mariadb'

    b79dac9b15ed29de5d70028a2a0254653bd13e9fd6924803196ec4b0aa5da554

     

    Here is my speedtest-tracker container:

     

    docker run
      -d
      --name='speedtest-tracker'
      --net='bridge'
      -e TZ="America/New_York"
      -e HOST_OS="Unraid"
      -e HOST_HOSTNAME="NucBerthaPlus"
      -e HOST_CONTAINERNAME="speedtest-tracker"
      -e 'PUID'='1000'
      -e 'PGID'='1000'
      -e 'DB_CONNECTION'='mysql'
      -e 'DB_HOST'='mariadb'
      -e 'DB_PORT'='3306'
      -e 'DB_DATABASE'='speedtest_tracker'
      -e 'DB_USERNAME'='speedtest'
      -e 'DB_PASSWORD'='speedtest.DB'
      -e 'APP_KEY'=''
      -l net.unraid.docker.managed=dockerman
      -l net.unraid.docker.webui='https://[IP]:[PORT:443]/'
      -l net.unraid.docker.icon='https://raw.githubusercontent.com/devzwf/unraid-docker-templates/main/images/speedtest-tracker-icon.png'
      -p '9443:443/tcp'
      -v '/mnt/user/appdata/speedtest-tracker':'/config':'rw' 'ghcr.io/alexjustesen/speedtest-tracker:latest'

    52ebcb52520f00856adc80ac39787169bdf43f38c7f77ec1f8be59840db218f8

     

    speedtest-tracker log ends in this:

     

    In Connection.php line 822:
                                                                                   
      SQLSTATE[HY000] [2002] Connection refused (Connection: mysql, SQL: select t  
      able_name as `name`, (data_length + index_length) as `size`, table_comment   
      as `comment`, engine as `engine`, table_collation as `collation` from infor  
      mation_schema.tables where table_schema = 'speedtest_tracker' and table_typ  
      e = 'BASE TABLE' order by table_name)                                        
                                                                                   

    In Connector.php line 65:
                                                 
      SQLSTATE[HY000] [2002] Connection refused 

     

    What am I missing?

     

    Thanks for the help.

     

     

    Dennis

  11. I have successfully installed BigSur several times on more than one UnRaid instance.  I have edited the VM instance so that only the BigSur, recovery, and EFI show on the opencore boot screen. 
     

    How do I get it to automatically boot BigSur after a timeout?

     

    Next question is how do you completely remove a VM?  I tried to install Monterey but had issues.  I have deleted domains, appdata for Monterey, but still it shows up in the list of VMs.  Selecting remove with files, just spins.  What places do I  have to touch to get rid of it?

     

    Thanks for the help.

     

     

    Dennis

  12. On 10/25/2019 at 4:12 PM, SpaceInvaderOne said:

    09 Dec 2020

     

    Basic usage instructions.

     

    Macinabox needs the following other apps to be installed.

    CA User Scripts (macinabox will inject a user script. This is what fixes the xml after edits made in the Unraid VM manager)

    Custom VM icons  (install this if you want the custom icons for macOS in your vm)

     

    Install the new macinabox.

     

    1. In the template select the OS which you want to install

    2. Choose auto (default) or manual install. (manual install will just put the install media and opencore into your iso share)

    3. Choose a vdisk size for the vm

    4. In VM Images: Here you must put the VM image location  (this path will put the vdisk in for the vm)

    5. In VM Images again : re enter the same location  as above. Here its stored as a variable. This will be used when macinabox generate the xml template.

    6. In Isos Share Location: Here you must put the location of your iso share. Macinabox will put named install media and opencore here.

    7. In Isos Share Location Again: Again this must be the same as above. Here its stored as a variable. Macinabox will use this when it genarates the template.

    8. Download method. Leave as default unless for some reason method 1 doesnt work

    9. Run mode. Choose between macinabox_with_virtmanager or virtmanager only.

     

    ( When I started rewriting macinabox i was going to only use virtmanager to make changes to the xml. However I thought it much easier and better to be able to use the Unraid vm manager to add a gpu cores ram etc, then have macinabox fix the xml afterwards.

    I deceided to leave vitmanager in anyway, in case its needed. For example there is a bug in Unraid 6.9.beta (including beta 35.) When you have any vm that uses vnc graphics then you change that to a passed through gpu it adds the gpu as a second gpu leaving the vnc in place.  This was also a major reason i left virtmanger in macinabox. For situations like this its nice to have another tool. I show all of this in the video guide. )

     

    After the container starts it will download the install media and put it in the iso share. Big Sur seems to take alot longer than the other macOS versions. So to know when its finished goto userscripts and run the macinabox notify script (in background) a message will pop up on the unraid webui when its finished.

     

    At this point you can run the macinabox helper script. It will check to see if there is a new autoinstall ready to install then it will install the custom xml template into the VM tab.

    Goto the vm tab now and run the vm

    This will boot up into the Opencore bootloader and then the install media.

    Install macOS as normal.

     

    After install you can change the vm in the Unraid VM Manager. Add cores ram gpu etc if you want.

    Then go back to the macinabox helper script. Put in the name of the vm at the top of the script and then run the script.

    It will add back all the custom xml to the vm and its ready to run.

     

    Hope you guys like this new macinabox


    What version of OpenCore Configurator is used in the YouTube.  
     

    Looks like the version of open core used is 78 from the picker screen. 

     

    This a bit dated.  Looking forward to your update. 
     

    Dennis

  13. I don't have any database running on UnRaid now.

     

    Can someone give a quick "do this, then this" to get Speedtest Tracker to run again.

     

    I have completely removed the version that was working using sqllite.

     

    I prefer mySQL/MariaDB.  I worked with it some many, many moons ago.

     

    Thanks

     

  14. On 9/28/2023 at 10:05 AM, DWomack said:

     

    How in Docker on Unraid do I completely start over after stopping the current container.  Does removing a container also remove its associated app data?

     

    Sorry, I am new to this.

     

     

    Dennis

    Removed the container and the appdata.

     

    Re installed the container and the container runs as expected.

  15. On 9/26/2023 at 3:55 PM, PeteAsking said:

     

    I believe you can export site function from your config so you would do this process so you can readopt the AP's.

    https://lazyadmin.nl/home-network/migrate-unifi-controller/

     

    I havent had to do it but this process seems logical to me.

     

    When deploying via unraid the tag you use will be like this format: lscr.io/linuxserver/unifi-controller:version-7.4.162

     

    Please backup your docker images with : Appdata Backup plugin.

     

    Kind regards,
    Pete

     

    How in Docker on Unraid do I completely start over after stopping the current container.  Does removing a container also remove its associated app data?

     

    Sorry, I am new to this.

     

     

    Dennis

  16. @PeteAsking I am new to docker and to docker on UnRaid, so I have have questions.  I have 7.4.162 running on Ubuntu 22.04 and have been running it to manage my UniFi APs.  They are behind an Untangle router.  To future proof my network I thought I would move the function of the UniFi Contoller into UnRaid. 
    So the question is… when I install the UniFi Controller in UnRaid it opens a settings page and the image is ……:latest.   What do I change that to? 7.4.162?
    Once that is running how do I migrate the APs from one controller to the other?

    Tell the first to forget them, and reset each AP with a paper clip?

    This whole adoption thing seems kind of dodgy. 
    Sorry for being so dense.   I started with a Cloud Key about 5 years ago.  Moved to UniFi Controller on a Raspberry Pi.. Then moved to a Ubuntu 22.04 box.  Each change was less than easy.  I hope this move to docker is a step toward future proof. 
     

    Dennis
     

  17. Thanks for your reply.  
     

    The enclosure only had one standoff installed and it couldn’t accept a screw.  I printed out a full size template of the motherboard to make sure I got the right standoffs installed.  
     

    Since it is a server motherboard it has an RJ45 for ipmi. That worked.  Then there are four RJ45 for lan.  Sorry to say, but I had not plugged the lan back into the right one.  

    I complicated the process by resetting the BIOS to optimized.  Then I had to mess with the boot options and finally getting it to boot EFI from the the USB flash.  
     

    So now it boots sans disks.  I’ll shut it down again and reconnect all the drives.  Things should come right back. 
     

    Hope this helps others. 

     

  18. X9DRi-LN4F+
    System has been running for about 6 months. Has been updated to latest UnRaid as they have come out.  More or less vanilla file server with one docker app running. 
    I finally broke down and moved the motherboard from the open into  Fractal Design 7XL. 
    ipmi works… can power system up and down and reset. 
    Main network no longer works.  During the boot process, first the main lan socket led blinks, and a little later both leds are on.   When the booting process has completed and the console is waiting on login.  Both of the lights are off and the console says no ip4 and no ip6. 
    The main lan is not pingable. 
    The array is configured to not start automatically. 
    The only thing plugged into a motherboard slot is an HBA.  It has been moved from the slot where it originally was for convenience. 
     

    What’s the best was to troubleshoot this?  Disconnect the drives and use an older USB flash that worked in the past when originally testing the motherboard?

     

    Could the HBA be interfering with the network driver.?

     

    Thanks for any pointers.  The array is 45TB with about 27TB used. 
     

  19. One slight modification...

     

    Right now if you run a script in the background, it creates a log for you to download.

     

    The log is named log.zip.

     

    If you could add time stamp to the log name it would be much appreciated.

     

    Thank you!

     

     

    Dennis

     

×
×
  • Create New...