XAMPP Hyperkit - Start Processes from Terminal

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

XAMPP Hyperkit - Start Processes from Terminal

Postby jcrystal44 » 15. December 2020 03:09

Hello all.

I'm looking to start my XAMPP instance (and associated services) from the terminal, rather than the Launcher GUI. This opens up options for automating various processes.

By looking at process logs, I was able to determine that this is what is being run when XAMPP starts:
Code: Select all
sudo /Users/username/.bitnami/stackman/helpers/hyperkit -A -H -U ED35CC5E-89C8-41EF-BEDF-2602883D6B51 -c 1 -m 1024M -s 0:0,hostbridge -s 31,lpc -l "com1,autopty=/Users/username/.bitnami/stackman/machines/xampp/tmp/tty,log=/Users/username/.bitnami/stackman/machines/xampp/log/boot.log" -s 2:0,virtio-net -F /Users/username/.bitnami/stackman/machines/xampp/tmp/machine.pid -s "4:0,virtio-blk,file:///Users/username/.bitnami/stackman/machines/xampp/vm/machine.qcow2?sync=os&buffered=1,format=qcow,qcow-config=discard=true;compact_after_unmaps=0;keep_erased=0;runtime_asserts=false" -f "kexec,/Users/username/.bitnami/stackman/machines/xampp/vm/vmlinuz,/Users/username/.bitnami/stackman/machines/xampp/vm/initrd.img,earlyprintk=serial" console=ttyS0 root=/dev/vda1


When I run that externally, I get in stdout:
Code: Select all
mirage_block_open: block_config = file:///Users/username/.bitnami/stackman/machines/xampp/vm/machine.qcow2?sync=os&buffered=1 and qcow_config = discard=true;compact_after_unmaps=0;keep_erased=0;runtime_asserts=false and stats_config = None
hyperkit: [INFO] Resized file to 228247 clusters (29215616 sectors)
hyperkit: [INFO] image has 0 free sectors and 228244 used sectors
mirage_block_open: block_config = file:///Users/username/.bitnami/stackman/machines/xampp/vm/machine.qcow2?sync=os&buffered=1 and qcow_config = discard=true;compact_after_unmaps=0;keep_erased=0;runtime_asserts=false and stats_config = None returning 0
mirage_block_stat
linkname /Users/username/.bitnami/stackman/machines/xampp/tmp/tty
COM1 connected to /dev/ttys004
COM1 linked to /Users/username/.bitnami/stackman/machines/xampp/tmp/tty
rdmsr to register 0x64e on vcpu 0
rdmsr to register 0x34 on vcpu 0


And in boot.log:
Code: Select all
[    0.000000] Linux version 4.9.0-11-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) ) #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11)
[    0.000000] Command line: earlyprintk=serial
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003fffffff] usable
[    0.000000] bootconsole [earlyser0] enabled
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 2.6 present.
[    0.000000] e820: last_pfn = 0x40000 max_arch_pfn = 0x400000000
[    0.000000] MTRR: Disabled
[    0.000000] x86/PAT: MTRRs disabled, skipping PAT initialization too.
[    0.000000] CPU MTRRs all blank - virtualized system.
[    0.000000] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC 
Memory KASLR using RDRAND RDTSC...
[    0.000000] found SMP MP-table at [mem 0x000f0000-0x000f000f] mapped at [ffff8b40400f0000]
[    0.000000] Using GB pages for direct mapping
[    0.000000] RAMDISK: [mem 0x3ef47000-0x3fffffff]
[    0.000000] ACPI: Early table checksum verification disabled
[    0.000000] ACPI: RSDP 0x00000000000F2400 000024 (v02 BHYVE )
[    0.000000] ACPI: XSDT 0x00000000000F2480 000044 (v01 BHYVE  BVXSDT   00000001 INTL 20140828)
[    0.000000] ACPI: APIC 0x00000000000F2500 00005A (v01 BHYVE  BVMADT   00000001 INTL 20140828)
[    0.000000] ACPI: FACP 0x00000000000F2A00 00010C (v05 BHYVE  BVFACP   00000001 INTL 20140828)
[    0.000000] ACPI: DSDT 0x00000000000F2C00 000A2D (v02 BHYVE  BVDSDT   00000001 INTL 20140828)
[    0.000000] ACPI: FACS 0x00000000000F2BC0 000040
[    0.000000] ACPI: FACS 0x00000000000F2BC0 000040
[    0.000000] ACPI: HPET 0x00000000000F2B40 000038 (v01 BHYVE  BVHPET   00000001 INTL 20140828)
[    0.000000] ACPI: MCFG 0x00000000000F2B80 00003C (v01 BHYVE  BVMCFG   00000001 INTL 20140828)
[    0.000000] Setting APIC routing to physical flat.
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at [mem 0x0000000000000000-0x000000003fffffff]
[    0.000000] NODE_DATA(0) allocated [mem 0x3ef42000-0x3ef46fff]
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.000000]   DMA32    [mem 0x0000000001000000-0x000000003fffffff]
[    0.000000]   Normal   empty
[    0.000000]   Device   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.000000]   node   0: [mem 0x0000000000100000-0x000000003fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000003fffffff]
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] high edge lint[0x1])
[    0.000000] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x80860701 base: 0xfed00000
[    0.000000] smpboot: Allowing 1 CPUs, 0 hotplug CPUs
[    0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x000fffff]
[    0.000000] e820: [mem 0x40000000-0xffffffff] available for PCI devices
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645519600211568 ns
[    0.000000] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:1 nr_node_ids:1
[    0.000000] percpu: Embedded 35 pages/cpu s105304 r8192 d29864 u2097152
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.  Total pages: 257929
[    0.000000] Policy zone: DMA32
[    0.000000] Kernel command line: earlyprintk=serial
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Memory: 998756K/1048184K available (6288K kernel code, 1162K rwdata, 2880K rodata, 1424K init, 656K bss, 49428K reserved, 0K cma-reserved)
[    0.000000] Kernel/User page tables isolation: enabled
[    0.000000] Hierarchical RCU implementation.
[    0.000000]    Build-time adjustment of leaf fanout to 64.
[    0.000000]    RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=64, nr_cpu_ids=1
[    0.000000] NR_IRQS:33024 nr_irqs:256 16
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [tty0] enabled
[    0.000000] bootconsole [earlyser0] disabled


The 1 big issue is that it doesn't seem to be actually booting the image? Or, at least, I'm not able to determine what IP address the running image has. In the Launcher, it (eventually) indicates an IP in the 192.168.64.x-range. This does not seem to actually activate the network interface on the VM (nor the SSH, MySQL, or Apache services).

Any idea how to get those to run too? Something tells me it's about sending some serial data to /Users/username/.bitnami/stackman/machines/xampp/tmp/tty in some way, but could use some guidance/confirmation. Or, perhaps, it's about writing additional startup info onto the VM (perhaps while it's booted using the Launcher GUI?).

Thanks!

-Jason
jcrystal44
 
Posts: 2
Joined: 01. May 2020 01:38
XAMPP version: 7.4.5
Operating System: OS X 10.15.3

Re: XAMPP Hyperkit - Start Processes from Terminal

Postby Nobbie » 15. December 2020 13:38

Why dont you simply get yourself an used PC from Ebay (mostly any 50$ thing will do it), put a linux distro on it (Linux Mint for example) and finally install and run Xampp on it? That makes life so much easier, you will get the same linux environment as on your MacOS PC, but you dont struggle with VirtualMachines, you dont waste RAM and ROM from your sophisticated OSX machine and you get a real webserver environment?

Finally you can start and stop Xampp quickly and easily on the linux machine, you can set and also retrieve the (W)LAN IP of the Xampp PC easily and all your troubles will disappear. There are plenty of used PCs on Ebay that will do the job.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 20 guests