Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Xen domu install Debian netboot

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
PGibson
Posts: 3
Joined: 2021-01-02 21:35

Xen domu install Debian netboot

#1 Post by PGibson »

I've been getting a Xen hypervisor configured on a 4 year old dell precision tower. I started with Debian Buster, following the installation guide, then configuring the network and installing xen-tools. I am now installing the domU debian guest (Buster again) on a logical volume which I will use as my Plex server (which currently resides on my Celeron based NAS build). I am using the config file that I found here: http://ftp.debian.org/debian/dists/bust ... tboot/xen/. The domain is created successfully, and when I attach to the console I find the debian installer running. The process goes smoothly until I try to write partitions on my logical volume (40GB within a 4TB physical volume). The partition scheme sets up a 39GB root drive on partition 1 and a 1GB swap partition on 5. I consistently get an error when it tries to write the partitions that:

The creation of swap space in partition #5 of Virtual disk 1 (xvda) failed.

I have seen references that say to use a swap partition on a separate disk, but I don't know how to do that and the references that give that note don't give any corresponding hints on how to do that (manual partitioning? Guided?). Should I manually create partitions rather than letting the installer create them automatically, and if so how do I get the installer to use the partitions I created? If I add another disk for the swap partition in the domain.cfg file is there some way to manually instruct the installer to use it rather than divide the logical volume into the two partitions?

Thanks for any insight . . I've been searching and reading for two days and if I found the answer along the way I either did not understand it well enough to make it work, or perhaps even realize that I saw an answer.

Here is the line config file entry for the drive:
disk = ['phy:/dev/vg0/PlexGuest_Data,xvda,w']

And fdisk -l shows it as existing with logical sector size of 512 bytes and physical sectors at 4096 bytes. One other thing that might be related is that after I exit the installer and am back in the host system terminal window (ssh from my Windows laptop using WSL2) fdisk -l does not return anything, like some process on the host side has been corrupted.

What could I do differently? This is my 4th try using a variety of setups, sometimes with an lv on the same physical disk that the host system is on, tried with a separate disk configured as a logical volume, and this time as the logical volume on a raid pool, but each time I get this same error.

CwF
Global Moderator
Global Moderator
Posts: 2681
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Xen domu install Debian netboot

#2 Post by CwF »

PGibson wrote:disk = ['phy:/dev/vg0/PlexGuest_Data,xvda,w']
I'm not a xen guy, but my simpler qemu/kvm/vmm setups work fine with passed disk. This just looks bad, you are passing a disk enumerated as a VG and managed by the host? Maybe that's the xen way?

I pass disk raw, with no host involvement, meaning they can only be called out by id, or /dev/disk/by-id/entry. For further simplicity I link it to the default /images directory so the default storage pool is not changed.

PGibson
Posts: 3
Joined: 2021-01-02 21:35

Re: Xen domu install Debian netboot

#3 Post by PGibson »

Yes it seems that the Debain Xen guides all recommend using logical volumes managed by the host so that resizing volumes down the line is easier. I actually got it to work (no idea what I did) but the disk I used turned out to have a lot of errors, and failed a deep diagnostic. So back to square 1.

CwF
Global Moderator
Global Moderator
Posts: 2681
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: Xen domu install Debian netboot

#4 Post by CwF »

PGibson wrote: So back to square 1.
Start with an evaluation of scale!

Xen, and it's ways make no sense until you are on the scale of a farm. Don't fall for features or capabilities that will never come into play in your actual scenario. This method IMO is simply 'not good'. Resizing is easier? for who, the vm or the host? This method adds a serious barrier to 'easy'.

What's the goal?
You touch on many points to know! IMO much older advice needs thrown out. As I said, some choices simply don't matter. I don't create anything anymore with multiple partitions unless encrypted, that's only a host feature. So, from a small initial vm you have maximum flexibility. You can expand it later, and vm's can have more than one disk, and if you are in bullseye range the vm can simply share host space. The are to many post install actions possible to justify locking in constraints at creation time.
Note on the swap - you can now install easily without. zram-tools after install, and post install expansion is trivial. Build so that you don't need swap!

For a server setup in a vm I would segregate the OS from the data and use a vm with two disk, and manage them separately on the host - they can literally be anywhere.

PGibson
Posts: 3
Joined: 2021-01-02 21:35

Re: Xen domu install Debian netboot

#5 Post by PGibson »

I have finally determined that amongst some actual disk errors (failed deep diagnostics), and inconsistent operation (that would be me) of the installer that my primary problem boils down to incorrect procedures for setting up the LV for use by the guest. What works best ( and perhaps only works) is to set up the partitions on the LV with fdisk, and then to use the manual mode in the installer to assign the usage and mount points (not required for the swap) manually before writing the partitions. For some reason the installer might get though without doing this, but the system will not be able to run correctly and might even crash the host (as I was seeing).

Post Reply