XEN: Difference between revisions

From Braindump
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 25: Line 25:
  grub-set-default "$(grep ^menuentry /boot/grub/grub.cfg | grep Xen | cut -d \' -f 2 | head -1)"
  grub-set-default "$(grep ^menuentry /boot/grub/grub.cfg | grep Xen | cut -d \' -f 2 | head -1)"


efibootmgr -c -d /dev/sda -p 1 -l /EFI/boot/xen.efi -L "XEN"


https://xcp-ng.org/docs/architecture.html#api
efibootmgr -o 2,0,4


https://ownyourbits.com/2018/06/13/transparently-running-binaries-from-any-architecture-in-linux-with-qemu-and-binfmt_misc/
https://wiki.xenproject.org/wiki/Xen_EFI


export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf
https://wiki.archlinux.org/title/xen


/etc/qemu-binfmt.conf
EXTRA_OPTS="-L /usr/arm-linux-gnueabihf"


export CROSS_COMPILE=arm-linux-gnueabi-
https://xcp-ng.org/docs/architecture.html#api
make defconfig
make menuconfig
make
 
qemu-system-arm -curses -machine virt -bios u-boot.bin


PCI passthrough was indeed necessary for the software I'm using to pick up all network traffic properly (not bridging through the virtual switch). Doing so requires enabling IOMMU and using the legacy linux bridge backend networking (instead of the default Open vSwitch backend networking).
PCI passthrough was indeed necessary for the software I'm using to pick up all network traffic properly (not bridging through the virtual switch). Doing so requires enabling IOMMU and using the legacy linux bridge backend networking (instead of the default Open vSwitch backend networking).
Line 60: Line 54:


  device_model_stubdomain_override
  device_model_stubdomain_override
=== QEMU ===
qemu-system-mips64 -cpu 24Kc -serial pty -nographic -monitor none -no-reboot -bios u-boot.bin

Latest revision as of 10:50, 2 June 2024

https://wiki.alpinelinux.org/wiki/Xen_Dom0

setup-xen-dom0
apk add xen-hypervisor
apk add bridge
apk add seabios ovmf
echo "xen-netback" >> /etc/modules
echo "xen-blkback" >> /etc/modules
echo "tun" >> /etc/modules
rc-update add xenconsoled
rc-update add xendomains
rc-update add xenqemu
rc-update add xenstored

Contents of /etc/default/grub

GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=1024M,max:1024M" GRUB_DEFAULT="saved" GRUB_SAVEDEFAULT="true"
grub-mkconfig -o /boot/grub/grub.cfg
grub-set-default "$(grep ^menuentry /boot/grub/grub.cfg | grep Xen | cut -d \' -f 2 | head -1)"

efibootmgr -c -d /dev/sda -p 1 -l /EFI/boot/xen.efi -L "XEN"

efibootmgr -o 2,0,4

https://wiki.xenproject.org/wiki/Xen_EFI

https://wiki.archlinux.org/title/xen


https://xcp-ng.org/docs/architecture.html#api

PCI passthrough was indeed necessary for the software I'm using to pick up all network traffic properly (not bridging through the virtual switch). Doing so requires enabling IOMMU and using the legacy linux bridge backend networking (instead of the default Open vSwitch backend networking).

xl network-list opnsense
Idx BE Mac Addr. handle state evt-ch tx-/rx-ring-ref BE-path 
0 0 00:16:3e:3f:4f:61 0 5 -1 -1/-1 /local/domain/0/backend/vif/11/0

https://xenbits.xen.org/docs/4.15-testing/man/xl-network-configuration.5.html

https://wiki.xenproject.org/wiki/Device_Model_Stub_Domains

type=ioemu
vifspec
model=e1000
rate=10Gb/s
vif = ['bridge=lan,model=e1000,rate=10Gb/s']
device_model_stubdomain_override