I’ve installed the addons qemu & libvirt, but have been unable to create a VM. I mainly want to use such to check whether or not various Linux distributions:
install as VM (EndeavourOS, eg, does not)
upgrade reliably, to next release
There is an example procedure in https://wiki.ipfire.org/addons/qemu, but most of the parameters appear to be superceded, or at best deprecated and result in error messages “invalid option”, “file not found” etc.
I have not used the command line options since we have libvirt.
Install libvirt on the IPFire after this you can use virtmanager on a client your network to manage vm’s on the IPFire.
First switch the zone config ( wiki.ipfire.org - Zone Configuration ) for the zone that you want use in the vm to bridge. (This will enable the ability to add a virtiual nic from qemu to this zone via virtmanager.)
After this run virtmanager and connect to the IPFire to create/manage virtal machines.
I’ll give that a try. I have been using Virtmanager in openSUSE on my desktop, but my desktop & laptop are limited to 8 GB RAM, whereas my new IPFire has 16 GB, as well as running 24/7.
I have set up a connection from desktop to IPFire, but when I try adding a virtual NIC, I get a message, to the effect, that it is not supported by the connection. Uncertain whether that constraint is in openSUSE or IPFire.
I have set up IPFire as a VM on the desktop, for testing releases, and it is sufficiently compact to run OK there.
I too have the same problem. Thanks to Arne I just managed to get QEMU (Windows 7) working inside IpFire. But all via virt-manager, installed on Ubuntu.
I too am interested in starting QEMU (Windows 7) directly from the IpFire shell, in any way. It’s possible?
I tried with this syntax:
Attempting to create VM on IPFire from another host continues failing, being unable to find a “default suitable network”. I had previously changed green0 to bridge mode, as suggested in https://wiki.ipfire.org/addons/libvirt The following names for the bridge on green0 all fail:
It’s the same problem I encountered. It was hard to figure out how to fix it.
Referring to the first published figure:
I just wrote by hand
green0
inside “device name” and I gave ok.
and everything works for me.
Of course I first set green0 as the bridge as suggested by arne_f.
Referring to the second figure published:
Same thing to me too. But if you handwrite green0 like I said it should work just the same. It works perfectly for me!!!
Everything works for me!!! I managed to figure out how to start the virtual machine (previously created with virt-manager) directly from the IpFire shell. It’s really simple. Here are the shell commands:
But in my opinion you should focus on the solution suggested by arne_f.
That syntax only works well for me on an emulated 32-bit operating system, has many limitations and is complicated to adapt to your needs.
I abandoned her. The system suggested by arne_f looks great to me. The machines you create with libvirt remain fully installed in IpFire and you can launch them from the IpFire shell with
virsh list --all
virsh start nameVM
virsh shutdown nameVM
The only problem is that if you installed an operating system using QEMU, you will probably have to reinstall everything. At least for windows 7 for sure.
Anyway, I’ll try to explain my syntax better:
-vnc :1 = from client, open vnc, type the IP address of the IpFire machine followed by port 1
-hda /mnt/harddisk/macchine_qemu/windows7.img = Full path to the image containing the operating system previously installed with QEMU
-m 1024 = memory to be assigned to the emulated machine.
TO INSTALL THE OPERATING SYSTEM FOR THE FIRST TIME:
qemu -vnc :1 -hda /mnt/harddisk/macchine_qemu/windows7.img -cdrom /mnt/harddisk/Windows7setup.iso -m 1024 -net nic -net user -boot d -usbdevice tablet -k it
-cdrom /mnt/harddisk/Windows7setup.iso = Full path to the ISO image containing the operating system to be installed.
If the ISO images are located in other folders within the Hard Disk mounted in IpFire, you can change /mnt/harddisk/
There would also be another system, suggested to me by cfusco.
Frankly, I haven’t tried it, but it seems to me excellent too, as far as I’ve been able to understand.
You can find it in this post:
Inside the page, look for:
If you do not want to use virtmanager, this is how I do it from the command line…
and see if it can help you.
I could get your qemu syntax for creating an img file to work. I can get your syntax for creating a VM to run, but can’t get vncviewer to connect to IPFire, so installation does not proceed.
I can readily get virt-manager working between two openSUSE hosts and that suffices for my use.
There appear to be too many configuration differences for virtualisation between openSUSE and IPFire. It is not worth my time sorting it out. Reinstallation of IPFire is on my agenda, for a later date.
Thank you too for the trust. I struggle to understand English and the automatic translators are not the best.
I try to express myself according to what I think I understand from your message.
You can very well make my syntax work for creating an img (Virtual Hard Disk) file. Use:
It’s super easy to connect vncviewer to IPFire (it was for me). I give an example: First run QEMU… from IpFire shell. Then open VNC from a client machine. Then write this:
10.168.1.254:1
replace the IP with the Gateway address of your IpFire green. Replace the port with the one you used in qemu (-vnc :1) in my case.
I am attaching the photo. I’m using a VNC client under windows, but you can use any operating system.
For openSUSE hosts I don’t know what to say. Never used. I solved with virt-manager installed on xubuntu to create the machine.
I remain available for anything, according to my small skills regarding IpFire and my English.
I’ve now done a fresh install of core 171. I also installed package “qemu-ga”, which is not mentioned in https://wiki.ipfire.org/addons/qemu
Virt-manager now works sufficiently to create and manage VM. The main shortcoming is that it still does not allow creation of virtual networks. Nor does “virsh net-create some.xml”. Consequently I can’t create:
Now that I can create VM, I see that virtualisation in IPFire does support “spice”, which is the default graphic remote terminal in other implementations of virt-manager that I have investigated. Consequently I have no need to get VNC working.