In ubuntui i have virt-manager that uses kvm qemu for virtualization
i make virtualization and it doesnt start if i choose linux 2022 or generic or ubuntu 22
how to make it work?
Here is last 2 screenshots before i get blank screen
Virt-manager puppy live not working
Moderators: 666philb, Forum moderators
Virt-manager puppy live not working
- user1234
- Posts: 415
- Joined: Sat Feb 26, 2022 5:48 am
- Location: Somewhere on earth
- Has thanked: 156 times
- Been thanked: 90 times
Re: Virt-manager puppy live not working
Well, actually I also tried it, but it never did.
There is a script inside woof-CE which allows running the ISOs through QEMU.
I am not having my laptop right now, so can't send you the script; but will definitely post it here whenever I can access it.
You can try running qemu by setting display to sdl (with maybe virtgl enabled).
PuppyLinux gives new life to old computers
-
- Posts: 3892
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1645 times
- Been thanked: 528 times
Re: Virt-manager puppy live not working
Hello @Kangarooo
Change your QEMU video driver (in Virt-Manager for this PUP effort). The one it is using for QEMU, currently, wont work with your FossaPUP64. My QEMU stanza looks like this issued from a terminal prompt:
Code: Select all
qemu-system-x86_64 -name "FossaPUP64 v3" -enable-kvm -smp 2 -m 2G -vga std -device AC97 -net nic -net user -rtc base=localtime -boot d -cdrom Downloads/fossapup64-9.5-23v3.iso
Also, on your Ubuntu PC would you also report what you get when booting this forum's BookWormPUP64 ISO file found here
Let us know.
- user1234
- Posts: 415
- Joined: Sat Feb 26, 2022 5:48 am
- Location: Somewhere on earth
- Has thanked: 156 times
- Been thanked: 90 times
Re: Virt-manager puppy live not working
Yes, @Clarity's qemu command should do it.
The only required changes will be using the -vga std
.
I tend to stick with -vga virtio
for some ISOs, since that allows fitting of the screen resolution to my actual screen resolution (I use a 1366x768
screen, but -vga std
sets the screen size to 1280x720
for some ISOs I used).
You can also try adding -display gtk,gl=on
or -display sdl,gl=on
(or any of these without ,gl=on
) to the above -vga ...
.
For me, with -vga virtio
, -display gtk,gl=on
sends keypresses such as Ctrl+Tab to the host, while -display sdl,gl=on
sends the keypresses to the VM.
BTW, you can also use this script, if virt-manager does not work:
Code: Select all
#!/bin/bash
SOUND_CMD=""
FLASH_CMD="-device nec-usb-xhci,id=xhci"
IMG_CMD=""
EXTRA_CMD="-cpu host -display gtk,gl=on -smp 2"
STICK_NUM=0
CONTINUE_WO_ERROR=0 # continue without spelling out error? Useful when the previous was such a flag which accepts its next cli option as well
ISO_PATH_PROVIDED=0
for cli_flag in "$@"; do
case $cli_flag in
--help|-h)
echo \
"Run your self built Puppy in qemu!
Usage: $0 [OPTIONS] -iso/-i [ISO FILE]
Option Meaning
-h, --help Show this help.
--no-sound Disable sound in opened VM.
-m,-img Use this as '-img [Disk Image '.img' File]'.
-e,--ext Use this as '-ext /dev/[BLOCK DEVICE NAME]'.
Notes:
1. QEMU is required to run this application.
2. [ISO FILE] is the path to the generated '.iso' file. This is necessary
field.
3. Disk Image file with '.img' file format is a file which can be used as a
'virtual storage drive (hard drive)'. Using this is optional, but can be
used if you want to save some of your work in the qemu session. Please
refer https://qemu-project.gitlab.io/qemu/system/images.html for tutorial
on creating one.
4. '-ext' can be used to allow QEMU to use external storage device which has
a block name assigned to it. You can use 'lsblk' to determine the
[BLOCK DEVICE NAME] assigned by the kernel to your storage device.
NOTE+ADVICE: This option can be used with internal storage devices as
well, but if the VM has been run from PuppyLinux itself, the Puppy ran in
VM may start using the same save file/folder which host is running on and
might corrupt it."
exit
;;
-iso|-i)
shift
[ ! "$1" ] && echo "Please specify the path to a valid bootable ISO image." && exit 1
[ ! -f "$1" ] && echo "ISO image '$1' not found. Please specify the path to a valid bootable ISO image." && exit 1
ISO_PATH=$1
shift
CONTINUE_WO_ERROR=1
ISO_PATH_PROVIDED=1
;;
-img|-m)
shift
[ ! "$1" ] && echo "Please specify the path to a 'IMG' disk image." && exit 1
[ ! -f "$1" ] && echo "Disk image '$1' not found. Please refer https://qemu-project.gitlab.io/qemu/system/images.html for tutorial on creating one." && exit 1
IMG_CMD="$IMG_CMD -drive file=$1"
shift
CONTINUE_WO_ERROR=1
;;
-ext|-e)
shift
if [ -z "$1" ]; then
echo "Please specify block device name to be used."
exit 1
elif ! test -b "$1"; then
echo "'$1' is not a block device."
exit 1
elif [ "$(mount | grep -c "$1")" -gt 0 ]; then
echo "'$1' is currently mounted; please unmount first."
exit 1
fi
FLASH_CMD="$FLASH_CMD -device usb-storage,bus=xhci.0,removable=on,drive=stick""$STICK_NUM"" -drive file=""$1"",format=raw,if=none,id=stick""$STICK_NUM"
STICK_NUM=$((STICK_NUM+1))
shift
CONTINUE_WO_ERROR=1
;;
--no-sound)
SOUND_CMD=""
shift
;;
*)
if [ $CONTINUE_WO_ERROR -eq 1 ]; then
CONTINUE_WO_ERROR=0
continue
fi
echo "Unknown option $cli_flag. Please run 'runqemu_woof.sh --help' for help."
exit 1
;;
esac
done
VGA_TYPE=${VGA_TYPE:-virtio}
REDIR_PORT=${REDIR_PORT:-3222}
MEM=${MEM:-2048}
QEMU=qemu-system-x86_64
! type $QEMU >/dev/null 2>/dev/null && QEMU=qemu-system-x86
! type $QEMU >/dev/null 2>/dev/null && QEMU=qemu-system-i386
! type $QEMU >/dev/null 2>/dev/null && echo "Sorry I can't find QEMU. Please install one." && exit 1
[ $ISO_PATH_PROVIDED -eq 0 ] && echo "Please specify the path to a valid bootable ISO image." && exit 1
ISO_CMD="-boot d -cdrom $ISO_PATH"
[ "$REDIR" ] && REDIR="-redir tcp:$REDIR_PORT::22"
# shellcheck disable=SC2086
$QEMU -vga $VGA_TYPE -enable-kvm -m $MEM $REDIR $ISO_CMD $SOUND_CMD $IMG_CMD $FLASH_CMD $EXTRA_CMD
This is a modified version of runqemu_woof.sh from woof-CE. Run the script with --help
to see usage.
NOTE: I earlier got the sound command working, but after I deleted the previous version of this script accidentally, I have not yet been able to figure out how to add sound (so, you will need to tweak the SOUND_CMD=""
line if you want sound inside your VM).
PuppyLinux gives new life to old computers
-
- Posts: 3892
- Joined: Fri Jul 24, 2020 10:59 pm
- Has thanked: 1645 times
- Been thanked: 528 times
Re: Virt-manager puppy live not working
user1234 wrote: Thu Mar 28, 2024 7:56 am...
NOTE: I earlier got the sound command working, but after I deleted the previous version of this script accidentally, I have not yet been able to figure out how to add sound (so, you will need to tweak theSOUND_CMD=""
line if you want sound inside your VM).
Hello @user1234
I am unfamiliar with this problem as I have always had audio via the host speaker when generated within an app or browser in the VM. The QEMU commands I have presented on this forum are such VMs. Additionally the hosts distros I use produce the audio results desired with no efforts or environmental changes.
Questions
Which host distro and/or which VM QEMU stanzas do not give you audio, requiring you to change an environmental variable? AND, is that variable changed at the host level or is it required within the VM's distro?
Just Curious
- user1234
- Posts: 415
- Joined: Sat Feb 26, 2022 5:48 am
- Location: Somewhere on earth
- Has thanked: 156 times
- Been thanked: 90 times
Re: Virt-manager puppy live not working
Clarity wrote: Thu Mar 28, 2024 10:09 amQuestions
Which host distro and/or which VM QEMU stanzas do not give you audio, requiring you to change an environmental variable? AND, is that variable changed at the host level or is it required within the VM's distro?
Basically, you need to add a -device [DEV_NAME_FOR_SOUND_DRIVER]
to the command. For me, the device name intel-hda
works. In the command you provided, you used AC97
.
The variable I was talking about was inside the script. The script actually uses that variable to provide the options for sound, run as $QEMU ... $SOUND_CMD ...
.
Run qemu-system-x86_64 -device help | less
, and search for Sound devices
by pressing /
followed by the search query. This will list all supported sound devices in qemu. You'll have to choose one for you; intel-hda
may just work.
PuppyLinux gives new life to old computers
Re: Virt-manager puppy live not working
@Kangarooo
I just wanted to mention my experience doing this. I've used virt-manager before and originally couldn't get the BookwormPup64 or any puppy linuxes working until the help from this site helped me to do it with Qemu. Once I saw that it would work with Qemu, I went back to try it again by using virt-manager. Again it wouldn't work. I found that the default settings of virt-manager was the problem. So the changes I need to make it work were:
Storage drive needed to be SATA
(it seems Qemu defaults to that but virt-manager defaults to Virtio which none of the puppies will work with) Also it will allow the iso to come up to install if the storage is set to Virtio, but when you run the installed puppy, it won't boot.
Video: VGA
also I set the the linux version in your case to ubuntu20.04
I've been using BookwormPup64, but just tried the installation of FossaPup64, which also works. I tested the sound which works too.
I hope this helps.