Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 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
Message
Author
grelos
Forum Novice
Forum  Novice
Posts: 41
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 Guide
Forum Guide
Posts: 1712
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: 41
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 Guide
Forum Guide
Posts: 1712
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: 41
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

Post Reply

Return to “Package Requests/Status - MX 17”