Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to start Alpine Linux following the guide on the website, also a question about the use of physical hard disks #193

Open
ghost opened this issue Aug 2, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 2, 2020

I have replicated the instructions used for the Ubuntu installer, but for Alpine Linux.

Here is the file that I have used as my script to start the installer:

#!/bin/sh
KERNEL="boot/vmlinuz-lts" 
INITRD="boot/initramfs-lts" # these kernel and initrd files come from an extracted Alpine Linux iso.

CMDLINE="earlyprintk=serial console=ttyS0 acpi=off" 
MEM="-m 1G"

#SMP="-c 2"

#NET="-s 2:0,virtio-net" 
IMG_CD="-s 3,ahci-cd,iso.iso" # iso.iso is a stock Alpine Linux x86_64 iso.
IMG_HDD="-s 4,virtio-blk,/dev/disk2" # /dev/disk2 is a real USB external hard drive.
PCI_DEV="-s 0:0,hostbridge -s 31,lpc" 
LPC_DEV="-l com1,stdio" 

xhyve $MEM $SMP $PCI_DEV $LPC_DEV $IMG_CD $IMG_HDD -f kexec,$KERNEL,$INITRD,"$CMDLINE"

I didn't know how to make the physical drive accessible running it as a regular user, so I ran it as root (this is probably a bad idea)

The result is this:

% sudo ./vm.sh
Password:
vm exit[0]
          	reason		VMX
                                   	rip		0x000000000009e019
                                                                          	inst_length	3
                 	status		0
                                         	exit_reason	33
                                                                  	qualification	0x0000000000000000
                          	inst_type		0
                                                         	inst_error	0
                                                                               ./vm.sh: line 14: 14209 Abort trap: 6 

I checked the intel manual and exit reason 33 is "VM-entry failure due to invalid guest state." I looked at the list of entry checks that are performed, and while many of them are above my level of understanding, a lot of them have to do with execution privilege, which makes me think that I should run as a non-privileged user. So I remove $IMG_HDD from my shell script, and I run without sudo and get the exact same error.

This leaves me with some questions:

  • Is it a problem with my specific parameters, or a problem with Alpine Linux's kernel itself?
  • If I want to genuinely go about using a real hard drive, what is the proper way to pass it through to the VM?
@wiredfool
Copy link

This happens with a stock Ubuntu 20.04 5.4.0-generic kernel as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant