Announcement

Collapse
No announcement yet.

I'm going to experiment with kvm's today so ...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    I'm going to experiment with kvm's today so ...

    I needed to create a snapshot of my system:

    Code:
    :~$ [FONT=courier new][B]sudo -i[/B][/FONT]
    [sudo] password for jerry: 
    :~# mount /dev/disk/by-uuid/47a4794f-b168-4c61-9d0c-cc22f4880116 /mnt
    :~# vdir /mnt/snapshots/
    total 0
    drwxr-xr-x 1 root root 270 Jul  2 14:43 @_20180705
    drwxr-xr-x 1 root root 270 Jul  2 14:43 @20180711
    drwxr-xr-x 1 root root  10 May  3 23:06 @home_20180705
    drwxr-xr-x 1 root root  10 May  3 23:06 @home20180711
    drwxr-xr-x 1 root root  10 May  3 23:06 @home_P5132
    drwxr-xr-x 1 root root  10 May  3 23:06 @home_precont
    drwxr-xr-x 1 root root 270 Jun 20 15:28 @_P5132
    drwxr-xr-x 1 root root 270 Jul  2 14:43 @_precont
    root@jerry-Aspire-V3-771:~# [FONT=courier new][B]btrfs su snapshot -r /mnt/@ /mnt/snapshots/@20180714[/B][/FONT]
    Create a readonly snapshot of '/mnt/@' in '/mnt/snapshots/@20180714'
    :~#[FONT=courier new][B] sync[/B][/FONT]
    :~# [FONT=courier new][B]btrfs su snapshot -r /mnt/@home /mnt/snapshots/@home20180714[/B][/FONT]
    Create a readonly snapshot of '/mnt/@home' in '/mnt/snapshots/@home20180714'
    :~# [FONT=courier new][B]sync[/B][/FONT]
    :~# umount /mnt
    :~# exit
    logout
    exit
    Now I am ready to experiment. IF I don't like what I see, or decide that I don't need kvm virtual machines, then I can roll back in less than 5 minutes and nothing is lost.
    Total time: less than a minute.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    #2
    Well, four hours. That was short.

    I installed virt-manager and its dependencies, assigned myself to its group and downloaded the latest neon user edition iso.

    Then I gave /var/lib/libvirt/images a nocow setting.

    I fired up virt-manager and pointed it at my neon ISO download, which I had checksummed. As part of the setup I set it to use 4 of 8 core and 2048MB of my 6GB of RAM. I created a 20GB virtual HD in /var/lib/libvirt/images directory. The LiveISO came up and gave me a nice 1024X768 display, which seemed to work a tad slow but well enough to use. I clicked on the install button. The first 70% went very quickly. The last 30% took about 30 minutes. Not encouraging. During the install it automatically created "virtbr0", a bridge to my network, which worked great.

    When I logged in it took what seemed like forever for the "Virtspice0" display to bring up the KDE Plasma desktop. I could open apps but I could not close them. The more I opened the slower it got. Eventually I jumped to the virt-manager and clicked the force shutdown button. I rebooted a few times and got the same result.

    I couldn't get KVM to see my NVidia GT 650M GPU and its Virtspice0 display driver stinks. So, all in all, my experience trying out KVM wasn't a happy one. This sort of mirrored the experience I had when I first tried it 8 or 10 years ago, except that the KVM/QEMU software is a lot more polished. I mark both experiences off to having a low end computer with not enough RAM or, more likely, I didn't know what I was doing.

    I rolled back to my snapshots I made before this experiment and five minutes later I am back running my system as it was before I installed KVM/QEMU.
    "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
    – John F. Kennedy, February 26, 1962.

    Comment


      #3
      Yeah, I had a similar experience. Using KVM, my neon virtual machine didn't work either when I increased the resolution past the default of 1024X768. This was with the default ext4 rather than btrfs. I loaded Maui Cuba Libre which I believe defaults to btrfs and it installed quickly and works well at higher resolution but I think it is no longer updated. Kubuntu 18 works well as a KVM virtual machine at 1920x1080 (default ext4 install) and I'll probably move to that soon as my desktop.

      Comment


        #4
        Interesting. It was when I went into the Monitor Display setting and attempted to up the resolution that it blew apart on me and even rebooting the vm wouldn't help. With Btrfs I had to set the /var/lib/libvirt/images directory to nocow and I don't believe that helped much either. It was an interesting experiment but one I would have never tried without the ability to roll back to my previous state in 3 minutes with Btrfs.
        "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
        – John F. Kennedy, February 26, 1962.

        Comment


          #5
          K18 is ridiculously good at least as a VM. So clean install? No way to upgrade from 16 to 18?

          Comment


            #6
            Originally posted by wartnose View Post
            K18 is ridiculously good at least as a VM. So clean install? No way to upgrade from 16 to 18?
            That it is! And, "do-release-upgrade" will take you from 16 to 18, some of the time. But, using Btrfs I can create a @home snapshot and after I do a FRESH install of KDE Neon User Edition I can mount my old @home_snapshot as, say, /mnt, and copy all my stuff over, including SageMath, all the 12 of the AppImages, Minecraft and its configs, etc.... Piece of cake.
            "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
            – John F. Kennedy, February 26, 1962.

            Comment


              #7
              An update:
              I moved from Neon to Kubuntu 18.04. After watching a YouTube video of Marcel Gagne showing how to run an ISO from the CLI using qemu-kvm I decided to give qemu-kvm another look.

              On Kubuntu BIonic qemu-kvm and virt-manager were an entirely different and useful beast. To use it and avoid the COW problem for BTRFS I shrank my BTRFS <ROOT_FS> by 150GB and then used KPartition to resize my BTRFS partition down 100GB. I then used the resize max command in Btrfs to expand my Btrfs subvolume out to the maximum space available. That gave me 100GB to format as EXT4. I set that partition as the default for the image files.

              I download Kubuntu 19.04 Alpha and KDE NEON USER Edition 18.04 and gave them each 30GB of cow2 VMHD, 4GB of RAM and 2 cores. They both boot very fast and run very fast. Basically just about as fast as if they were running directly off the SSD. Networking is also fast. It is using my fiber optic via my WiFi at the same speed Bionic is getting. I've got room for one more on my EXT4 partition.

              Compared to last July, qemu-kvm behaves like an entirely different set of software. The big changes to my hardware was expanding my memory to 16GB, allowing me to give twice as much RAM to the VM's and an SSD, which is a game changer in itself. Those two hardware changes probably account for the vastly improved performance.
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment


                #8
                I have a winxp & a mint guest in virt-manager on my fedora install. Easy set up, run great

                Some interesting images at http://virtualdiskimages.weebly.com/qemu-manager.html

                Sent from my E6810 using Tapatalk
                Registered Linux User 545823

                Comment


                  #9
                  Originally posted by jpenguin View Post
                  Interesting.
                  I was able to work my way through the garbage ads and what ever to download an xp.img file. It tested clean so I installed it using virt-manager. Ran nicely. XP couldn't recognize the virt network connection but it recognized my rtl chip. Unforuntately it could not access any drivers for it. Not having a CDROM with drivers installed I couldn't offer it any. I played with it for a while and then deleted it and the XP.IMG file that I extracted from image.rar.
                  "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                  – John F. Kennedy, February 26, 1962.

                  Comment


                    #10
                    Was your network connection (host) bridged to the guest?
                    Using Kubuntu Linux since March 23, 2007
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Originally posted by Snowhog View Post
                      Was your network connection (host) bridged to the guest?
                      XP wouldn't honor virtbr0.
                      It would see my rtl wifi chip but it didn't have the software to interface with it.
                      "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                      – John F. Kennedy, February 26, 1962.

                      Comment


                        #12
                        Originally posted by jpenguin View Post
                        Interesting note about "issues" with Win 10. I went to read about it and it was all about Qemu Manager. I have no idea what that is -- I use virt-manager and found Win 10 installation very much the same as Win 8 and Win 7.

                        To support networking for the guest, I first set up a bridge on the host using the Debian guidance, then during the guest installation selected br0 for the network interface. "Seamless" is how I would describe it. But I never tried Win XP with qemu-kvm.

                        Comment


                          #13
                          My net is set to rtl8139
                          The virtIO drivers are https://docs.fedoraproject.org/en-US...ers/index.html

                          I have a couple old 640x480 GL games in XP with https://fdossena.com/?p=mesa/index.frag
                          Registered Linux User 545823

                          Comment

                          Working...
                          X