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
Libvirt package?
Re: Libvirt package?
Just install like this:
Code: Select all
sudo apt-get install qemu-kvm libvirt-clients libvirt-daemon-system
Code: Select all
sudo apt-get install virt-manager
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
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB
Re: Libvirt package?
Thank you. I am going to try later.
Can you copy virtual disk drive the same way of Virtualbox?
Can you copy virtual disk drive the same way of Virtualbox?
MX-19 on Lenovo 520-15IKB
Re: Libvirt package?
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
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB
Re: Libvirt package?
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.
Well, KVM is nice but now I have no time to fix this. I am sticking to Virtualbox then.
MX-19 on Lenovo 520-15IKB
Re: Libvirt package?
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.
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.
Re: Libvirt package?
Im sittin on 19.2 and even with all this installed its still giving errors saying it wants libvirt
update: was able to find spicegtk in the package installer. all is well now jsut for other things
update: was able to find spicegtk in the package installer. all is well now jsut for other things