Unix & Linux Stack Exchange
Q&A for users of Linux, FreeBSD and other Unix-like operating systems
Latest Questions
0
votes
2
answers
2702
views
Change screen resolution of Xenserver Console for a CentOS VM
I need to increase screen resolution to 1024x800 for my XEN console. I tried to place vga=791 at the end of kernel line the file `/boot/grub/grub.conf` but it seems that most of the boot arguments are ignored during startup. Probably inside XenSever /boot is not really used in order to launch CentOS...
I need to increase screen resolution to 1024x800 for my XEN console.
I tried to place
vga=791
at the end of kernel line the file
/boot/grub/grub.conf
but it seems that most of the boot arguments are ignored during startup. Probably inside XenSever /boot is not really used in order to launch CentOS.
I even tried to add boot option in the boot option tab (VM -> Property -> Boot Option) but doesn't work.
Max Cuttins
(153 rep)
Feb 27, 2014, 01:14 PM
• Last activity: Apr 18, 2025, 03:05 AM
1
votes
0
answers
54
views
Xen : How to passthrough AXI device to domU?
I wrote a custom AXI device on a xilinx FPGA on arm64. I can access it when i run my software in baremetalb but I have to use xen and passthrough the range of AXI addresses to use it from domU. My AXI device addresses are from 0x80010000 to 0x8001FFFF I tried to run my domU with this cfg without suc...
I wrote a custom AXI device on a xilinx FPGA on arm64. I can access it when i run my software in baremetalb but I have to use xen and passthrough the range of AXI addresses to use it from domU.
My AXI device addresses are from 0x80010000 to 0x8001FFFF
I tried to run my domU with this cfg without success :
name = "test_soft"
kernel = "soft.bin"
memory = 512
vcpus = 1
iomem = [ "0x80010000,1000" ]
I have this error :
**libxl: error: libxl_create.c:1652:domcreate_launch_dm: Domain 2:failed give domain access to iomem range 80010000-8001FFFF: Operation not permitted**
In my device tree :
mydevice: mydevice@80010000 {
compatible = "test,mydevice";
reg = ;
#stream-id-cells = ;
interrupt-parent = ;
interrupts = ;
xen,passthrough = ;
};
The I/O virtualisation is enabled in xen, smmu is enabled in my kernel.
How can I pass my axi device ?
Thanks for your help
rBeal
(71 rep)
Jan 7, 2025, 03:11 PM
• Last activity: Feb 4, 2025, 11:54 AM
1
votes
1
answers
3961
views
How to deallocate extents of physical volume? lvm, encrypted
I just install Debian 8.1. I allocated almost all disk 300 GiB to encrypted partition and a little bit for boot. I want to make smaller 50GiB encrypted physical volume and install different xen OS to the free space. Is it possible to do it without data loss? How? --- System info: /dev/dm-1 ext4 / /d...
I just install Debian 8.1.
I allocated almost all disk 300 GiB to encrypted partition and a little bit for boot.
I want to make smaller 50GiB encrypted physical volume and install different xen OS to the free space.
Is it possible to do it without data loss? How?
---
System info:
/dev/dm-1 ext4 /
/dev/sda1 ext2 /boot
Files in /dev/mapper:
-
control
- hostname--vg-root
- hostname--vg-swap_1
- sda5_crypt
---
Added the answer to the first comment:
root@X550C:/home/user# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 298.1G 0 disk
├─sda1 8:1 0 243M 0 part /boot
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 297.9G 0 part
└─sda5_crypt 254:0 0 297.9G 0 crypt
├─hostname--vg-root
254:1 0 290.1G 0 lvm /
└─hostname--vg-swap_1
254:2 0 7.8G 0 lvm [SWAP]
sdb 8:16 0 931.5G 0 disk
└─sdb1 8:17 0 931.5G 0 part /media/user/Seagate Backup Plus Drive
sr0 11:0 1 1024M 0 rom
Aby Bun
(11 rep)
Jul 21, 2015, 07:23 AM
• Last activity: Jan 28, 2025, 07:53 PM
7
votes
1
answers
16912
views
What is Dom0 and how can one use it?
I have heard that Xen is now fully included into mainline Linux, and is usable via Dom0. What is Dom0, what is its purpose? How can one use it?
I have heard that Xen is now fully included into mainline Linux, and is usable via Dom0.
What is Dom0, what is its purpose? How can one use it?
orftz
(687 rep)
Jun 4, 2011, 09:27 PM
• Last activity: Oct 9, 2024, 08:49 PM
0
votes
1
answers
603
views
How to create a VM in xcp-ng?
I want to create a VM by using a VM template on xcp-ng 8.2. I was able to do this yesterday but today, the same command isn't working. I'm new to server administration so I want to believe this fix should be relatively easy. I followed this YouTube tutorial [XCP-ng xe CLI creating a VM][1]. This vid...
I want to create a VM by using a VM template on xcp-ng 8.2. I was able to do this yesterday but today, the same command isn't working. I'm new to server administration so I want to believe this fix should be relatively easy.
I followed this YouTube tutorial XCP-ng xe CLI creating a VM . This video, I presume, is based on this article . Yesterday, I hit a snag so I decided to delete everything I created using the tutorial, and start afresh. Now, I'm unable to create the VM using the template although I did that yesterday without any issues. In the tutorial, Rocky Linux was used but I used Ubuntu Focal Fossa yesterday. The SR type is ISO. This is the command I ran yesterday and today:
xe vm-install template="Ubuntu Focal Fossa 20.04" new-name-label="${vm_name}" sr-uuid=${sr_iso_uuid}
The error message I'm getting today is:
You attempted an operation that was not allowed.
reason: Cannot copy a VM's disks to an ISO SR
Yaw
(1 rep)
Jul 9, 2024, 06:55 AM
• Last activity: Jul 9, 2024, 12:32 PM
1
votes
4
answers
1501
views
Not all XEN VMs auto start after reboot of DOM 0
On my Xen host (systemd in Debian Buster, Xen 4.11), I usually start all guest VMs automatically. I added all my VM configs as link in `/etc/xen/auto/` to the underlying config like /etc/xen/auto/proxy.cfg -> /etc/xen/proxy.cfg /etc/xen/auto/vm04.matrix.cfg -> /etc/xen/vm04.matrix.cfg ... and someti...
On my Xen host (systemd in Debian Buster, Xen 4.11), I usually start all guest VMs automatically. I added all my VM configs as link in
/etc/xen/auto/
to the underlying config like
/etc/xen/auto/proxy.cfg -> /etc/xen/proxy.cfg
/etc/xen/auto/vm04.matrix.cfg -> /etc/xen/vm04.matrix.cfg
...
and sometimes some guest VMs start automatically on reboot of the DOM0 host and sometimes some fail and throw these errors in syslog:
$ grep "Starting Xen domain" /var/log/syslog
May 12 08:38:36 dom0 xendomains: Starting Xen domain proxy (from /etc/xen/auto/proxy.cfg)...done.
May 12 08:38:36 dom0 xendomains: Starting Xen domain vm04.matrix.de (from /etc/xen/auto/vm04.matrix.cfg)...failed.
If they fail, the errors in \var\log\syslog
around the fail during boot are:
Starting Xen domain vm04.matrix (from /etc/xen/auto/vm04.matrix.cfg)...failed.
libxl: error: libxl_device.c:417:libxl__device_disk_set_backend: Disk vdev=xvda2 failed to stat: /dev/vg0/vm04.matrix-disk: No such file or directory
libxl: error: libxl_create.c:983:initiate_domain_create: Domain 4:Unable to set disk defaults for disk 0
libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 4:Non-existant domain
libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 4:Unable to destroy guest
libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 4:Destruction of domain failed
---
Starting Xen domain proxy (from /etc/xen/auto/proxy.cfg)...failed.
libxl: error: libxl_device.c:417:libxl__device_disk_set_backend: Disk vdev=xvda2 failed to stat: /dev/vg0/proxy-disk: No such file or directory
libxl: error: libxl_create.c:983:initiate_domain_create: Domain 1:Unable to set disk defaults for disk 0
libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 1:Non-existant domain
libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 1:Unable to destroy guest
libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 1:Destruction of domain failed
The files /etc/xen/proxy.cfg
and /etc/xen/vm04.matrix.cfg
are identical apart from the mount-points.
If I start xen create /etc/xen/vm04.matrix.cfg
later manually it starts just fine, only not automatically during the boot of the host.
## debugging
To debug the problem, I added this in /etc/default/grub
GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=4096M,max:4096M loglvl=all guest_loglvl=all"
and called update-grub
, but after a reboot the error messages in syslog are the same. I cannot find anything suspicious in dmesg
either. No mentions of any of the guest hostnames. Only this shows, the problem:
# dmesg|grep dev|tail
[ 11.348931] xen:xen_evtchn: Event-channel device installed
[ 22.006020] device vif3.0 entered promiscuous mode
[ 25.362878] device vif5.0 entered promiscuous mode
[ 28.636912] device vif6.0 entered promiscuous mode
[ 1004.501654] device vif7.0 entered promiscuous mode
...
You only see, that the first three VMs Network-interfaces did start during boot this time and 1000s later I started the next VM manually on the console.
Xen loads just fine:
$ systemctl --type=service | grep -i xen
xen.service loaded active running LSB: Xen daemons
xendomains.service loaded active running LSB: Start/stop secondary xen domains
I think the best hint to the problem is that the volume is not there during boot:
/dev/vg0/proxy-disk: No such file or directory
maybe xen starts too early in the boot process?
systemctl cat xen.service|uniq
# /run/systemd/generator.late/xen.service
# Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/xen
Description=LSB: Xen daemons
Before=multi-user.target
Before=graphical.target
After=remote-fs.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/xen start
ExecStop=/etc/init.d/xen stop
systemctl cat xendomains.service|uniq
# /run/systemd/generator.late/xendomains.service
# Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/xendomains
Description=LSB: Start/stop secondary xen domains
Before=multi-user.target
Before=graphical.target
Before=corosync.service
Before=heartbeat.service
Before=libvirtd.service
After=network-online.target
After=remote-fs.target
After=xen.service
After=drbd.service
After=iscsi.service
After=openvswitch-switch.service
After=nfs-kernel-server.service
Wants=network-online.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/xendomains start
ExecStop=/etc/init.d/xendomains stop
ExecReload=/etc/init.d/xendomains reload
How can I further debug this?
rubo77
(30435 rep)
May 12, 2020, 01:06 PM
• Last activity: Jun 12, 2024, 03:23 PM
0
votes
1
answers
75
views
Debian installation from USB: "the logical volume vm-sys-net-private on qubes_dom0 could not be deleted"
I tried Qubes OS and found out that it is too heavy and complicated for me. So I tried to install Debian from a flashed USB. However, the installer gives the following error: `the logical volume vm-sys-net-private on qubes_dom0 could not be deleted` I have a Bodhi Linux installer on another flashed...
I tried Qubes OS and found out that it is too heavy and complicated for me. So I tried to install Debian from a flashed USB. However, the installer gives the following error:
the logical volume vm-sys-net-private on qubes_dom0 could not be deleted
I have a Bodhi Linux installer on another flashed USB and that gives the same error. Asking about this on the Qubes OS forum resulted in an answer suggesting the use of
"dd if=/dev/zero of=/dev/sda bs=1M
or something"
I've been reading abouf the dd
command and it seems to be a legit way of wiping out contents of a hard drive. lsblk
gives the following output:
user@personal:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
xvda 202:0 1 20G 0 disk
├─xvda1 202:1 1 200M 0 part
├─xvda2 202:2 1 2M 0 part
└─xvda3 202:3 1 19.8G 0 part /
xvdb 202:16 1 2G 0 disk /var/spool/cron
/usr/local
/home
/rw
xvdc 202:32 1 10G 0 disk
├─xvdc1 202:33 1 1G 0 part [SWAP]
└─xvdc3 202:35 1 9G 0 part
xvdd 202:48 1 510.7M 1 disk
How should I wirte the dd
command in order to succeed with the installer? If I wipe out everything, does the computer boot from the USB?
jvkloc
(101 rep)
Mar 8, 2024, 07:14 AM
• Last activity: Mar 8, 2024, 05:24 PM
0
votes
3
answers
1233
views
What's wrong with my Xen bridge configuration
I'm on Debian 9 (stretch): $ cat /proc/version Linux version 4.9.0-3-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) I'm trying to setup a Xen guest. I have installed Xen and now working on a Dom-0: sudo xl list Name I...
I'm on Debian 9 (stretch):
$ cat /proc/version
Linux version 4.9.0-3-amd64 (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19)
I'm trying to setup a Xen guest. I have installed Xen and now working on a Dom-0:
sudo xl list
Name ID Mem VCPUs State Time(s)
Domain-0 0 7881 4 r----- 213.2
$ sudo xl info
host : myserver
release : 4.9.0-3-amd64
version : #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19)
machine : x86_64
nr_cpus : 4
max_cpu_id : 3
nr_nodes : 1
cores_per_socket : 4
threads_per_core : 1
cpu_mhz : 3092
hw_caps : b7ebfbff:17bae3ff:28100800:00000001:00000001:00000000:00000000:00000100
virt_caps : hvm
total_memory : 8103
free_memory : 128
sharing_freed_memory : 0
sharing_used_memory : 0
outstanding_claims : 0
free_cpus : 0
xen_major : 4
xen_minor : 8
xen_extra : .5
xen_version : 4.8.5
xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler : credit
xen_pagesize : 4096
platform_params : virt_start=0xffff800000000000
xen_changeset :
xen_commandline : placeholder
cc_compiler : gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
cc_compile_by : ijackson
cc_compile_domain : chiark.greenend.org.uk
cc_compile_date : Fri Jan 11 18:02:57 UTC 2019
build_id : 9a71c39470d087c0c9fa0d33c04d985ea08aaa04
xend_config_format : 4
Now I'm trying to setup a bridge. I'm following the instructions in https://wiki.xenproject.org/wiki/Xen_Project_Beginners_Guide
My configuration file is:
$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto xenbr0
iface xenbr0 inet dhcp
bridge_ports eth0
If I run
sudo service networking restart
it takes more than a minute.
Then the state of the bridge is strange:
$ sudo brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.000000000000 no
The bridge has no real id and is not enabled.
I tried several different configurations for /etc/network/interfaces all of them failed.
Any ideas, why I can't setup a xen bridge?
**Edit:**
After the comment of @A.B and the answer of @user337916 I added the line auto eth0
into my configuration
The answers to the follwoing commands are very confusing:
sudo brctl addif xenbr0 eth0
interface eth0 does not exist!
sudo ifup -v eth0
ifup: interface eth0 already configured
How is it possible, that something that _does not exist_ can be _already configured_?.
Here is another output:
sudo ip link show
1: lo: mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp4s0: mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
link/ether 14:da:e9:dd:ad:93 brd ff:ff:ff:ff:ff:ff
4: xenbr0: mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 3a:d9:57:ac:9a:7c brd ff:ff:ff:ff:ff:ff
Jogger
(101 rep)
Jan 15, 2019, 11:17 AM
• Last activity: Feb 6, 2024, 09:22 PM
1
votes
0
answers
37
views
How does Xen validate exception handlers installed by Guest OSes?
I don't understand a part of the paper [Xen and the art of Virtualization][1]. On the topic of virtualizing exception handling (section 2.1.2), the paper states that each guest OS can register a table that maps an exception to the handler that it wants to execute when that exception happens, and the...
I don't understand a part of the paper Xen and the art of Virtualization . On the topic of virtualizing exception handling (section 2.1.2), the paper states that each guest OS can register a table that maps an exception to the handler that it wants to execute when that exception happens, and then:
> Safety is ensured by validating exception handlers when they are presented to Xen. The only required check is that the handler's code segment does not specify execution in ring 0. Since no guest OS can create such a segment, it suffices to compare the specified segment selector to a small number of static values which are reserved by Xen.
My understanding is the following more or less: Xen needs not to worry about the handler code containing privileged instructions, because if that's the case running the instructions fails since the handler runs outside of ring 0 (this is the "no guest OS can create such a segment" part). However, a guest OS might try to register as a handler a memory segment that is actually reserved for Xen and its privileged code. In that case, handling the exception by just jumping to that segment would cause that code to run in ring 0 when handling the exception. So Xen must ensure that guest OSes don't register segments that belong to Xen as exception handlers. Is my understanding of this part correct, or am I wrong?
The next paragraph is:
> Apart from this, any other handler problems are fixed up during exception propagation. for example, if the handler's code segment is not present or if the handler is not paged into memory then an appropriate fault will be taken when Xen executes the iret instruction which returns to the handler.Xen detects these double faults by checking the faulting program counter value: if the address resides within the exception-virtualizing code then the offending guest OS is terminated.
I interpret this as: if, while handling a fault by trying to transfer control to the appropriate guest OS handler, a 2nd fault happens because said handler is either non-existent or paged out of memory, the Xen code that handles the 2nd fault will check which code was running that triggered the 2nd fault, and realize that the fault was raised while handling another, "parent" fault. What really confuses me is the last statement "if the address resides within the exception-virtualizing code then the offending guest OS is terminated." I get this for the case where the 2nd fault happened because the handler code doesn't exist. But in the case where the handler is paged out of memory, why would the guest OS be terminated? I'd expect the handler just to be brought into memory from disk.
If needed for context, the underlying architecture is x86.
Matteo
(73 rep)
Feb 1, 2024, 04:02 AM
1
votes
1
answers
188
views
Mount LVM backup partition inside host on XEN
I have a XEN server (4.17) with a volume group `vg0` and some volumes on it where one is a logical volume especially for Nextcloud e.g.: lvcreate -n nextcloud -L2000G vg0 mkfs.ext4 /dev/vg0/nextcloud These are my volumes: ``` # lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert n...
I have a XEN server (4.17) with a volume group
vg0
and some volumes on it where one is a logical volume especially for Nextcloud e.g.:
lvcreate -n nextcloud -L2000G vg0
mkfs.ext4 /dev/vg0/nextcloud
These are my volumes:
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
nextcloud vg0 -wi-ao---- 2,01t
root vg0 -wi-ao---- 10,00g
swap vg0 -wi-ao---- 4,00g
vm01-disk vg0 -wi-a----- 580,00g
vm01-swap vg0 -wi-a----- 8,00g
The nextcloud partition /dev/mapper/vg0-nextcloud
is only visible inside the Dom0 VM.
How do I expose the nextcloud
partition to vm01 so I can use it as storage for Nextcloud there?
I want to use the folder /var/www/nextcloud/html/data
to be located on vg0-nextcloud.
rubo77
(30435 rep)
Dec 12, 2023, 10:32 AM
• Last activity: Dec 20, 2023, 08:35 AM
3
votes
1
answers
930
views
How to format NVMe drive in Linux suitable for raid 1 and lvm on xen Host
I want to create a software raid on two identical SSDs How do I create partitions and format them optimal? ``` lsblk nvme0n1 259:0 0 953.9G 0 disk nvme1n1 259:1 0 953.9G 0 disk ``` I probably have to use `fdisk` or `parted` to create partitions. What options do I need? Is this enough? ``` parted /de...
I want to create a software raid on two identical SSDs
How do I create partitions and format them optimal?
lsblk
nvme0n1 259:0 0 953.9G 0 disk
nvme1n1 259:1 0 953.9G 0 disk
I probably have to use fdisk
or parted
to create partitions. What options do I need? Is this enough?
parted /dev/nvme0n1
(parted) mkpart primary ext4 0% 100%
(parted) set 1 raid on
The disks both have 1tb and
I also need a small boot partition with 500mb
rubo77
(30435 rep)
Oct 10, 2023, 12:32 AM
• Last activity: Oct 26, 2023, 08:35 AM
0
votes
1
answers
115
views
Xen: some logical volumes are missing after dist-upgrade vrom Debian 10 to 12 and after reboot
I updated my Debian Xen Server from 10 to 11 and then without reboot to Debian 12, then I rebooted the server and now only some VMs started. vm06 is running fine while vm04 is not (and some more, but here i redacted them from this question for readability) In the folder /dev/vg0 are only some of the...
I updated my Debian Xen Server from 10 to 11 and then without reboot to Debian 12, then I rebooted the server and now only some VMs started.
vm06 is running fine while vm04 is not (and some more, but here i redacted them from this question for readability)
In the folder /dev/vg0 are only some of the vlumes linked now:
# ll /dev/vg0/
total 0
lrwxrwxrwx 1 root root 7 Aug 20 17:04 backup -> ../dm-2
lrwxrwxrwx 1 root root 7 Aug 20 17:04 root -> ../dm-0
lrwxrwxrwx 1 root root 8 Aug 20 17:04 vm06.docker-disk -> ../dm-10
# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
backup vg0 -wi-ao---- 2,01t
root vg0 -wi-ao---- 10,00g
vm04.matrix-disk vg0 owi-i-s--- 130,00g
vm06.docker-disk vg0 owi-a-s--- 610,00g
If I use lvdisplay
, the missing volume vm04-matrix is still included like:
# lvdisplay|grep Path|grep -v swap
LV Path /dev/vg0/root
LV Path /dev/vg0/backup
LV Path /dev/vg0/vm06.docker-disk
LV Path /dev/vg0/vm04.matrix-disk
lvdisplay|awk '/LV Name/{n=$3} /Block device/{d=$3; sub(".*:","dm-",d); print d,n;}'
shows, that the matrix disk is present at /dev/dm-25
# cat /etc/lvm/backup/vg0
...
vg0 {
id = "Cfe7Ii-rZBl-mEnH-tk5Z-q9WW-UyTk-3WstVn"
seqno = 29269
format = "lvm2" # informational
status = ["RESIZEABLE", "READ", "WRITE"]
flags = []
extent_size = 8192 # 4 Megabytes
max_lv = 0
max_pv = 0
metadata_copies = 0
physical_volumes {
pv0 {
id = "KlmZUe-3FiK-VbBZ-R962-219A-GGAU-I3a5Nl"
device = "/dev/md1" # Hint only
status = ["ALLOCATABLE"]
flags = []
dev_size = 15626736256 # 7,27677 Terabytes
pe_start = 2048
pe_count = 1907560 # 7,27676 Terabytes
}
}
logical_volumes {
...
vm06.docker-disk {
id = "y3CSuy-z4gU-72Bd-678E-sYTi-Lkmi-dwAkgT"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1584654364 # 2020-03-19 22:46:04 +0100
creation_host = "dom0-eclabs"
segment_count = 3
segment1 {
start_extent = 0
extent_count = 97280 # 380 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 263936
]
}
segment2 {
start_extent = 97280
extent_count = 7680 # 30 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 422912
]
}
segment3 {
start_extent = 104960
extent_count = 51200 # 200 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 1050889
]
}
}
...
vm04.matrix-disk {
id = "Tak3Zq-3dUU-SAJl-Hd5h-weTM-cHMR-qgWXeI"
status = ["READ", "WRITE", "VISIBLE"]
flags = []
creation_time = 1584774051 # 2020-03-21 08:00:51 +0100
creation_host = "dom0-eclabs"
segment_count = 2
segment1 {
start_extent = 0
extent_count = 25600 # 100 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 531968
]
}
segment2 {
start_extent = 25600
extent_count = 7680 # 30 Gigabytes
type = "striped"
stripe_count = 1 # linear
stripes = [
"pv0", 1002249
]
}
}
}
}
dmsetup still lists the disk:
# dmsetup info|grep matrix
Name: vg0-vm04.matrix--disk
But it doesn't seem to be linked in /dev/dm-X:
# for i in /dev/dm-*; do echo $i; dmsetup info $i; done|grep matrix
(This shows nothing).
I already did pvcreate –restorefile lvm_backup_datei –uuid
in recovery mode like explained [here](https://docs.hetzner.com/de/robot/dedicated-server/troubleshooting/recovery-of-lvm-volumes/) and rebooted, but still the same problem.
I noticed, that **in the recovery system all lvm partitions were there** with lsblk
and under /dev/mapper/...
(the rescue system uses kernel 6.4.7) but after a reboot into the system, again only those few are visible:
├─sdb2 8:18 0 7,3T 0 part
│ └─md1 9:1 0 7,3T 0 raid1
│ ├─vg0-root 253:0 0 10G 0 lvm /
│ ├─vg0-swap 253:1 0 4G 0 lvm [SWAP]
│ ├─vg0-backup 253:2 0 2T 0 lvm /backup
│ ├─vg0-vm06.docker--swap 253:8 0 8G 0 lvm
│ ├─vg0-vm06.docker--disk-real 253:9 0 610G 0 lvm
│ │ ├─vg0-vm06.docker--disk 253:10 0 610G 0 lvm
│ │ └─vg0-snap--tmp--vm06.docker--disk 253:12 0 610G 0 lvm
│ ├─vg0-snap--tmp--vm06.docker--disk-cow 253:11 0 16G 0 lvm
│ │ └─vg0-snap--tmp--vm06.docker--disk 253:12 0 610G 0 lvm
## update:
I managed to mount the missing volumes in rescue mode into a backup partition and backup all needed data, so I can create a new volume, reinstall and feed in the backed up database
rubo77
(30435 rep)
Aug 20, 2023, 03:51 PM
• Last activity: Aug 21, 2023, 12:24 PM
1
votes
2
answers
3309
views
Is it possible to install Xen on a computer (processor supports virtualization) alongside Ubuntu and Windows?
The computer currently triple boots Ubuntu and a couple of Windows versions. Now I want to add Xen into the mix. Would it work if I simply made a new partition for Xen, or does it need to take over the entire system? Alternatively, is there a way to bring my existing OS's inside of Xen (and run them...
The computer currently triple boots Ubuntu and a couple of Windows versions. Now I want to add Xen into the mix.
Would it work if I simply made a new partition for Xen, or does it need to take over the entire system?
Alternatively, is there a way to bring my existing OS's inside of Xen (and run them together), so to say?
In case I can't boot into the already installed OS's (together) under Xen, I'll settle for a multi-boot system (2 Windows + Ubuntu + Xen/XenServer) without destroying anything. Then I can do what I want after booting into Xen/XenServer. I'm ambivalent between Xen (with Ubuntu as dom0) and XenServer (with CentOS), as long as they do what I want (multi-boot).
ahron
(434 rep)
Jul 15, 2015, 09:57 AM
• Last activity: Jul 8, 2023, 10:06 PM
1
votes
1
answers
246
views
Install base Linux on KVM virtualized hardware (dom0)
**Goal**: I would like to install my main Linux distro on top of KVM, equivalent to `dom0` in Xen hypervisor parlance. I know that running an OS on top of a hypervisor is not uncommon and that KVM has been baked into the Linux kernel since 2.4 or so. The question is how to configure the system so th...
**Goal**: I would like to install my main Linux distro on top of KVM, equivalent to
dom0
in Xen hypervisor parlance. I know that running an OS on top of a hypervisor is not uncommon and that KVM has been baked into the Linux kernel since 2.4 or so. The question is how to configure the system so that it does so automatically on boot. Ideally, the bootloader would start KVM before mounting the disks and booting into the OS.
**Question**: How does one accomplish this?
Adam Erickson
(270 rep)
Jul 7, 2023, 07:23 PM
• Last activity: Jul 7, 2023, 07:50 PM
1
votes
0
answers
32
views
enhance performance in XEN VMs when copying lots of files inside the host
When I copy large amounts of data back and forth on my Debian XEN server in the host-VM, the server response in the webserver-VM with `nginx` becomes very slow. This is how I cause the problem 1. in the host VM: rsync -avR /lots/of/files/from/synapse/media_store/ /backup/tmp_matrix_media_store/ 2. i...
When I copy large amounts of data back and forth on my Debian XEN server in the host-VM, the server response in the webserver-VM with
nginx
becomes very slow.
This is how I cause the problem
1. in the host VM:
rsync -avR /lots/of/files/from/synapse/media_store/ /backup/tmp_matrix_media_store/
2. in the webserver I monitor the download speed with
while true; do echo $(date)" - $({ time -p curl -sSf https://test.org?$RANDOM|grep something; } |& grep real)"; done | tee -a /var/log/nginx/performance.log
Di 23. Mai 09:25:45 UTC 2023 - real 0,73
Di 23. Mai 09:25:45 UTC 2023 - real 0,20
...
I also tried using ionice -c2 -n7 rsync -avR ...
to make the copy process less hungry, but this does not help.
Workaround: If I use rsync --bwlimit=10M ...
this will slow down the copy progress to max 10 MB/s and and I won't get any problem in the VM.
The server has a CPU : AMD Ryzen 7 3700X Octa-Core with 64GB RAM
and the webserver-VM has 4 cores added
What can I do to improve performance?
rubo77
(30435 rep)
May 23, 2023, 09:29 AM
• Last activity: May 24, 2023, 09:35 AM
2
votes
1
answers
352
views
How does XEN work without VHE on ARM?
XEN has support for ARM and it is also possible to run it on a cpu without VHE (virtual hardware extension) cap that was introduced with ARMV8.1-A extension. As I understand linux kernel of a guest vm communicates with xen hypervisor over HVC calls. HVC call is a hardware feature, as I think only av...
XEN has support for ARM and it is also possible to run it on a cpu without VHE (virtual hardware extension) cap that was introduced with ARMV8.1-A extension. As I understand linux kernel of a guest vm communicates with xen hypervisor over HVC calls. HVC call is a hardware feature, as I think only available in VHE enabled system. But how does it work without VHE? Also with HVCs but as some kind of software call? Please correct me if I'm wrong in my understanding.
ptiza_v_nebe
(83 rep)
Apr 24, 2023, 08:51 AM
• Last activity: Apr 24, 2023, 10:55 PM
0
votes
0
answers
349
views
Debian does not boot with Xen
I set up some new Hardware to run a debian xen host on. Installing Debian worked fine, but when i installed `xen-system-amd64` and tried to boot with xen hypervisor the screen stays black after the grub menu and the system seems to not be booting properly. Hardware:\ CPU: AMD Ryzen 5 7600\ RAM: 2x 1...
I set up some new Hardware to run a debian xen host on.
Installing Debian worked fine, but when i installed
I'm running out of ideas and don't get what the kernel log is trying to tell me, therefor i'm here for some help/hints.
xen-system-amd64
and tried to boot with xen hypervisor the screen stays black after the grub menu and the system seems to not be booting properly.
Hardware:\
CPU: AMD Ryzen 5 7600\
RAM: 2x 16GB DDR5-4800MT/S ECC\
SSD: 2x 1TB NVMe SSD \
Mainboard: Asus prime b650M-A II
I did set up a serial console trying to spot the problem here is what i caught https://pastebin.com/cSQ051cF .
I tried to roule out as much config complexity as possible, therefor i reinstalled debian without lvm / raid and used the default formating config. Unfortunately the result stayed the same.
I further tryied debian testing which gets me a bit further (yay display output) but seems still to fail

ukLab
(1 rep)
Feb 22, 2023, 08:38 PM
• Last activity: Feb 28, 2023, 07:25 PM
1
votes
2
answers
391
views
Xen DomO Has Network But DomU Does Not
My server lost power last night so was abruptly shut down. Bringing it back up this morning my xen dom0 can connect to network, but my domU cannot. Tried full reboots of Dom0 and DomU. Only DomU on hypervisor so not able to compare DomUs to determine if root cause is Dom0 or U. I haven't done any ch...
My server lost power last night so was abruptly shut down. Bringing it back up this morning my xen dom0 can connect to network, but my domU cannot. Tried full reboots of Dom0 and DomU. Only DomU on hypervisor so not able to compare DomUs to determine if root cause is Dom0 or U. I haven't done any changes to my configuration in a couple years so I'm a bit stumped and could use some help getting this back up.
**Error**
domU:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 192.168.86.100 icmp_seq=1 Destination Host Unreachable
From 192.168.86.100 icmp_seq=2 Destination Host Unreachable
From 192.168.86.100 icmp_seq=3 Destination Host Unreachable
From 192.168.86.100 icmp_seq=4 Destination Host Unreachable
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 0 received, +4 errors, 100% packet loss, time 4037ms
pipe 3
**Configs:**
domU:~$ cat /etc/netplan/01-netcfg.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
addresses: [192.168.86.100/24]
gateway4: 192.168.86.1
nameservers:
addresses: [1.1.1.1]
domU:~$ ip route
default via 192.168.86.1 dev eth0 proto static
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-7fb8d047dcba proto kernel scope link src 172.18.0.1
172.19.0.0/16 dev br-e7cdb61e5c17 proto kernel scope link src 172.19.0.1
172.20.0.0/16 dev br-f11060eb56f3 proto kernel scope link src 172.20.0.1
172.21.0.0/16 dev br-075b602ce9f7 proto kernel scope link src 172.21.0.1 linkdown
172.22.0.0/16 dev br-e812d3a26476 proto kernel scope link src 172.22.0.1
172.23.0.0/16 dev br-d1c3ee2c4f77 proto kernel scope link src 172.23.0.1
172.24.0.0/16 dev br-aa973d061ea7 proto kernel scope link src 172.24.0.1
172.25.0.0/16 dev br-d174c2aa0e7d proto kernel scope link src 172.25.0.1
172.26.0.0/16 dev br-ad2326a15232 proto kernel scope link src 172.26.0.1 linkdown
172.27.0.0/16 dev br-9a95e94769ef proto kernel scope link src 172.27.0.1
172.28.0.0/16 dev br-565bcc95223a proto kernel scope link src 172.28.0.1 linkdown
172.29.0.0/16 dev br-6c03714dca11 proto kernel scope link src 172.29.0.1 linkdown
192.168.86.0/24 dev eth0 proto kernel scope link src 192.168.86.100
dom0:~$ cat /etc/netplan/config.yaml
network:
version: 2
renderer: networkd
ethernets:
enp0s25:
dhcp4: false
dhcp6: false
bridges:
xenbr0:
interfaces: [enp0s25]
addresses: [192.168.86.99/24]
gateway4: 192.168.86.1
mtu: 1500
nameservers:
addresses: [1.1.1.1]
parameters:
stp: true
forward-delay: 4
dhcp4: no
dhcp6: no
dom0:~$ ip addr show
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: mtu 1500 qdisc fq_codel master xenbr0 state UP group default qlen 1000
link/ether 98:90:96:d3:41:f5 brd ff:ff:ff:ff:ff:ff
3: xenbr0: mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 98:90:96:d3:41:f5 brd ff:ff:ff:ff:ff:ff
inet 192.168.86.99/24 brd 192.168.86.255 scope global xenbr0
valid_lft forever preferred_lft forever
inet6 fe80::9a90:96ff:fed3:41f5/64 scope link
valid_lft forever preferred_lft forever
4: vif1.0: mtu 1500 qdisc fq_codel master xenbr0 state UP group default qlen 32
link/ether fe:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff
inet6 fe80::fcff:ffff:feff:ffff/64 scope link
valid_lft forever preferred_lft forever
dom0:~$ brctl show
bridge name bridge id STP enabled interfaces
xenbr0 8000.989096d341f5 yes enp0s25
vif1.0
dom0:~$ sudo xl network-list domU
Idx BE Mac Addr. handle state evt-ch tx-/rx-ring-ref BE-path
0 0 00:16:3e:f5:45:18 0 4 -1 4096/4097 /local/domain/0/backend/vif/1/0
dom0 ~$ cat /etc/xen/domainU.cfg
...
# Networking
#
vif = [ 'ip=192.168.86.100 ,mac=00:16:3E:F5:45:18, bridge=xenbr0' ]
...
Xen Version ***4.11***
Dom0 OS: Ubuntu 18.04
DomU OS: Debian 10.13
curios
(93 rep)
Feb 6, 2023, 12:23 AM
• Last activity: Feb 12, 2023, 01:47 AM
1
votes
1
answers
162
views
Installing openSUSE 15.4 as a PV Xen Guest (DomU) on Debian 11 - cannot find kernel to link in xen-tools configuration
we are currently trying to set up a virtualized environment in which we would like to use openSUSE 15.4 Leap as a Xen Guest (DomU) on a Debian 11 Host. To do so I have found some resources which adress the matter, but may be a little bit dated: - [How to install a openSuSE domU on a Debian dom0][1]...
we are currently trying to set up a virtualized environment in which we would like to use openSUSE 15.4 Leap as a Xen Guest (DomU) on a Debian 11 Host.
To do so I have found some resources which adress the matter, but may be a little bit dated:
- How to install a openSuSE domU on a Debian dom0
- Building an RPM based (Red Hat, Fedora, CentOS) Xen Guest Root Filesystem using Rinse
My configuration file looks like this currently:
#
# Configuration file for the Xen instance test2, created manually
#
#
#
# Kernel + memory size
#
kernel = '/opensuse-15.4/boot/vmlinuz-5.14.21-150400.24.33-default'
ramdisk = '/bootfiles/initrd'
vcpus = '4'
memory = '16384'
#
# Disk device(s).
#
root = '/dev/xvda2 ro'
disk = [
'file:/home/xen/domains/testsuserpm/disk.img,xvda2,w',
'file:/home/xen/domains/testsuserpm/swap.img,xvda1,w',
]
#
# Hostname
#
name = 'testsuserpm'
#
# Networking
#
dhcp = 'dhcp'
vif = [ 'mac=,bridge=xenbr0' ]
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
I got the kernel file by converting the .rpm package into a .deb package and installing the file into some folder to perform a Direct Kernel Boot . As for the installation I used rinse based on the following HowTo and put it onto the disk image that is linked within the config file. However upon trying to start the vm I get the following error message:
> Parsing config from /etc/xen/testsuserpm.cfg ': lexical
> errorerpm.cfg:8: config parsing error near ` ': lexical
> errorerpm.cfg:9: config parsing error near ` ': lexical
> errorerpm.cfg:10: config parsing error near ` ': lexical
> errorerpm.cfg:11: config parsing error near ` ': lexical
> errorerpm.cfg:15: config parsing error near ` ': lexical
> errorerpm.cfg:16: config parsing error near ` ': lexical
> errorerpm.cfg:17: config parsing error near ` ': lexical
> errorerpm.cfg:18: config parsing error near ` ': lexical
> errorerpm.cfg:19: config parsing error near ` ': lexical
> errorerpm.cfg:23: config parsing error near ` ': lexical
> errorerpm.cfg:27: config parsing error near ` ': lexical
> errorerpm.cfg:28: config parsing error near ` ': lexical
> errorerpm.cfg:32: config parsing error near ` ': lexical
> errorerpm.cfg:33: config parsing error near ` Failed to parse config:
> Invalid argument
I am guessing installing a .rpm based package on Debian just like that is not possible. Is there anything I could do to make this work?
Any help is appreciated.
Best regards,
Chris
SinjinVanCleefe
(13 rep)
Dec 19, 2022, 12:20 AM
• Last activity: Feb 7, 2023, 10:19 AM
0
votes
1
answers
869
views
Cannot boot new VM, when copied from one XEN-host to another
n my Debian 10 (buster) XEN Host, I copied a Xen-VM that is using Debian jessie from an LVM-snapshot into a new xen guest and tried to start it. This is what I did: https://unix.stackexchange.com/questions/585468/copy-xen-vm-to-test-a-dist-upgrade-of-a-mailserver/585659#585659 # First Attempt I crea...
n my Debian 10 (buster) XEN Host, I copied a Xen-VM that is using Debian jessie from an LVM-snapshot into a new xen guest and tried to start it. This is what I did:
https://unix.stackexchange.com/questions/585468/copy-xen-vm-to-test-a-dist-upgrade-of-a-mailserver/585659#585659
# First Attempt
I created a new mashine with
xen-create-image
and overwrote all files via rsync.
Now I saw this error:
libxl: error: libxl_bootloader.c:649:bootloader_finished: Domain 35:bootloader failed - consult logfile /var/log/xen/bootloader.35.log
$ cat /var/log/xen/bootloader.35.log
Traceback (most recent call last):
File "/usr/lib/xen-4.11/bin/pygrub", line 882, in
raise RuntimeError, "Unable to find partition containing kernel"
RuntimeError: Unable to find partition containing kernel
Did I have to recreate the right boot loader?
Or did I have to exclude some files from the rsync of the snapshot to the new image?
---
# UPDATE:
I also tried this:
## chroot into the mounted new system:
mount /dev/vg0/vm01.mail-test-disk /media/vm01.mail-test-disk/
mount -t proc none /media/vm01.mail-test-disk/proc
mount --rbind /dev /media/vm01.mail-test-disk/dev
mount -t sysfs sysfs /media/vm01.mail-test-disk/sys
chroot /media/vm01.mail-test-disk/ /bin/bash
## in the chroot shell:
apt install grub-pc
--> when asked, choose /dev/dm-33 (622770 MB; vg0-vm01.mail--test--disk) and continue althoug it seems to fail
update-grub
## new error:
$ umount -l /media/vm01.mail-test-disk
$ xen create /etc/xen/vm01.mail-test.cfg
Parsing config from /etc/xen/vm01.mail-test.cfg
libxl: error: libxl_aoutils.c:478:libxl__openptys: openpty failed: No such file or directory
libxl: error: libxl_utils.c:1128:libxl__recvmsg_fds: recvmsg got EOF (ptys)
libxl: error: libxl_exec.c:118:libxl_report_child_exitstatus: openpty child exited with error status 255
libxl: error: libxl_create.c:1267:domcreate_rebuild_done: Domain 37:cannot (re-)build domain: -3
libxl: error: libxl_domain.c:1034:libxl__destroy_domid: Domain 37:Non-existant domain
libxl: error: libxl_domain.c:993:domain_destroy_callback: Domain 37:Unable to destroy guest
libxl: error: libxl_domain.c:920:domain_destroy_cb: Domain 37:Destruction of domain failed
I also tried grub-xen
instead of grub-pc
, but the same error.
I get the same Parsing config...
error now all the time, also when creating any other image with
xen create /etc/xen/...cfg
I started over, this time with excluding important folders with
rsync -aAX --del --info=progress2 /media/vm01.mail-disk-snapshot/ /media/vm01.mail-test-disk/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/boot/*,/var/tmp/*,/var/cache/*,/usr/tmp/*}
which leaves me without errormessage, but the VM is not accessible:
$xen create /etc/xen/vm01.mail-test.cfg
Parsing config from /etc/xen/vm01.mail-test.cfg
$xl console vm01.mail-test
xenconsole: Could not read tty from store: Success
xentop
shows 99% CPU usage of the newly created VM
### solution vor this part:
I found out, that I destroyed my running Dom0 Xen-host system, by mounting the /dev folder with
mount --rbind /dev /media/vm01.mail-test-disk/dev
for chroot
to edit the new VM ([See here](https://serverfault.com/a/1016900/128892)) . A reboot fixed /dev and using --bind
instead prevents the error again.
---
# UPDATE2:
I tried again and **formatted** the volume before I started the rsync, so the excluded folders are empty instead of containing the content of the bootstrap Debian system:
mkfs.ext4 /dev/vg0/vm01.mail-test-disk
rsync -aAX --del --info=progress2 /media/vm01.mail-disk-snapshot/ /media/vm01.mail-test-disk/ --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/boot/*,/var/tmp/*,/var/cache/*,/usr/tmp/*}
Now the VM starts booting and I can enter the xen-console
but now I get this error:
[....] Activating swap...[ 6.228541] Adding 8388604k swap on /dev/xvda1. Priority:-2 extents:1 across:8388604k SSFS
done.
[ 6.282959] EXT4-fs (xvda2): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.25.2
/dev/xvda2 has unsupported feature(s): metadata_csum
e2fsck: Get a newer version of e2fsck!
fsck exited with status code 8
failed (code 8).
[....] An automatic file system check (fsck) of the root filesystem failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-on
[FAILde. ... failed!
[warn] The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. After performing system maintenance, press CONTROL-D to terminate the maintenance shell and restart the system. ... (war
ning).
rubo77
(30435 rep)
May 10, 2020, 07:22 AM
• Last activity: Jan 17, 2023, 10:21 AM
Showing page 1 of 20 total questions