You are not logged in.
Hello,
I am trying to boot a Linux guest on the KVM host and guest root file system is outside of guest on the host and passed through into the guest via P9 share as described at:
https://serverfault.com/questions/67364 … t-and-qemu
QEMU Arguments in AQEMU:
/usr/bin/qemu-system-x86_64 \
-monitor stdio \
-k en-us \
-machine accel=kvm \
-m 1024 \
-cdrom /download/sysresccd-5.2.0_zfs_0.7.9.iso \
-virtfs local,id=shared_folder_dev_0,path=/mnt/ascii64,security_model=none,mount_tag=shared0 \
-boot once=d,menu=off \
-net nic,vlan=0,model=e1000 \
-net user,vlan=0 \
-kernel /boot/vmlinuz-4.9.0-9-amd64 \
-initrd /boot/initrd.img-4.9.0-9-amd64 \
-append root=root9p rw rootfstype=9p rootflags=trans=virtio vga=0x31b \
-rtc base=utc \
-name "Brave" \
-fsdev local,id=root9p,path=/mnt/ascii64,security_model=mapped \
-device virtio-9p-pci,fsdev=root9p,mount_tag=root9p
Screenshot:
https://ibin.co/4mbruKyIIoAl.jpg
I tried to change guest kernels, but it does not help.
Please suggest, what shall be tried for a fix?
Offline
From the image I see when it attempts to boot the guest, it fails to find LVM and subsequently fsck. This could be the result of incorrectly set permissions on the root-fs of the guest. I also notice, from your command, that the virtfs has a security_model as none, whereas fsdev has mapped. This might be the cause of the mismatch. (notice emphasis, I don't know enough about KVM to tell for sure)
Online
For a guest p9 root FS I used a catalog on the host with a debootstrapped Devuan into it, it worked fine in chroot, but I have never tried it as a full virtual machine with its own boot, kernel and init.
May be, I shall try to just install Devuan into KVM guest from a setup CD at first or at least to try guest Devuan work in Virtualbox by placing the kernel inside the guest, then try to reproduce this on KVM?
Last edited by alupoj (2019-07-05 19:47:23)
Offline
I don't understand this error message:
run init: /sbin/init: Too many symbolic links encountered
It might make sense in the context of a Debian system where /sbin/init is a symlink to systemd (hence my suggestion in the fdn thread) but not for Devuan.
Is sysvinit-core installed?
Brianna Ghey — Rest In Power
Offline
That message might mean you have a symlink loop, eg file a is a symlink to file b, which is a symlink to file a. Try ls -ld /sbin/init to see if it's a symlink to somewhere. If not try searching for a loop in /etc/rc?.d/ (I don't think a hanging symlink would cause this problem).
Chris
Offline
Well, I have installed Devuan Ascii from scratch into KVM VM and was able to run it with external kernel supplied as a qemu parameter.
Though I did not try 9P root anymore because 9P host FS sharing seems to be insecure in terms of possibility of escaping to host FS when using passthrough security model even with a FS proxy. I think it is more secure to use a passthrough of a host block device into guest, so I did this using host ZFS zvol + ext3 and it works fine, I can mount it from both host (when needed for maintenance or fast fixes) and from guest.
Now going to customize Heads Linux as a secure guest for surfing and chatting in the Internet.
Where can I get grsec kernel with patches to Spectre issue?
It seems such kernel sources have been removed from public though earlier they were available for public.
Last edited by alupoj (2019-07-15 03:56:51)
Offline