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

Install Ubuntu 18 by netinstall is good, but boot from virtio_blk vda hang #161

Open
huataihuang opened this issue Feb 1, 2019 · 3 comments

Comments

@huataihuang
Copy link

huataihuang commented Feb 1, 2019

macOS Mojave 10.14.3

Install xhyve by source:

git clone https://github.com/machyve/xhyve.git
cd xhyve
make

I don't known why I can run xhyve in build/Release/ directory (as README.md use xcodebuild), but I found I can use make to get right xhyve

Have try install Ubuntu 18 by ubuntu-18.04.1.0-live-server-amd64.iso, FAILED. Becuase when installation, it always can not read from CDROM.

I have test Ubuntu 18 can install through netinstall. The Installation is very smoothly, and Install finish successed.

Use following run.sh to start ubuntu 18 vm:

#!/bin/bash
KERNEL="boot/vmlinuz-4.18.0-13-generic"
INITRD="boot/initrd.img-4.18.0-13-generic"
CMDLINE="earlyprintk=serial console=ttyS0 acpi=off root=/dev/vda1 ro"
UUID="-U 8e7af180-c54d-4aa2-9bef-59d94a1ac572" # A UUID will ensure we get a consistent ip address assigned
# Guest Config
CPU="-c 2"
MEM="-m 2G"
PCI_DEV="-s 0:0,hostbridge -s 31,lpc"
NET="-s 2:0,virtio-net,en0"
IMG_HDD="-s 4:0,virtio-blk,ubuntu18.img"
LPC_DEV="-l com1,stdio"
ACPI="-A"

# and now run
sudo /Users/huatai/github/xhyve/build/xhyve $UUID $ACPI $CPU $MEM $PCI_DEV $LPC_DEV $NET $IMG_HDD -f kexec,$KERNEL,$INITRD,"$CMDLINE"

It will hang after virtio_blk load, so can't read from vda, and system hang.

