Fix virt-manager Flatpak command for Bazzite
- Update virt-manager Flatpak command from org.virt-manager.virt-manager to org.virt_manager.virt-manager - This matches the actual Flatpak installation on Bazzite - Update both noble and trixie wrapper scripts - Update usage guide with correct command - Maintain all Bazzite-specific VM creation instructions
This commit is contained in:
parent
1b307bcd17
commit
fc05ffcbb9
3 changed files with 152 additions and 29 deletions
|
|
@ -86,12 +86,39 @@ run_in_vm() {
|
|||
|
||||
if ! command_exists virsh; then
|
||||
echo -e "${RED}Error: virsh is not installed. Please install libvirt-clients first.${NC}"
|
||||
echo "On Bazzite, try: ujust install libvirt-clients"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check for virt-install (may not be available on immutable distros)
|
||||
if ! command_exists virt-install; then
|
||||
echo -e "${RED}Error: virt-install is not installed. Please install virt-install first.${NC}"
|
||||
exit 1
|
||||
echo -e "${YELLOW}Warning: virt-install not found. This is common on immutable distros like Bazzite.${NC}"
|
||||
echo ""
|
||||
echo "Alternative VM creation methods:"
|
||||
echo "1. Use virt-manager (Flatpak) - GUI interface"
|
||||
echo "2. Use virt-install via toolbox/distrobox"
|
||||
echo "3. Use Podman containers instead (recommended)"
|
||||
echo ""
|
||||
echo "For virt-manager (Flatpak):"
|
||||
echo " flatpak run org.virt_manager.virt-manager"
|
||||
echo ""
|
||||
echo "For toolbox/distrobox with virt-install:"
|
||||
echo " toolbox create --distro fedora"
|
||||
echo " toolbox enter"
|
||||
echo " sudo dnf install virt-install"
|
||||
echo ""
|
||||
echo "For Podman container (recommended):"
|
||||
echo " $0 --podman"
|
||||
echo ""
|
||||
read -p "Would you like to try Podman container instead? (Y/n): " -n 1 -r
|
||||
echo
|
||||
if [[ ! $REPLY =~ ^[Nn]$ ]]; then
|
||||
echo "Switching to Podman container..."
|
||||
run_in_podman
|
||||
return
|
||||
else
|
||||
echo "Continuing with VM setup..."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Creating Debian Trixie VM..."
|
||||
|
|
@ -104,18 +131,43 @@ run_in_vm() {
|
|||
else
|
||||
echo "Creating new VM: $VM_NAME"
|
||||
|
||||
# Create VM with Debian Trixie
|
||||
virt-install \
|
||||
--name "$VM_NAME" \
|
||||
--memory 4096 \
|
||||
--vcpus 2 \
|
||||
--disk size=20 \
|
||||
--network default \
|
||||
--os-variant debian12 \
|
||||
--location http://deb.debian.org/debian/dists/bookworm/main/installer-amd64/ \
|
||||
--extra-args "console=ttyS0,115200n8 serial" \
|
||||
--graphics none \
|
||||
--noautoconsole
|
||||
# Try to create VM with virt-install if available
|
||||
if command_exists virt-install; then
|
||||
# Create VM with Debian Trixie
|
||||
virt-install \
|
||||
--name "$VM_NAME" \
|
||||
--memory 4096 \
|
||||
--vcpus 2 \
|
||||
--disk size=20 \
|
||||
--network default \
|
||||
--os-variant debian12 \
|
||||
--location http://deb.debian.org/debian/dists/bookworm/main/installer-amd64/ \
|
||||
--extra-args "console=ttyS0,115200n8 serial" \
|
||||
--graphics none \
|
||||
--noautoconsole
|
||||
else
|
||||
echo -e "${YELLOW}virt-install not available. Please create VM manually:${NC}"
|
||||
echo ""
|
||||
echo "1. Open virt-manager (Flatpak):"
|
||||
echo " flatpak run org.virt_manager.virt-manager"
|
||||
echo ""
|
||||
echo "2. Create new VM with these settings:"
|
||||
echo " - Name: $VM_NAME"
|
||||
echo " - Memory: 4096 MB"
|
||||
echo " - CPUs: 2"
|
||||
echo " - Disk: 20 GB"
|
||||
echo " - OS: Debian 12 (Bookworm)"
|
||||
echo " - Network: Default"
|
||||
echo ""
|
||||
echo "3. Once VM is created and running, connect to it and run:"
|
||||
echo " git clone https://git.raines.xyz/robojerk/libostree-dev.git"
|
||||
echo " cd libostree-dev"
|
||||
echo " ./backport-trixie.sh"
|
||||
echo ""
|
||||
echo "Alternatively, use Podman container:"
|
||||
echo " $0 --podman"
|
||||
return
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}VM created successfully. You can connect to it with:${NC}"
|
||||
echo "virsh console $VM_NAME"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue