[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
External snapshots and using qemu without libvirt
From: |
Leek, Jim |
Subject: |
External snapshots and using qemu without libvirt |
Date: |
Mon, 13 Sep 2021 14:34:25 +0000 |
I'm still messing about with qemu snapshots. I have internal snapshots working
OK. But I read this in the RHEL documentation: "Important: Red Hat recommends
the use of external snapshots." Then on a later page I found this: "However,
external snapshots are currently not fully implemented on Red Hat Enterprise
Linux 7, and are not available when using virt-manager." Ha!
Maybe external snapshots will work if I run qemu without libvirt? But I'm
having trouble getting that to work as well. I found this page and followed
the instructions:
https://developers.redhat.com/blog/2020/03/06/configure-and-run-a-qemu-based-vm-outside-of-libvirt
(although he talks about qemu-system-x86_64 and I'm using qemu-kvm, but I hope
that doesn't make any difference.)
But I can't get it to work. I've tried a number of modifications, and the
command line below launches the VM, but I can't access it. No screen pops up,
and I can't get there via ssh. If I take off the last lines about the display
it will say I can use VNC ::1:5900, but when I connect there it with a VNC
client it just says "guest has not initialized display yet."
Anybody have any ideas on any of this?
Thanks
Here's the command line I've tried. The removing the last 2 arguments does
change the display behavior, but not to any particular benefit:
#! /bin/sh
export LC_ALL=C
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
export HOME=/var/lib/libvirt/qemu/domain-6-centos8_3
export XDG_DATA_HOME=/var/lib/libvirt/qemu/domain-6-centos8_3/.local/share
export XDG_CACHE_HOME=/var/lib/libvirt/qemu/domain-6-centos8_3/.cache
export XDG_CONFIG_HOME=/var/lib/libvirt/qemu/domain-6-centos8_3/.config
export QEMU_AUDIO_DRV=spice
/usr/libexec/qemu-kvm \
-name guest=centos8_3,debug-threads=on \
-S \
-enable-fips \
-machine pc-q35-rhel8.2.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off \
-cpu
Skylake-Server-IBRS,ss=on,vmx=on,pdcm=on,hypervisor=on,tsc-adjust=on,clflushopt=on,umip=on,pku=on,md-clear=on,stibp=on,arch-capabilities=on,ssbd=on,xsaves=on,ibpb=on,ibrs=on,amd-stibp=on,amd-ssbd=on,skip-l1dfl-vmentry=on,pschange-mc-no=on
\
-m 24000 \
-overcommit mem-lock=off \
-smp 2,sockets=2,cores=1,threads=1 \
-uuid 8dd20f24-3e31-464c-956e-67d3d9f2a83c \
-no-user-config \
-rtc base=utc,driftfix=slew \
-global kvm-pit.lost_tick_policy=delay \
-no-hpet \
-no-shutdown \
-global ICH9-LPC.disable_s3=1 \
-global ICH9-LPC.disable_s4=1 \
-boot strict=on \
-device
pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2
\
-device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
-device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
-device pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3 \
-device pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4 \
-device pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5 \
-device pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6 \
-device pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7 \
-device pcie-pci-bridge,id=pci.9,bus=pci.1,addr=0x0 \
-device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 \
-blockdev
'{"driver":"file","filename":"/home/leek2/qemu/rhel8_1-clone-1.qcow2","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}'
\
-blockdev
'{"node-name":"libvirt-1-format","read-only":false,"driver":"qcow2","file":"libvirt-1-storage","backing":null}'
\
-device
virtio-blk-pci,scsi=off,bus=pci.4,addr=0x0,drive=libvirt-1-format,id=virtio-disk0,bootindex=1
\
-device
virtio-net-pci,netdev=hostnet0,id=net0,mac=6c:2b:59:e9:44:49,bus=pci.7,addr=0x0
\
-netdev bridge,id=hostnet0,br=virbr0 \
-chardev spicevmc,id=charchannel0,name=vdagent \
-device
virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel0,id=channel0,name=com.redhat.spice.0
\
-device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 \
-object rng-random,id=objrng0,filename=/dev/urandom \
-device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 \
-msg timestamp=on \
-device
qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1
\
-spice
port=5900,addr=127.0.0.1,disable-ticketing,image-compression=off,seamless-migration=on
- External snapshots and using qemu without libvirt,
Leek, Jim <=