/r/xen

Photograph via snooOG

Xen is an open-source bare-metal hypervisor which makes it possible to run multiple computer operating systems to in parallel on a single computer.

Xen is an open-source bare-metal hypervisor which makes it possible to run multiple computer operating systems in parallel on a single computer.

For more information please refer to these external sites:


Rules:

  1. Please be gracious and up vote posts and comments liberally.
  2. Be polite. It's okay to disagree, but please refrain from being needlessly rude.
  3. No spam, personal blogs, or image macros.

Relevant subreddits:

/r/xen

1,506 Subscribers

3

xo-cli --register produces "invalid parameters" errors in xo logs

I have written a script downloading info about the whole cluster using xo-cli.

The simple command:

/usr/bin/xo-cli --register --allowUnauthorized https://<web\_address> <user> <pass>

even though login is successful:

Successfully logged with <username>

is producing these errors in xo logs:

token.create
{
  "description": "xo-cli --register"
}
{
  "code": 10,
  "data": {
    "errors": [
      {
        "code": null,
        "reason": "strict",
        "message": "should not contains property [\"description\"]",
        "property": "@"
      }
    ]
  },
  "message": "invalid parameters",
  "name": "XoError",
  "stack": "XoError: invalid parameters
    at Module.invalidParameters (/opt/xen-orchestra/packages/xo-common/src/api-errors.js:21:32)
    at Object.call (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:73:18)
    at Api.callApiMethod (file:///opt/xen-orchestra/packages/xo-server/src/xo-mixins/api.mjs:303:19)"
}

any tips on what is the issue and how to eliminate it spamming the logs?

(script has to run periodically)

5 Comments
2023/03/22
13:25 UTC

1

What are the good backup uplink options on xcp-ng?

Helo everyone, we've recently migrated away from esxi (due to licensing costs) to xen and so far evertyhing has been pretty smooth. One thing I can't figure out is how to setup a uplink backup for the network. Our server has two network links, 10gb fiber to the main switch and 1gb link to the nearby switch (a hop away from main). I've currenly have all VMs set to use eth10g associated pool, but would like to have a slower 1gb link as a backup in case anything goes wrong with 10g fiber line (better be safe than sorry).

I've tried to setup a private bonded network, but I'm not sure how to set the PIF priority. Resulting network also seems to limit itself to (slowest?) 1gbps speeds. Using xen orchestra, but don't mind getting hands dirty with ssh. Any advice is appreciated.

0 Comments
2023/02/16
18:19 UTC

3

Windows Guest Display Driver

I noticed that on all our Xen Server farms the Windows guest systems are all using the Microsoft Basic Display driver. I was googling around and only found XP Mode graphics drivers from 2014. Is this the only option available to get away from the basic adapter or are there newer ones with the right driver model I just don't find?

1 Comment
2023/01/30
10:25 UTC

1

Domain0 shows up as (null)

This is why I should never, ever touch my machine when it's working.

I have a Xen hypervisor that was previously running Ubuntu 18.04 LTS. After doing some maintenance this weekend I decided to upgrade things. After upgrading to 20.04 (xen-4.11), and continuing into 22.04 (xen-4.16), I have been unable to start VMs. When I try to start them, it errors out:

root@hypervisor:~# xl create -c /etc/xen/vm.cfg
Parsing config from /etc/xen/vm.cfg
libxl: error: libxl_device.c:1109:device_backend_callback: Domain 2:unable to add device with path /local/domain/0/backend/vbd/2/51713
libxl: error: libxl_device.c:1109:device_backend_callback: Domain 2:unable to add device with path /local/domain/0/backend/vbd/2/51714
libxl: error: libxl_device.c:1109:device_backend_callback: Domain 2:unable to add device with path /local/domain/0/backend/vbd/2/51715
libxl: error: libxl_device.c:1109:device_backend_callback: Domain 2:unable to add device with path /local/domain/0/backend/vbd/2/51716
libxl: error: libxl_create.c:1643:domcreate_launch_dm: Domain 2:unable to add disk devices
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_device.c:947:libxl__initiate_device_generic_remove: Domain 2:unable to get my domid
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_device.c:947:libxl__initiate_device_generic_remove: Domain 2:unable to get my domid
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_device.c:947:libxl__initiate_device_generic_remove: Domain 2:unable to get my domid
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_device.c:947:libxl__initiate_device_generic_remove: Domain 2:unable to get my domid
libxl: error: libxl_domain.c:1639:libxl__get_domid: failed to get own domid (domid)
libxl: error: libxl_domain.c:1530:devices_destroy_cb: Domain 2:libxl__devices_destroy failed
libxl: error: libxl_domain.c:1183:libxl__destroy_domid: Domain 2:Non-existant domain
libxl: error: libxl_domain.c:1137:domain_destroy_callback: Domain 2:Unable to destroy guest
libxl: error: libxl_domain.c:1064:domain_destroy_cb: Domain 2:Destruction of domain failed

It looks like xen doesn't know about the dom0:

root@hypervisor:~# xl list
Name                                        ID   Mem VCPUs	State	Time(s)
(null)                                       0  2048    24     r-----      68.5

I've seen some results online that look sort-of related, but the fixes (like manually writing to xenstore) don't seem to work. Anyone seen this before?

I've also been fighting with the linux-5.15.0-58 kernel bug, but at least I finally have the machine booted on 5.15.0-57 with the network functioning again. I'm never touching a functioning host again I swear.

1 Comment
2023/01/16
18:07 UTC

1

Ubuntu kernel bug in bridge

With the last update of Ubuntu kernel a bug impact bridge between VM and host. Network is not working

Workaround go back to a previous Kernel.

Bug is already reported to Ubuntu

https://bugs.launchpad.net/bugs/2002834

4 Comments
2023/01/15
18:49 UTC

6

Xen Orchestra 5.7.7

0 Comments
2022/11/30
15:06 UTC

1

BogoMIPS problems

A Xen host had been running for 4 years and had to be rebooted because of a failed fan. After the reboot, something went wrong when identifying the processor speed causing all VMs (Dom0 and DomU's) to have problems with time synchronization, the clocks lose appx. a minute per day. The difference during boot:

Previous boot:

[    0.000000] Xen version: 4.8.4-1.el7 (preserve-AD)
...
[    0.000000] bootconsole [xenboot0] disabled
[    0.000000] Xen: using vcpuop timer interface
[    0.000000] installing Xen timer for CPU 0
[    0.000000] tsc: Detected 2094.958 MHz processor
[   11.292610] Calibrating delay loop (skipped), value calculated using timer frequency.. 4189.91 BogoMIPS (lpj=2094958)
[   11.292626] pid_max: default: 32768 minimum: 301
[   11.292658] ACPI: Core revision 20140424

Current boot:

[    0.000000] Xen version: 4.8.4-1.el7 (preserve-AD)
...
[    0.000000] bootconsole [xenboot0] disabled
[    0.000000] Xen: using vcpuop timer interface
[    0.000000] installing Xen timer for CPU 0
[    0.000000] tsc: Detected 2106.954 MHz processor
[   12.044695] Calibrating delay loop (skipped), value calculated using timer frequency.. 4213.90 BogoMIPS (lpj=2106954)
[   12.044710] pid_max: default: 32768 minimum: 301
[   12.044743] ACPI: Core revision 20140424

Needless to say, nothing has been changed software-wise. Any ideas?

2 Comments
2022/11/10
13:07 UTC

1

Most of my Xen VMs won't migrate out

Not terribly experienced with Xen specifically. Have done a lot more with KVM.

But as it stands, I have a handful of Xen guests that have to go to a Hyper-V host.

90% of these hosts won't boot and play nice after export and conversion or after using Disk2Vhd from sysinternals.

It doesn't seem to matter if it's had Xen Management Tools removed or not. The result is the same: a BSOD on the other side.

Is there some quirk or driver I'm not privy to that i need to get removed from these Guest VMs before migrating them to a new virtualization platform?

0 Comments
2022/10/25
14:15 UTC

1

Remus with shared storage?

I've been searching the web for a few days, but haven't found any posts to this end. I have three Debian 11 Xen hosts with iscsi vm storage. Live migration works awesomely. Is it possible to set up HA with Remus in my situation? So far everything I've found seems to expect a setup with separate storage.

0 Comments
2022/09/24
13:42 UTC

2

Need some help, new to this

So...I've taken over admin on a box that provides some simulated network traffic that outputs to other stuff in the lab.

This box uses xen on a custom linux build (based on Suse). I have a question about a couple of interfaces on the main vm. Here's how they are listed when I do an ifconfig:

xenbr0.107 - seems easy enough, address is 10.7.5.10, netmask 255.255.0.0

xenbr0.107:rr - what the hell is "rr"? it has an address of 10.7.7.80, netmask is 255.255.0.0

The other weird thing is, when I restart the network service, it goes away...and it comes back if I reboot the computer. I can't find anything referencing an "rr" in /etc/sysconfig/network-scripts/ (only the .107) and I'm scratching my head trying to figure out how it gets added in.

Sorry if I'm asking something dumb, but if I don't know it, I'm gonna ask. Thanks in advance.

4 Comments
2022/09/13
20:34 UTC

2

Setting up network interfaces...

Disclaimer: I am a total noob, I have not used a hypervisor before and Xen is my first crack at it. I have diddled around with various Linux and BSD OS's, and spent many hours combing through man pages and other resources trying to learn enough about networking to get WiFi working on various old and decrepit machines, but I am in no way shape or form an expert in any of it.

I have an Intel NUC 7 that I am trying to configure to run Xen. I don't need Xen, but I want to learn more about it and how it works. My end goal will be just running a single VM as a DNS server for my home network, so I don't have to configure my /etc/hosts files each time I add a device. I am using Beginner's Guide to get me through this.

I have gotten through the minimal installation of Debian, adding in the non free firmware I needed to get wireless working, and then editing my interfaces file to allow me to connect to wireless, and finally installing Xen itself.

Now I am at the part where I need to set up a bridge to connect my VMs to the outside internet. The NUC has an Ethernet port and a wireless card, but I don't currently have an easy way to connect it via Ethernet to work on it, so I am using WiFi to do everything.

I followed the instructions as best I could, but I am setting up a bridge over the stuff I typed in interfaces to get my WiFi working initially. Namely I started with

auto wlan0

iface wlan0 inet dhcp
wpa-ssid <My network>
wpa-psk <My password>

Now that I need a bridge, I had to get rid of dhcp, and I didn't know what to do with the ssid and psk stuff. So my new file looked like

auto wlan0

Iface wlan0 inet manual
auto xenbr0
iface xenbr0 inet dhcp
bridge-ports wlan0

I initially left the ssid and psk lines with the wlan0 stanza, but that didn't work (interfaces showed DOWN with no IP assigned), so I moved it to the xenbr0 staza, but that didn't work either. Ultimately, my WiFi now appears to be broken again after trying to get the bridge going. I tried to tie the bridge to my Ethernet interface instead, thinking I could make another bridge between eth0 and wlan0 later, but that didn't work and I'm pretty sure it wouldn't help anyways. Anyone here have any suggestions or can point in a better direction?

I'm also concerned that once I get the bridge established, my wireless interface I was using is going to be tied up communicating with the VMs and I won't be able to use it to talk to the system itself.anymore, but I can't test that until I get the bridge working, so if you can answer that from experience that would be great too, save me a lot of heartache lol..

1 Comment
2022/08/27
09:57 UTC

1

USB PCIe Card Passthrough Problems / Hardware Recommendations

I am attempting to passthrough a PCIe USB card. I selected a card using the Renesas chipset, as suggested here. It shows up in lspci as

0a:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03)

So, as described here I dom0 to not use my devices and then passed through the device with

xe vm-param-set other-config:pci=0/0000:0a:00.0,0/0000:03:00.0 uuid=d75b1d48-355e-9f59-0c42-7eea0b99fae5

(I'm also passing a GPU through) but when booting I get the error:

The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.                                                                                                        
message: xenopsd internal error: Cannot_add(0000:0a:00.0, Xenctrlext.Unix_error(30, "1: Operation not permitted"))

The relevant part of the log file is

[2022-04-12 14:40:20] (XEN) [  718.516462] [VT-D] It's disallowed to assign 0000:0a:00.0 with shared RMRR at 96ded000 for Dom32753.                                                                                                             
[2022-04-12 14:40:20] (XEN) [  718.516465] d[IO]: assign (0000:0a:00.0) failed (-1)

I assumed this would work because I'm trying to passthrough a PCIe USB chipset not the motherboard chipset.

I have the following questions:

  1. Is there any way I can make this work with xen, perhaps by just using a different PCIe slot
  2. Failing that, would it be possible to make it work with another PCIe card (hardware recommendations would be appreciated)
  3. Failing that, should I just use qemu instead? Is it easier?

I would really appreciate any help!

18 Comments
2022/04/12
14:00 UTC

1

How do I resize /boot on a guest?

I am running ubuntu server 21.04 dom0 and guest. Somehow to /boot is only 275M on my guest which makes it impossible to upgrade.

What are the steps I need to do to resize that partition?

5 Comments
2021/11/19
07:10 UTC

1

Auto restart VM

Hi,

I've just installed Xen for the first time and have installed Ubuntu Server guest on a Ubuntu Server dom0. It seems to be working well although I may have more questions over the coming days.

My question now is how do I set the VMs to auto restart after dom0 comes up?

Also, I'm sure this is common knowledge but all the guides seem to be several years out of date with deprecated commands and the like. Is there anything in the works to update these?

Thanks

2 Comments
2021/10/12
15:00 UTC

2

USB redirection - is it working for anyone?

Hi,

I try to set up a Xen host on Debian 10 (originally 9, now switching to 10). VM's are running fine, everything works, except USB redirection. I manage the VM's from Virt-manager, which connects fine. Network is the default bridge solution.I have tried :- USB device attach to the DomU, xl usb-list shows, but guest not

- USBIP, it works, but not on guests (on any remote client i can attach the shared devices, clients not)

- Spice, nothing

- TCP USB redirection, nothing happens.

​

Has anyone a working method for USB redirection either from the host ports to a guest, or from remote machine to a guest?

Thanks,

9 Comments
2021/09/21
10:39 UTC

4

Xen linux management tool

I want to ask if there is a tool like XenCenter running under Linux.

From my search I have got OpenXenManger but the project looks dead.

6 Comments
2021/09/04
01:00 UTC

5

Xen for home dev

Hi Guys has anyone here used Xen at home? Was thinking of using xen as the base and multiple OSes on my home Desktop PC. Is anyone doing that? Is it advisable?

17 Comments
2021/07/17
16:54 UTC

2

Backups causing vms to go read-only

I have a fair few VMs which I manage via xen orchestra, and run a nightly backup (full at weekend, then intermittent during the weeks)

On occasion some VMs throw errors and remount their disks as read-only. Remounting usually fixes it, but on occasion the file system (ext4) is corrupted. I've even lost data because of it (ironically the only time I've had to use a backup is to recover from a problem caused by the backup process)

I think the problem tends to be around hard drive timeout -- perhaps the backup process blocks writes (or syncs) to the drive, and the process is running too slowly?

Is this normal, is there some setting I should be running on the VMs or on the hypervisor?

3 Comments
2021/06/30
11:18 UTC

2

Any good for Xen?

How would I get on with this spec as a hardware base for installing Xen Project? I'd like to run a couple of permanent VMs (NAS on Linux, CCTV on Windows), and spin up Windows and other instances occasionally for testing etc.

RAM: 32GB

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
Address sizes:       36 bits physical, 48 bits virtual
CPU(s):              8
On-line CPU(s) list: 0-7
Thread(s) per core:  2
Core(s) per socket:  4
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               42
Model name:          Intel(R) Core(TM) i7-2700K CPU @ 3.50GHz
Stepping:            7
CPU MHz:             1601.601
CPU max MHz:         3900.0000
CPU min MHz:         1600.0000
BogoMIPS:            7006.96
Virtualization:      VT-x
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            8192K
NUMA node0 CPU(s):   0-7
8 Comments
2021/06/09
10:41 UTC

1

Guest drivers from RedHat

Are the guest drivers from RedHat (network, disk etc) applicable on Xen and Xen guests?

0 Comments
2021/04/27
14:25 UTC

1

Virtual Switch with multiple PIFs

Hi!
Is it possible to create virtual switch in Xen with multiple PIFs? I want to set virtual pfSense with access to separate 10GBe LAN NICs for NAS and workstation. I'm following this advice:

If your physical host has at least 3 network cards (and pfSense runs as a virtual machine), do it like this:

create a virtual switch for WAN, add one physical network card to it (connect it to your internet), and add pfSense's WAN port here

create a separate one for LAN, add the other two 10GBe network cards to it, add pfSense's LAN port here, and your other virtual machines ports also

connect your PC to one of the free 10GBe ports.

Is second step possible in Xen? In newtwork configuration I can only assign single PIF for virtual switch, except link bonding.

In ESXi on the otherhand adding multiple NICs to vSwitch seams straightforward according to documentation. Is Xen missing this feature?

Thanks!

1 Comment
2021/03/11
13:13 UTC

6

Router VM required for NAT in XCP-ng?

I am trying to accomplish the below network

openwrt---xcpng_host(192.168.1.5)---NAT---VM(10.10.10.2)

I would like the VM to have internet access without being assigned dhcp from openwrt router.

I come from VirtualBox where you can achieve this with a click of a button. Please let me know if this is possible without a router VM.

2 Comments
2021/02/10
16:58 UTC

Back To Top