KVM Setup
-
Or if you want to start from a minimal Fedora 25/26 install you can simply run these three commands.
# This will install Mandatory, Default and Optional Packages: su -c "dnf group install with-optional virtualization" # To start the service: su -c "systemctl start libvirtd" # To start the service on boot: su -c "systemctl enable libvirtd"
Source: https://fedoraproject.org/wiki/Getting_started_with_virtualization
-
There is not a simple single command line choice for CentOS 7 after initial installation, but it is not difficult to follow any of the numerous guides on there on the subject.
-
@jaredbusch said in KVM Setup:
There is not a simple single command line choice for CentOS 7 after initial installation, but it is not difficult to follow any of the numerous guides on there on the subject.
there is :
yum groupinstall Virtualization "Virtualization Platform" "Virtualization Tools"
Right from minimal install.
-
@jaredbusch said in KVM Setup:
There is not a simple single command line choice for CentOS 7 after initial installation, but it is not difficult to follow any of the numerous guides on there on the subject.
there is :
yum groupinstall Virtualization "Virtualization Platform" "Virtualization Tools"
Right from minimal install.
My understanding of CentOS 7, as I have not used it for KVM, is that it subsequently needs some SELinux settings changed and then some networking setup.
-
@jaredbusch said in KVM Setup:
@jaredbusch said in KVM Setup:
There is not a simple single command line choice for CentOS 7 after initial installation, but it is not difficult to follow any of the numerous guides on there on the subject.
there is :
yum groupinstall Virtualization "Virtualization Platform" "Virtualization Tools"
Right from minimal install.
My understanding of CentOS 7, as I have not used it for KVM, is that it subsequently needs some SELinux settings changed and then some networking setup.
Nope, nothing needed. you can use it with default selinux policy right from the start. And no changes to network either, however if you will use Ovirt, it does many changes to the network interfaces and it actually adds an interface maybe due to vsdm and not Ovirt persay,
However back to your question, you can fully use Centos 7 KVM with selinux without any changes, you just need virt-manager setup on another machine (Fedora for example) and connect to your centos 7 KVM and install Windows 10, which I did for the past month or so for training purposes.
-
@jaredbusch said in KVM Setup:
@jaredbusch said in KVM Setup:
There is not a simple single command line choice for CentOS 7 after initial installation, but it is not difficult to follow any of the numerous guides on there on the subject.
there is :
yum groupinstall Virtualization "Virtualization Platform" "Virtualization Tools"
Right from minimal install.
My understanding of CentOS 7, as I have not used it for KVM, is that it subsequently needs some SELinux settings changed and then some networking setup.
Nope, nothing needed. you can use it with default selinux policy right from the start. And no changes to network either, however if you will use Ovirt, it does many changes to the network interfaces and it actually adds an interface maybe due to vsdm and not Ovirt persay,
However back to your question, you can fully use Centos 7 KVM with selinux without any changes, you just need virt-manager setup on another machine (Fedora for example) and connect to your centos 7 KVM and install Windows 10, which I did for the past month or so for training purposes.
Yes, that is how I use KVM now, just on Fedora 26. When I looked at setting up my first KVM test system, I looked at CentOS 7 and Fedora 25 and the official instructions for both. The CentOS wiki was much more complicated than the Fedora wiki.
Also, as I stated in another thread, I pretty much gave up caring about the LTS nature of CentOS in today's world.
-
So I installed Fedora 26 and selected headless virtualization.When I connect to it from my Korora 25 workstation I get this warning:virtualization was off in the BIOS....
-
@stacksofplates said in KVM Setup:
On Fedora under software choose headless virtualization:
I installed F26 & KVM via Headless Virt.
Same thing like I've done many times...From my F27 desktop, I can not connect (see image for error msg)
Any ideas before I decide to reinstall F26? -
@fateknollogee said in KVM Setup:
@stacksofplates said in KVM Setup:
On Fedora under software choose headless virtualization:
I installed F26 & KVM via Headless Virt.
Same thing like I've done many times...From my F27 desktop, I can not connect (see image for error msg)
Any ideas before I decide to reinstall F26?sudo dnf install openssh-askpass
Or use ssh keys instead
-
@black3dynamite said in KVM Setup:
sudo dnf install openssh-askpass
Or use ssh keys instead
Tried both of those, no difference, still get the error
-
@fateknollogee said in KVM Setup:
@black3dynamite said in KVM Setup:
sudo dnf install openssh-askpass
Or use ssh keys instead
Tried both of those, no difference, still get the error
Are you connecting using root or your own login?
Add yourself to libvirt group. -
@black3dynamite said in KVM Setup:
Are you connecting usinf root or your own login?
Add yourself to libvirt group.Tried connecting as root & myself, no diff, still get the error
Yes, I have added myself to the libvirt group. -
All scorn and derision aside, if I wanted to manage a KVM host from Windows what are my options?
-
-
All scorn and derision aside, if I wanted to manage a KVM host from Windows what are my options?
You can use putty to ssh into the server and then use virsh commands to manage VMs.
You can setup a Fedora VM and use a light desktop environment or just a windows manager only to help with using less resources and then install virt-manager. That's the same way I would do it when I need to manage a Hyper-V host from Fedora or any other distros.
-
@black3dynamite said in KVM Setup:
sudo dnf install openssh-askpass
Or use ssh keys instead
Ooops brain fart of the week...
I wasn't paying attention, I installed openssh-askpass on the host instead of my workstation....(that was pretty stupid)
All is good!! -
-
@tim_g said in KVM Setup:
All scorn and derision aside, if I wanted to manage a KVM host from Windows what are my options?
SSH (I like Putty)
Pretty much or running a Fedora VM. The command line tools are incredibly robust and very easy to learn.
Ansible has a libvirt module as well (http://docs.ansible.com/ansible/latest/virt_module.html). However it doesn't have clone because libvirt doesn't have a clone function. Virt-clone does a bunch of other work like snapshotting, copying, etc. And you can just run the commands with it like this simple setup here https://mangolassi.it/topic/15257/ansible-create-kvm-guests that builds a disk with virt-builder. By default the OS disks from virt-builder are really small (like 6GB), so you will need to add the logic in to create the second disk.
-
@stacksofplates said in KVM Setup:
@tim_g said in KVM Setup:
All scorn and derision aside, if I wanted to manage a KVM host from Windows what are my options?
SSH (I like Putty)
Pretty much or running a Fedora VM. The command line tools are incredibly robust and very easy to learn.
Ansible has a libvirt module as well (http://docs.ansible.com/ansible/latest/virt_module.html). However it doesn't have clone because libvirt doesn't have a clone function. Virt-clone does a bunch of other work like snapshotting, copying, etc. And you can just run the commands with it like this simple setup here https://mangolassi.it/topic/15257/ansible-create-kvm-guests that builds a disk with virt-builder. By default the OS disks from virt-builder are really small (like 6GB), so you will need to add the logic in to create the second disk.
I really need to dig into Ansible. AWX as well could be really useful.
-
@stacksofplates said in KVM Setup:
@tim_g said in KVM Setup:
All scorn and derision aside, if I wanted to manage a KVM host from Windows what are my options?
SSH (I like Putty)
Pretty much or running a Fedora VM. The command line tools are incredibly robust and very easy to learn.
Ansible has a libvirt module as well (http://docs.ansible.com/ansible/latest/virt_module.html). However it doesn't have clone because libvirt doesn't have a clone function. Virt-clone does a bunch of other work like snapshotting, copying, etc. And you can just run the commands with it like this simple setup here https://mangolassi.it/topic/15257/ansible-create-kvm-guests that builds a disk with virt-builder. By default the OS disks from virt-builder are really small (like 6GB), so you will need to add the logic in to create the second disk.
I really need to dig into Ansible. AWX as well could be really useful.
I run AWX at home and Tower at work. It's really amazing how easy it makes everything.