Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature request] Reuse Ubuntu's Virtual Machine's XML configuration settings for Trisquel #575

Closed
davidhedlund opened this issue Sep 10, 2023 · 4 comments

Comments

@davidhedlund
Copy link

davidhedlund commented Sep 10, 2023

Downstream issue link: #575

Trisquel 10 is based on Ubuntu 20.04, and Trisquel 11 is based on Ubuntu 22.04. However, IDE disk and IDE CDROM is used by the Trisquel hardware detail templates in virt-manager, while Ubuntu uses VirtIO and SATA CDROM, which is faster. Also, I have problems to access USB devices in Trisquel if they use IDE, but not VirtIO.

When the hardware setup is not identical between Trisquel VMs and Ubuntu VMs, it might be difficult to recognize that it can cause the distros to behave differently.

OS information[1] Hardware profiles (generated by "Choose the operating system you are installing" (see screenshot))
Trisquel 10 LTS Chipset: i440FX. IDE (hda), IDE CDROM (hdb)
Trisquel 11 LTS Chipset: i440FX. IDE (hda), IDE CDROM (hdb)
Ubuntu 20.04 LTS Chipset: Q35. VirtIO (vda), SATA CDROM (sda)
Ubuntu 22.04 LTS Chipset: Q35. VirtIO (vda), SATA CDROM (sda)

1: OS information

Evaluated in a fresh Trisquel 11 installation on a dedicated test hard drive to avoid potential errors.

Trisquel 11

File -> New Virtual Machine -> Local install media (add trisquel_11.0_amd64.iso, and click on the "Next" button). The "Automatically detect from the installation media / source" will detect "Trisquel 11.0 LTS" (but it has to be manually set for Trisquel, 10, Ubuntu 20.04, and Ubuntu 22.04, for some reason -- but this is not related to this bug)

image

image


This is something that virt-manager asks the first time you add an ISO from your directory. Just answer yes, it will add a plus sign user permission to the top directory (in this case ~/Downloads/)

image


image

image


Select "Customize configuration before install", to quickly verify the hardware information:

image


image


Notice that "IDE Disk", and "IDE CDROM", is used for Trisquel.

Also, changing the "OS information" later not change the XML domain (the "IDE Disk" will not be changed to "VirtIO" for example).

image

Ubuntu 22.04

image

image

image

image

image

image

Suggested solution

Based on the findings in the table above, a package helper script could copy:

  • Copy the Virtual Machine's XML configuration settings from "Ubuntu 22.04 LTS" to "Trisquel 11 LTS"
  • Copy the Virtual Machine's XML configuration settings from "Ubuntu 20.04 LTS" to "Trisquel 10 LTS"

It's not an option to rename "Ubuntu 22.04 LTS" to "Trisquel 11 LTS / Ubuntu 22.04 LTS", and "Ubuntu 20.04 LTS" to "Trisquel 10 LTS / Ubuntu 20.04 LTS", because Ubuntu is not a free GNU/Linux distribution, so it will not be accepted in Trisquel that is listed as an approved free distro.

virt-manager package info

$ apt-cache show virt-manager
Package: virt-manager
Architecture: all
Version: 1:4.0.0-1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Libvirt Maintainers <pkg-libvirt-maintainers@lists.alioth.debian.org>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 2298
Depends: gir1.2-gtk-3.0 (>= 3.10), gir1.2-gtk-vnc-2.0, gir1.2-gtksource-4, gir1.2-libosinfo-1.0, gir1.2-libvirt-glib-1.0, gir1.2-vte-2.91, python3-dbus, python3-gi (>= 3.31.3~), python3-gi-cairo, python3-libvirt (>= 0.7.1), virtinst (= 1:4.0.0-1), dconf-gsettings-backend | gsettings-backend, python3:any
Recommends: gir1.2-ayatanaappindicator3-0.1 | gir1.2-appindicator3-0.1, gir1.2-spiceclientglib-2.0, gir1.2-spiceclientgtk-3.0, libvirt-daemon-system (>= 1.2.7)
Suggests: gir1.2-secret-1, gnome-keyring, python3-guestfs, ssh-askpass, virt-viewer
Filename: pool/main/v/virt-manager/virt-manager_4.0.0-1_all.deb
SHA512: b6618d34087f2f5edb7fb19ce5b7e7fa151c4190b82ce5360b03050229837996d589af7965f5509c6a6570a605d17780733a57e9f4e76880cce8d4cf627fb0aa
Homepage: https://virt-manager.org/
Size: 261800
SHA256: 5f54b22d8dd4dd2db7e82f5267e72981699d97600a9ee56bfd98a6f2ea58538c
SHA1: 72b92481fcccaffaf2a947da85ae6f772ec8b258
MD5sum: 548c6d54a2aab650eb87db324a8ba502
@davidhedlund davidhedlund changed the title Cannot redirect USB devices for distros installed on /dev/sda Cannot redirect USB devices (/dev/sda) for distros that allready occupies /dev/sda with a running installation Sep 10, 2023
@davidhedlund davidhedlund changed the title Cannot redirect USB devices (/dev/sda) for distros that allready occupies /dev/sda with a running installation Cannot mount USB devices (/dev/sda) for distros that allready occupies /dev/sda with a running installation Sep 11, 2023
@ajgringo619
Copy link

vda device names are only used when using VirtIO disk devices. I use VirtIO SCSI on all of my systems, which uses sda. And, any redirected USB devices show up as sdb.

@davidhedlund davidhedlund changed the title Cannot mount USB devices (/dev/sda) for distros that allready occupies /dev/sda with a running installation OS templates "Trisquel 10", and "Trisquel 11": Cannot mount USB devices Sep 21, 2023
@davidhedlund davidhedlund reopened this Sep 21, 2023
@davidhedlund davidhedlund changed the title OS templates "Trisquel 10", and "Trisquel 11": Cannot mount USB devices OS templates "Trisquel 10", and "Trisquel 11": Cannot find USB devices Sep 21, 2023
@davidhedlund davidhedlund changed the title OS templates "Trisquel 10", and "Trisquel 11": Cannot find USB devices [feature request] OS template "Trisquel 10", and "Trisquel 11", switch from IDE disk and IDE CDROM, to VirtIO and SATA Sep 22, 2023
@davidhedlund davidhedlund changed the title [feature request] OS template "Trisquel 10", and "Trisquel 11", switch from IDE disk and IDE CDROM, to VirtIO and SATA [feature request] Reuse Ubuntu's Virtual Machine's XML configuration settings for Trisquel Sep 22, 2023
@ptoscano
Copy link
Contributor

ptoscano commented Oct 6, 2023

This is already the case in osinfo-db: each Trisquel version properly <derives-from> the Ubuntu version it was forked from.

This is a downstream issue (in Trisquel), see my explanations in #589. Hence, closing.

@ptoscano ptoscano closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2023
@davidhedlund
Copy link
Author

@ptoscano Your help is deeply appreciated. Thank you so much for spending time to help us with Trisquel development!

@davidhedlund
Copy link
Author

davidhedlund commented Nov 12, 2023

Fixed in Trisquel 11: "Fixed by !1202 (merged), soon to land on the repositories vía,

osinfo-db (0.20221130-2+11.0trisquel7)" - https://gitlab.trisquel.org/trisquel/package-helpers/-/issues/116#note_10763

Just to confirm the desired result: Trisquel now uses the same VM XML config as Ubuntu:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants