Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have been a user of vmware for a very long time. Now I am trying to switch to KVM, using RHELs virtual machine manager GUI to create the VMs. I have encountered two problems and I was wondering if you could help me.
1 - I can't get it to fit the screen, it stays like a square in the middle. In vmware this is fixed with vmtools. I searched the internet on how to do it for kvm auto fit window but I didn't find anything. Any ideas?
2 - I didn't find a way to set incremental disk size, it pre-allocates all the space and it is not good for me. I want it sparse/incremental, not pre-allocated as I don't have much space. In vmware GUI they give you the choice, in KVM I didn't find a way to do it. Any ideas?
I have been a user of vmware for a very long time. Now I am trying to switch to KVM, using RHELs virtual machine manager GUI to create the VMs. I have encountered two problems and I was wondering if you could help me.
1 - I can't get it to fit the screen, it stays like a square in the middle. In vmware this is fixed with vmtools. I searched the internet on how to do it for kvm auto fit window but I didn't find anything. Any ideas?
Reading the RHEL 8 documentation on KVM would be a good start, as would reading the "Question Guidelines" link in my posting signature. You don't say how you're viewing this virtual machine (SSH? Directly on the system console? Serial?), or what you've done/tried so far. Have you just tried modifying the screen resolution on the VM as you would on any OTHER 'real' machine???? Have you tried to resize the window? Running virsh and editing the file to increase the video memory and running xrandr to adjust screen size are also things to try. https://access.redhat.com/documentat...rtual-machines
Quote:
2 - I didn't find a way to set incremental disk size, it pre-allocates all the space and it is not good for me. I want it sparse/incremental, not pre-allocated as I don't have much space. In vmware GUI they give you the choice, in KVM I didn't find a way to do it. Any ideas?
There isn't a way, as far as I know. You have to allocate space for the disk image up front. You can allocate a small slice, and resize it later with virt-resize.
Quote:
The host is RHEL 8 and the guest will be RHEL 7.7
So have you contacted Red Hat support, since you're using RHEL?? If you're not PAYING for RHEL, I'd stop where you are and load CentOS instead. You will be missing ALL the patches/updates/fixes/security fixes that RHEL has put out since introduction of those releases, some of which could very well affect your operation. Since you were getting your 'certification' seven years ago, you should be familiar with RHEL and their business model.
2 - I didn't find a way to set incremental disk size, it pre-allocates all the space and it is not good for me. I want it sparse/incremental, not pre-allocated as I don't have much space. In vmware GUI they give you the choice, in KVM I didn't find a way to do it. Any ideas?
Just how are you creating that disk volume? If you are using virt-manager, it's just a matter of removing the check mark from the box: "Allocate entire disk now". You can also use qemu-img to make a sparse copy of an existing file:
Do not do that while the VM is running! The default is to leave 4KB blocks of all-zeros unallocated in the output. This size can be changed with the "-S sparse_size" option. See the qemu-img manpage for details.
Just how are you creating that disk volume? If you are using virt-manager, it's just a matter of removing the check mark from the box: "Allocate entire disk now".
Really? I've seen that option but never used it. Assumed it would still 'save' the disk space as part of the image file, just not format it. Have always just allocated what I needed, and resized if necessary.
Quote:
You can also use qemu-img to make a sparse copy of an existing file:
The default is to leave 4KB blocks of all-zeros unallocated in the output. This size can be changed with the "-S sparse_size" option. See the qemu-img manpage for details.
Do not do that while the VM is running! The default is to leave 4KB blocks of all-zeros unallocated in the output. This size can be changed with the "-S sparse_size" option. See the qemu-img manpage for details.
Quote:
Originally Posted by TB0ne
Nice; saving this command.
You might also look at the manpage for the virt-sparsify command. It first fills the existing filesystem(s) up with zeros (using a snapshot so as not to disturb the original filesystems), then creates the sparse copy with the all-zero blocks unallocated.
True, but I haven't been active in a long time due to illness so I thought it would be polite to thank again for having me here.
Thank you for the answer and apologies for not being clear. I am viewing it at a friend's home regular PC, which is the host + one guest VM, just trying to learn a bit about KVM. Yes, the first thing I did was to change the resolution, then click on "fit window" and all the other things one usually does, it didn't help. The square stood the same. The guest is 7.7, the host is 8, so I didn't know where the problem would be. I will try virsh and xrandr, though I don't know these commands very well, I will read about them. Thank you.
There isn't a way, as far as I know. You have to allocate space for the disk image up front. You can allocate a small slice, and resize it later with virt-resize.
I understand, as I said, I am at a friend's house, came here just to learn a bit, re the certification, as I said, I was away for some time due to illness and therefore did not learn farther than my last postings, restarting now. Thank you for your kindness and patience.
Just how are you creating that disk volume? If you are using virt-manager, it's just a matter of removing the check mark from the box: "Allocate entire disk now". You can also use qemu-img to make a sparse copy of an existing file:
Do not do that while the VM is running! The default is to leave 4KB blocks of all-zeros unallocated in the output. This size can be changed with the "-S sparse_size" option. See the qemu-img manpage for details.
Hi, I am using Virtual Machine Manager, but I don't have an option of "allocate entire disk now". I had that in vmware, but in this gui I don't see it. Thank you for your answer regarding the disk - qemu-img convert -O qcow2 src_filename new_filename - I am not sure I understand the where I should run this command, in the host?
I will also learn about virt-sparsify, coming from vmware this is all new. Thank you so much for your kindness!
Hi, I am using Virtual Machine Manager, but I don't have an option of "allocate entire disk now". I had that in vmware, but in this gui I don't see it. Thank you for your answer regarding the disk - qemu-img convert -O qcow2 src_filename new_filename - I am not sure I understand the where I should run this command, in the host?
I will also learn about virt-sparsify, coming from vmware this is all new. Thank you so much for your kindness!
I don't have a suitable RHEL 8 host available to test this, so perhaps that's an option that was for some reason omitted in that version.
Yes, the qemu-img commands, all of them, are run in the host. Most of them require that the associated VM not be running.
I don't have a suitable RHEL 8 host available to test this, so perhaps that's an option that was for some reason omitted in that version.
Yes, the qemu-img commands, all of them, are run in the host. Most of them require that the associated VM not be running.
As said before, if you are not going to PAY for RHEL, then don't use it, and use CentOS instead. There is zero reason to use RHEL without paying, especially if this is for a 'friends' machine, or for testing purposes. You will NOT get bugfixes/patches/updates, and you may very likely encounter problems that have already been fixed, but (without paying and having access to the Red Hat repositories), you will NOT GET.
As said before, if you are not going to PAY for RHEL, then don't use it, and use CentOS instead. There is zero reason to use RHEL without paying, especially if this is for a 'friends' machine, or for testing purposes. You will NOT get bugfixes/patches/updates, and you may very likely encounter problems that have already been fixed, but (without paying and having access to the Red Hat repositories), you will NOT GET.
Hi. Why the quotes in the word friend? Didn't understand that one. So repeating, as I said. I am at a friend's house, he has RHEL because he works for a company that uses RHEL. So his PC and laptop are RHEL. As simple as that. I don't pay for anything. I have CentOS and Ubuntu at home. But I came to him to work on a real RHEL because I thought it would solve those issues I have with KVM because I want to *learn*. It didn't. So I came to the opensource community to see if I can get help, which I did, and for that I thank everyone.
Hi. Why the quotes in the word friend? Didn't understand that one. So repeating, as I said. I am at a friend's house, he has RHEL because he works for a company that uses RHEL. So his PC and laptop are RHEL. As simple as that. I don't pay for anything.
So your 'friend' pays for it...which means it's 100% up to date, and has all the patches/fixes installed, right?? Which was the whole point of asking if you're paying, since (again), if you're not, you don't have any of those things installed, nor can you even get them. Odd that your 'friend' has RHEL 8 and 7 licenses from his company, since such things are usually standardized on a particular version for ease of administration in the enterprise.
Quote:
I have CentOS and Ubuntu at home. But I came to him to work on a real RHEL because I thought it would solve those issues I have with KVM because I want to *learn*. It didn't. So I came to the opensource community to see if I can get help, which I did, and for that I thank everyone.
If you already use CentOS, you should be aware that it's 99.x% IDENTICAL to RHEL, so using your 'friends' computer didn't get you anything additional...you could have spun up a KVM on CentOS 8, and used CentOS 7.7 as a guest.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.