Showing posts with label virtualization. Show all posts
Showing posts with label virtualization. Show all posts

Tuesday, May 20, 2014

How to fix the garbled font on virt-manager on rhel7 (currently beta)?

I was trying to do some tests with nested virtualization. For convenience, I decided to use virt-manager inside a vm to manage vms that I am going to run on top of that vm. (That is what nested virtualization means). I did "yum install virt-manager" and launched virt-manager. I could see the font is completely garbled.


After a bit research (or search), I found the simple resolutoin. Just install dejavu-sans-fonts package.

# yum install dejavu-sans-fonts

How do I enable nested virtualization on KVM?

Nested virtualization allows you to run virtual machines inside a virtual machine. Though this is not good for any kind of production use case because of the performance issues involved, this is usually good for testing purposes. Eg, students can be given virtual machines to test virtualization without allocating physical systems per head count.

I am only covering intel cpus in this blog post. The steps are very simple.

  • Verify that nested virtualization is not enabled already.
cat /sys/module/kvm_intel/parameters/nested
N
  • Add below line to /etc/modprobe.d/kvm-intel.conf
options kvm-intel nested=1
  • Reboot the host or do
modprobe -r kvm-intel
modprobe kvm-intel
  • Verify that nested virtualization is enabled.
cat /sys/module/kvm_intel/parameters/nested
Y

Monday, November 17, 2008

How to migrate guests using virsh commands?

Usually "xm migrate -l" is used to migrate a guest from one system to other system. There is no option in virt-manager to migrate a guest from one host to another. Libvirt based virsh command can be used to do this. The syntax of "virsh migrate" is a bit confusing to a lot of beginners. Details given below would help in solving those confusions.

- There are two systems - HostA and HostB. HostA is the source machine and HostB is the destination machine.

1 - If you are currently logged into HostA as root, below command can be used to migrate a guest to HostB.

# virsh migrate --live xen+ssh://HostB

Replace HostB with its ip or FQDN. You would be asked for the root password of HostB. Upon entering the right password for HostB, migration would happen successfully.

2 - If you are currently logged into a third system in the network which has "virsh" command available in it, the below command can be used to migrate a guest from HostA to HostB.

# virsh --connect xen+ssh://HostA migrate --live xen+ssh://HostB

Replace HostA and HostB with its ip addresses or FQDNs. You would be asked for the root password of HostA first, then the HostB. Upon entering the right password for both hosts, migration would happen successfully.

3 - If you are currently logged into HostB and want to migrate a guest from HostA to HostB, can this be done using virsh? Try it out yourself.

Libvirt connection over ssh (xen+ssh) is the the method used in the above example. Libvirt remote TLS connection can also be established using certificates. Since that needs a bit more deails to setup, that is apt for another doc.
Subscribe to: Comments (Atom)

AltStyle によって変換されたページ (->オリジナル) /