On Wed, Aug 31, 2016 at 12:48:33PM +0200, Martin Kletzander wrote:> On Mon, Aug 29, 2016 at 09:42:17PM -0400, Brandon Golway wrote: > > (Copied from my post on the Arch Linux forums:[...]> > Can someone clue me in on what the issue is? > > > > Here's the entire XML config for the FreeNAS VM > > > > [code]<!-- > > WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE > > OVERWRITTEN AND LOST. Changes to this xml configuration should be made > > using: > > virsh edit FreeNAS_10 > > or other application using the libvirt API. > > --> > > > > Just as I see you grabbed it from the place where it is stored, you > should rather instead do 'virsh dumpxml FreeNAS_10', or remove the > comment above. Otherwise it steers other users to believing that > mangling with internal XML files is safe.Yeah, or use the `virt-xml` tool (comes as part of `virt-install` package). To pass-through host CPU to the level-1 guest: $ virt-xml FreeNAS_10 --edit --cpu host-passthrough,clearxml=yes If you issue this while the guest is running, it'll take affect on next reboot.> > <domain type='kvm'> > > <name>FreeNAS_10</name> > > <uuid>ea816b85-7685-495a-bc97-28a882f190d7</uuid> > > <title>FreeNAS v10</title> > > <description>Nightly Alpha Test Releases</description> > > <memory unit='KiB'>6340608</memory> > > <currentMemory unit='KiB'>6340608</currentMemory> > > <vcpu placement='static'>4</vcpu> > > <os> > > <type arch='x86_64' machine='pc-i440fx-2.6'>hvm</type> > > <bootmenu enable='no'/> > > </os> > > <features> > > <acpi/> > > <apic/> > > <vmport state='off'/> > > </features> > > <cpu mode='host-passthrough'/> > > Although what you did should be enough for the nested virt to work, I > have just an idea to try out. I can't try it because I don't have > nested virt turned on for the module and don't want to reboot now.Assuming you're talking about the physical host, you don't need a reboot of the host :-) You can simply: $ sudo rmmod kvm-intel $ echo "options kvm-intel nested=y" > /etc/modprobe.d/dist.conf $ sudo modprobe kvm-intel> But > if you have new enough libvirt, you should be able to do: > > <cpu mode='host-passthrough'> > <feature policy='require' name='vmx'/> > </cpu> > > Also check that you are not missing the kvm_intel module in the L1 guest > kernel and other similar non-nested troubleshooting steps as well.Yeah. If the L1 guest has the /dev/kvm character device, then he's good: $ file /dev/kvm /dev/kvm: character special (10/232) -- /kashyap
On Thu, Sep 01, 2016 at 12:11:17PM +0200, Kashyap Chamarthy wrote:>On Wed, Aug 31, 2016 at 12:48:33PM +0200, Martin Kletzander wrote: >> On Mon, Aug 29, 2016 at 09:42:17PM -0400, Brandon Golway wrote: >> > (Copied from my post on the Arch Linux forums: > >[...] > >> > Can someone clue me in on what the issue is? >> > >> > Here's the entire XML config for the FreeNAS VM >> > >> > [code]<!-- >> > WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE >> > OVERWRITTEN AND LOST. Changes to this xml configuration should be made >> > using: >> > virsh edit FreeNAS_10 >> > or other application using the libvirt API. >> > --> >> > >> >> Just as I see you grabbed it from the place where it is stored, you >> should rather instead do 'virsh dumpxml FreeNAS_10', or remove the >> comment above. Otherwise it steers other users to believing that >> mangling with internal XML files is safe. > >Yeah, or use the `virt-xml` tool (comes as part of `virt-install` >package). To pass-through host CPU to the level-1 guest: > > $ virt-xml FreeNAS_10 --edit --cpu host-passthrough,clearxml=yes > >If you issue this while the guest is running, it'll take affect on next >reboot. > >> > <domain type='kvm'> >> > <name>FreeNAS_10</name> >> > <uuid>ea816b85-7685-495a-bc97-28a882f190d7</uuid> >> > <title>FreeNAS v10</title> >> > <description>Nightly Alpha Test Releases</description> >> > <memory unit='KiB'>6340608</memory> >> > <currentMemory unit='KiB'>6340608</currentMemory> >> > <vcpu placement='static'>4</vcpu> >> > <os> >> > <type arch='x86_64' machine='pc-i440fx-2.6'>hvm</type> >> > <bootmenu enable='no'/> >> > </os> >> > <features> >> > <acpi/> >> > <apic/> >> > <vmport state='off'/> >> > </features> >> > <cpu mode='host-passthrough'/> >> >> Although what you did should be enough for the nested virt to work, I >> have just an idea to try out. I can't try it because I don't have >> nested virt turned on for the module and don't want to reboot now. > >Assuming you're talking about the physical host, you don't need a reboot >of the host :-) You can simply: > > $ sudo rmmod kvm-intel > $ echo "options kvm-intel nested=y" > /etc/modprobe.d/dist.conf > $ sudo modprobe kvm-intel >Unless: $ zgrep -i kvm_intel /proc/config.gz CONFIG_KVM_INTEL=y Maybe I could switch to =m when I'm building the next kernel.>> But >> if you have new enough libvirt, you should be able to do: >> >> <cpu mode='host-passthrough'> >> <feature policy='require' name='vmx'/> >> </cpu> >> >> Also check that you are not missing the kvm_intel module in the L1 guest >> kernel and other similar non-nested troubleshooting steps as well. > >Yeah. If the L1 guest has the /dev/kvm character device, then he's good: > > $ file /dev/kvm > /dev/kvm: character special (10/232) > > >-- >/kashyap-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: Digital signature URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20160901/fb0de3ed/attachment.sig>
hi all & @Kayshap does [this handout on snapshots](https://kashyapc.fedorapeople.org/virt/lc-2012/snapshots-handout.html) by Kashyap Chamarthy (I believe from 2012) still apply to current versions of libvirt-bin & qemu? - ubuntu: 14.04 - qemu: 2.0.0 - libvirt-bin 1.2.2-0ubuntu13.1.17 if not, is there an updated version available somewhere? Right now mainly interested in internal snapshots (which can be taken & removed on a running machine, if I am not mistaken)
On Sat, Sep 03, 2016 at 02:39:11PM +0800, gunnar.wagner@netcologne.de wrote:> hi all & @Kayshap > > does [this handout on > snapshots](https://kashyapc.fedorapeople.org/virt/lc-2012/snapshots-handout.html) > by Kashyap Chamarthy (I believe from 2012) still apply to current > versions of libvirt-bin & qemu?Yes, as the URL indicates, it's from 2012. And, most of the content there is valid. However, some things have changed, with recent improvements in QEMU and libvirt. E.g. from the "blockcommit" section in the doc, now (from QEMU 2.0) it is possible to merge down the current active layer into base.> - ubuntu: 14.04 > - qemu: 2.0.0 > - libvirt-bin 1.2.2-0ubuntu13.1.17 > > > if not, is there an updated version available somewhere? >Though I haven't updated that document to reflect current new reality, that details mentioned there are still relevant. However, Eric Blake has done an excellent talk on backing chains, snapshots, and their management at KVM Forum 2015. Here's the talk (slides are in the video description): https://www.youtube.com/watch?v=etIGp12RHRE -- Backing Chain management in QEMU and libvirt by Eric Blake> Right now mainly interested in internal snapshots (which can be taken > & removed on a running machine, if I am not mistaken)Yes, internal snapshots can be performed on a running guest (or offline). Compare and contrast them with external snapshots, to see what works best for your use case. -- /kashyap