Welcome!

The kernel problem with recent updates has been solved. Find the solution here

Important information
-- Required MX 15/16 Repository Changes
-- Information on torrent hosting changes
-- Information on MX15/16 GPG Keys
-- Spectre and Meltdown vulnerabilities

News
-- Introducing our new Website
-- MX Linux on social media: here

Current releases
-- MX-18.3 Point Release release info here
-- Migration Information to MX-18 here
-- antiX-17.4.1 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

Libvirt package?

Post Reply
grelos
Forum Novice
Forum  Novice
Posts: 69
Joined: Wed Mar 28, 2018 3:12 pm

Libvirt package?

#1

Post by grelos » Tue Oct 02, 2018 2:57 am

Hello,

I would like to move from Virtualbox to KVM/QEMU, so I need to install libvirt package.
I cannot find it in either the Stable Repo or the Test Repo.

Should I install it with apt-get?
Thank you
MX-17 on Asus FX753VD and Lenovo 520-15IKB

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4284
Joined: Wed Apr 11, 2018 5:09 pm

Re: Libvirt package?

#2

Post by fehlix » Tue Oct 02, 2018 6:01 am

grelos wrote:
Tue Oct 02, 2018 2:57 am
I would like to move from Virtualbox to KVM/QEMU, so I need to install libvirt package.
I cannot find it in either the Stable Repo or the Test Repo.
Just install like this:

Code: Select all

sudo apt-get  install qemu-kvm libvirt-clients libvirt-daemon-system
perhaps add this GUI:

Code: Select all

sudo apt-get  install virt-manager 
Here a little starter-script, I'm using for running MX17 Linux ISO's within KVM/QEmu,
just as a template ... which can be used to boot KVM/Qemu with
sata-emulated drives (/dev/sda1) and paravirtual disk drives (/dev/vda1)
including shared folder.

Code: Select all

#-----------------------------------------------
#!/bin/bash
# fehlix:  KVM/Qemu start
# with sata-emulated drives (/dev/sda1) and paravirtual disk drives
# including shared folder
# qemu-starter.sh
set -x

ISO=/ISO/MX-Linux/MX-17.1/September/MX-17.1_September_x64.iso
IMG=/QEMU/MX-17.1_September_x64.img
DIR=/QEMU/SharedFolder

NAME=$( basename $IMG .img )
# ------------------------------------
# mount shared folder in guest:
# mkdir /tmp/shared_folder 
# mount -t 9p -o trans=virtio,version=9p2000.L,posixacl,cache=mmap shared_folder /tmp/shared_folder 
# ------------------------------------

BOOT_ORDER="cd"  # boot from IMG
BOOT_ORDER="dc"  # boot from ISO

VIRT="if=virtio"    # boot with para-virtual  drives: /dev/vda
VIRT="media=disk"   # boot with sata-emulated drives: /dev/sda

qemu-system-x86_64 \
	-name ${NAME} \
	-cpu host \
	-enable-kvm \
	-m 4048 \
	-smp 4 \
	-rtc base=utc \
	-netdev user,id=vmnic \
	-device virtio-net,netdev=vmnic \
	-virtfs local,id=shared_folder_dev_0,path=${DIR},security_model=none,mount_tag=shared_folder \
	-drive file=$IMG,index=0,${VIRT} \
	-cdrom $ISO \
	-boot order=${BOOT_ORDER} 

exit
:puppy:
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

grelos
Forum Novice
Forum  Novice
Posts: 69
Joined: Wed Mar 28, 2018 3:12 pm

Re: Libvirt package?

#3

Post by grelos » Tue Oct 02, 2018 9:17 am

Thank you. I am going to try later.
Can you copy virtual disk drive the same way of Virtualbox?
MX-17 on Asus FX753VD and Lenovo 520-15IKB

User avatar
fehlix
Forum Veteran
Forum Veteran
Posts: 4284
Joined: Wed Apr 11, 2018 5:09 pm

Re: Libvirt package?

#4

Post by fehlix » Tue Oct 02, 2018 9:40 am

grelos wrote:
Tue Oct 02, 2018 9:17 am
Thank you. I am going to try later.
Can you copy virtual disk drive the same way of Virtualbox?
Well, the IMG-drive is a file which you can copy.
I have adjusted the creation if not exist in this starter example.

Code: Select all

#-----------------------------------------------
#!/bin/bash
# fehlix:  KVM/Qemu start
# with sata-emulated drives (/dev/sda1) and paravirtual disk drives
# including shared folder
# qemu-starter.sh
set -x

ISO=/ISO/MX-Linux/MX-17.1/September/MX-17.1_September_x64.iso
IMG=/QEMU/MX-17.1_September_x64.img
DIR=/QEMU/SharedFolder

# create QEMU-IMG if not erxists
SIZ=32G
[ -f $IMG ] || qemu-img create -f qcow2 ${IMG} ${SIZ}

NAME=$( basename $IMG .img )
# ------------------------------------
# mount shared folder in guest:
# mkdir /tmp/shared_folder 
# mount -t 9p -o trans=virtio,version=9p2000.L,posixacl,cache=mmap shared_folder /tmp/shared_folder 
# ------------------------------------

BOOT_ORDER="cd"  # boot from IMG
BOOT_ORDER="dc"  # boot from ISO

VIRT="if=virtio"    # boot with para-virtual  drives: /dev/vda
VIRT="media=disk"   # boot with sata-emulated drives: /dev/sda

qemu-system-x86_64 \
	-name ${NAME} \
	-cpu host \
	-enable-kvm \
	-m 4048 \
	-smp 4 \
	-rtc base=utc \
	-netdev user,id=vmnic \
	-device virtio-net,netdev=vmnic \
	-virtfs local,id=shared_folder_dev_0,path=${DIR},security_model=none,mount_tag=shared_folder \
	-drive file=$IMG,index=0,${VIRT} \
	-cdrom $ISO \
	-boot order=${BOOT_ORDER} 
exit
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

grelos
Forum Novice
Forum  Novice
Posts: 69
Joined: Wed Mar 28, 2018 3:12 pm

Re: Libvirt package?

#5

Post by grelos » Wed Oct 03, 2018 2:14 am

I am already running into a bunch of problems, basically all due to using external HDDs either for storage and for the installation ISO. VMM claims that it cannot access them. Last problem is something about Virtual Manager default firewall.
Well, KVM is nice but now I have no time to fix this. I am sticking to Virtualbox then.
MX-17 on Asus FX753VD and Lenovo 520-15IKB

bobbee
Forum Novice
Forum  Novice
Posts: 36
Joined: Sun Apr 07, 2019 7:17 pm

Re: Libvirt package?

#6

Post by bobbee » Mon Apr 08, 2019 4:18 pm

Thank you @fehlix, I was missing one or two of those dependencies.
The script is interesting too. I do mine from the gui, but might be handy sometime.
I install virt-manager with -y --install-suggests. That puts a bunch of stuff on. I also needed etables and dns-masq and I think some other stuff
As you have in your script, the mx linux install doesn't like the default virtual drive, had to change that, I also used sata.
It took a bit to install it on mint too when I had that on my machine before I switched to mx linux.

Post Reply

Return to “Package Requests/Status - MX 17/18”