Closed gogo9th closed 7 years ago
When I boot Linux 4.4.0-92-generic XEN 4.6-amd64 hypervisor, I get the warning:
WARNING: no console will be available to OS Loading Linux 4.4.0-92-generic ... Loading initial ramdisk ...
Then, after 10 seconds, the whole texts above get shifted to some random location on the screen and I get two horizontal rainbow lines on the screen.
Here are more updates. Apparently, XEN 4.9 started servicing EFI boot with GRUB2: https://wiki.xenproject.org/wiki/Xen_Project_4.9_Feature_List
But if I install xen with apt install, its version is 4.8. So I downloaded XEN source code from here: https://xenproject.org/downloads/xen-archives/xen-project-49-series/xen-project-490.html
and installed XEN following this tutorial: https://mhsamsal.wordpress.com/2013/12/05/configuring-virtual-tpm-vtpm-for-xen-4-3-guest-virtual-machines/
However, when I run XEN 4.9, I still get exactly the same message as before:
Loading Xen 4.9.0 ... WARNING: no console will be available to OS Loading Linux 4.4.0-92-generic ... Loading initial ramdisk ...
Could anybody please try running XEN 4.9 on Minnowboard? Please help me out...!
I've never tried myself but when googling for possible hints I saw someone who mentionned he was struggling with the initramfs and ended up removing that from the OS he was trying to boot.
Thanks and I finally found the solution.
vTPM Tutorial: https://mhsamsal.wordpress.com/2013/12/05/configuring-virtual-tpm-vtpm-for-xen-4-3-guest-virtual-machines/
Xen 4.9 Source Code: https://www.xenproject.org/downloads/xen-archives/xen-project-49-series/xen-project-490/351-xen-490
Ubuntu XEN Tutorial: https://help.ubuntu.com/community/Xen
[XEN Source Code Installation]
$ sudo apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif texinfo pciutils-dev mercurial build-essential make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev bison flex xz-utils ocaml-findlib gcc-multilib checkpolicy libglib2.0-dev g++-multilib liblzma-dev libpixman-1-dev libaio-dev libyajl-dev pandoc markdown
$ sudo apt-get install texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended
Modify: "Config.mk" XSM_ENABLE ?=y FLASK_ENABLE ?=y
Modify: "tools/test/xenstore/xs-test.c" int a; a = asprint(...)
$ sudo make xen
$ sudo ./configure
$ cd tools
$ sudo ./configure
$ cd ..
$ sudo make tools
$ sudo make stubdom
$ cd stubdom
$ sudo make
$ cd ..
$ sudo make install-xen
$ sudo make install-tools PYTHON_PREFIX_ARG=
$ sudo make install-stubdom
$ sudo make -C tools/flask/policy
$ sudo ldconfig # To update XEN’s .so libraries
$ sudo cp dist/install/usr/lib64/efi/xen /boot # !!! Otherwise, UEFI can’t start xen
$ sudo chmod 744 dist/install/usr/lib64/efi/xen
$ sudo cp dist/install/usr/lib64/efi/xen* /boot # !!! Without this .efi, UEFI can’t start xen
$ sudo update-grub
$ ls /boot | grep xen # Check if xen.gz & xen.efi exist
$ ls /usr/local/lib/xen/boot/vtpmmgr-stubdom.gz # Check if this exists
$ ls /usr/local/lib/xen/boot/vtpm-stubdom.gz # Checi if this exists
Modify: “/etc/xen/xend-config.sxp” … (xend-unix-server yes) …
[Botting xen.efi directly with UEFI]
$ sudo mkdir /boot/efi/EFI/xen $ sudo cp /boot/vmlinuz /boot/efi/EFI/xen $ sudo cp /boot/initr /boot/efi/EFI/xen/ $ sudo cp /boot/xen-4.9.0.efi /boot/efi/EFI/xen
Create: "/boot/efi/EFI/xen/xen-4.9.0.cfg" [ubuntu] options=console=vga,com1 com1=115200,8n1 iommu=verbose ucode=scan conring_size=2097152 loglvl=all flask=enforcing flask_enforcing=1 flask_enabled=1 kernel=vmlinuz-4.8.0-41-generic root=UUID=3f1e35fb-9907-48d1-b621-42369d5ad88f ro quiet vt.handoff=7 console=hvc0 flask_enforcing=1 flask_enabled=1 ramdisk=initrd.img-4.8.0-41-generic
//vmlinuz, initrd version should be your own kernel version. UUID should be your kernel's root partition's UUID. Check these values from "cat /proc/cmdline".
//This specifies the location of xen.efi. In this case, the EFI partition is in /dev/sda1, first partition, and xen.efi is under /boot/efi/EFI/xen directory.
$ sudo efibootmgr -w -L Xen -d /dev/sda1 -p 1 -l "\EFI\Xen\xen.efi" -c
Create: “/etc/network/interfaces-xen” -------- auto lo eth0 xenbr0 iface lo inet loopback
iface xenbr0 inet dhcp bridge_ports eth0
iface eth0 inet manual
[Start XEN] $ sudo reboot
$ sudo /etc/init.d/xencommons start
$ sudo /etc/init.d/xendomains start
$ sudo /etc/init.d/xen-watchdog start
$ sudo /etc/init.d/xendriverdomain start
$ sudo xl list # Check if DOM0 is running
$ cat /proc/xen/capabilities # Check if the output is “control_d”
$ sudo cp /etc/network/interfaces-xen /etc/network/interfaces $ sudo service network-manager stop $ sudo ifdown eth0 && sudo ifup xenbr0 && sudo ifup eth0
[Start Guest VM] $ sudo dd if=/dev/zero of=/home/rootfs.img bs=1024k count=5000
// Download official ubuntu-17.04-desktop-amd64.iso in /home directory
Create: “~/Desktop/ubuntu-hvm.cfg” ------------------- builder = "hvm" name = "ubuntu-hvm" memory = "512" vcpus = 1 vif = [''] disk = ['phy:/home/rootfs.img,w','file:/home/ubuntu-17.04-desktop-amd64.iso,hdc:cdrom,r'] vnc = 1 boot="dc" # Disk-Cdrom order
$ sudo xl create ubuntu-hvm.cfg # launch guest VM $ sudo vncviewer localhost:0 # connect to the console
$ sudo xl pause ubuntu-hvm # snapshot guest VM $ sudo xl unpause ubuntu-hvm # resume guest VM
$ sudo xl destroy ubuntu-hvm # delete guest VM
Thanks for sharing your successful steps!!
Thx all. Closing this one up.
Hi,
I installed XEN 4.8 on Minnowboard (sudo apt install xen-hypervisor-amd64), but DOM0 kernel images based on XEN hypervisor don't boot up at all. Does anyone have the same issue? Is Minnowboard incopatible with Minnowboard? Please share with me any clue... Thanks!