Loading, please wait...
starting version 239
[    1.279051] virtio_blk virtio1: [vda] 33554432 512-byte logical blocks (17.2 GB/16.0 GiB)
[    1.283750] do_IRQ: 1.36 No irq handler for vector
[    1.311586] virtio_net virtio0 enp0s2: renamed from eth0
Unhandled ps2 mouse command 0xe1
                                Unhandled ps2 mouse command 0x0a
                                                                Unhandled ps2 mouse command 0x01
                                                                                                Unhandled ps2 mouse command 0x41
                                                                                                                                Unhandled ps2 mouse command 0x88
                                                                                                                                                                [    2.540776] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input2
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... [  121.872352] raid6: sse2x1   gen()  9198 MB/s
[  121.920074] raid6: sse2x1   xor()  7801 MB/s
[  121.968921] raid6: sse2x2   gen() 15423 MB/s
[  122.016271] raid6: sse2x2   xor() 10490 MB/s
[  122.064677] raid6: sse2x4   gen() 18932 MB/s
[  122.112209] raid6: sse2x4   xor() 11337 MB/s
[  122.160278] raid6: avx2x1   gen() 26416 MB/s
[  122.208192] raid6: avx2x1   xor() 18559 MB/s
[  122.256978] raid6: avx2x2   gen() 32151 MB/s
[  122.304832] raid6: avx2x2   xor() 20180 MB/s
[  122.352862] raid6: avx2x4   gen() 36636 MB/s
[  122.400897] raid6: avx2x4   xor() 21725 MB/s
[  122.401551] raid6: using algorithm avx2x4 gen() 36636 MB/s
[  122.402360] raid6: .... xor() 21725 MB/s, rmw enabled
[  122.403106] raid6: using avx2x2 recovery algorithm
[  122.406308] xor: automatically using best checksumming function   avx
[  122.419109] Btrfs loaded, crc32c=crc32c-intel
Scanning for Btrfs filesystems
[  242.660441] INFO: task systemd-udevd:157 blocked for more than 120 seconds.
[  242.662965]       Not tainted 4.18.0-13-generic #14-Ubuntu
[  242.664747] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[  242.666721] systemd-udevd   D    0   157    142 0x80000004
[  242.667982] Call Trace:
[  242.668573]  __schedule+0x29e/0x840
[  242.669306]  schedule+0x2c/0x80
[  242.669965]  io_schedule+0x16/0x40
[  242.670681]  do_read_cache_page+0x3c5/0x5b0
[  242.671552]  ? blkdev_writepages+0x10/0x10
[  242.672384]  ? page_cache_tree_insert+0xe0/0xe0
[  242.673282]  read_cache_page+0x15/0x20
[  242.674018]  read_dev_sector+0x2d/0xd0
[  242.674750]  read_lba+0xcd/0x220
[  242.675382]  ? find_valid_gpt+0xd1/0x560
[  242.676178]  find_valid_gpt+0xf1/0x560
[  242.676908]  efi_partition+0x89/0x3a3
[  242.677634]  ? snprintf+0x49/0x60
[  242.678282]  ? find_valid_gpt+0x560/0x560
[  242.679063]  check_partition+0x139/0x236
[  242.679924]  rescan_partitions+0xaf/0x290
[  242.680813]  ? down_write+0x12/0x40
[  242.681604]  __blkdev_get+0x367/0x500
[  242.682438]  blkdev_get+0x10c/0x330
[  242.683230]  ? unlock_new_inode+0x4d/0x60
[  242.684154]  ? bdget+0x110/0x130
[  242.684918]  __device_add_disk+0x392/0x430
[  242.685699]  device_add_disk+0x13/0x20
[  242.686508]  virtblk_probe+0x4ca/0x6d2 [virtio_blk]
[  242.687447]  virtio_dev_probe+0x172/0x230
[  242.688227]  driver_probe_device+0x2e3/0x460
[  242.689470]  __driver_attach+0xe4/0x110
[  242.690441]  ? driver_probe_device+0x460/0x460
[  242.691411]  bus_for_each_dev+0x74/0xb0
[  242.692198]  ? kmem_cache_alloc_trace+0x1c4/0x1d0
[  242.693128]  driver_attach+0x1e/0x20
[  242.693812]  bus_add_driver+0x159/0x230
[  242.694545]  ? 0xffffffffc009d000
[  242.695197]  driver_register+0x70/0xc0
[  242.695920]  ? 0xffffffffc009d000
[  242.696606]  register_virtio_driver+0x20/0x30
[  242.697448]  init+0x56/0x1000 [virtio_blk]
[  242.698233]  do_one_initcall+0x4a/0x1c4
[  242.698976]  ? free_pcp_prepare+0x4f/0xd0
[  242.699741]  ? _cond_resched+0x1all_64+0x5a/0x110
[  242.707146]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  242.708088] RIP: 0033:0x7f6dae3b1219
[  242.708823] Code: Bad RIP value.
[  242.709474] RSP: 002b:00007ffd3fa55c08 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[  242.710918] RAX: ffffffffffffffda RBX: 00005600d06447a0 RCX: 00007f6dae3b1219
[  242.712361] RDX: 0000000000000000 RSI: 00007f6dae295cad RDI: 0000000000000005
[  242.713844] RBP: 00007f6dae295cad R08: 0000000000000000 R09: 00005600d062ea70
[  242.715257] R10: 0000000000000005 R11: 0000000000000246 R12: 0000000000000000
[  242.716621] R13: 00005600d0642240 R14: 0000000000020000 R15: 00005600d06447a0
@John-K
Copy link

John-K commented Feb 6, 2019

I was able to reproduce this using your commandline.
It worked for me after removing "acpi=off" from CMDLINE.

Can you see if this solves it for you as well?

@huataihuang
Copy link
Author

Thank you. @John-K

Boot ubuntu 18.04.1 success by removing "acpi=off" from CMDLINE, it works well.

@dsalnikov
Copy link

@John-K , @huataihuang could you give more details on what images you've done to get it working?

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

3 participants