Friday, October 16, 2015

oVirt: upload ISO

download file:

wget http://centos.den.host-engine.com/6.7/isos/x86_64/CentOS-6.7-x86_64-minimal.iso

upload/import ISO
engine-iso-uploader -i ISOs upload CentOS-6.7-x86_64-minimal.iso

Thursday, September 10, 2015

Fedora 22 libvirt/qemu migration to oVirt or RHEV

I use qemu and virt-manager to develop labs for customers, and I often need to push my environment to production by copying the vms to oVirt.

 
Where do I get my XML files from?
/etc/libvirt/qemu
shared.ovirt.nfs.server.flamed.us is a Linux host connected/added to oVirt as an Export domain.
 
/nfs_export is the export. You can get the available exported file-systems by running "showmount -e shared.ovirt.nfs.server.flamed.us"

[bmusson@cpu1 /etc/libvirt/qemu]$ virt-v2v -i libvirtxml -o rhev -os shared.ovirt.nfs.server.flamed.us:/nfs_export --network ovirtmgmt foreman-master1.lab.flamed.us.xml 

This process will copy the .qcow file specified in the Virtual_Machines directory over to the NFS server. After, log on to the oVirt Manager, browse for the Export storage domain and import the VM using the "import button".

That easy.

Here is the output of the command.

 [   0.0] Opening the source -i libvirtxml foreman-master1.lab.flamed.us.xml
[   0.0] Creating an overlay to protect the source from being modified
[   0.6] Opening the overlay
[  66.9] Initializing the target -o rhev -os shared.ovirt.nfs.server.flamed.us:/nfs_export
[  67.7] Inspecting the overlay
[  78.1] Checking for sufficient free disk space in the guest
[  78.1] Estimating space required on target for each disk
[  78.1] Converting CentOS Linux release 7.1.1503 (Core)  to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 111.0] Mapping filesystem data to avoid copying unused and blank areas
[ 140.9] Closing the overlay
[ 141.2] Checking if the guest needs BIOS or UEFI to boot
[ 141.2] Assigning disks to buses
[ 141.2] Copying disk 1/1 to /tmp/v2v.UeRZcD/f5774ae2-2a4d-407e-b604-b501bc7c2127/images/29c1ae67-32f8-4963-96a6-22869d227a1f/bbff6f5d-35c3-4d57-a0f3-2cb12db0f415 (qcow2)
    (100.00/100%)
[3049.8] Creating output metadata
[3049.9] Finishing off

Thursday, July 9, 2015

SELinux and OSAd

SELinux can sometimes prevent OSA from connecting to the upstream jabber server. Below is a fix:

[root@server ~]# service osad status
osad (pid  5539) is running...
[root@server ~]# service osad restart
Shutting down osad:                                        [  OK  ]
Starting osad: cTraceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 252, in setup_connection
    c = self._get_jabber_client(js)
  File "/usr/share/rhn/osad/jabber_lib.py", line 309, in _get_jabber_client
    c.connect()
  File "/usr/share/rhn/osad/jabber_lib.py", line 567, in connect
    jabber.Client.connect(self)
  File "/usr/lib/python2.6/site-packages/jabber/xmlstream.py", line 488, in connect
    raise socket.error("Unable to connect to the host and port specified")
error: Unable to connect to the host and port specified

                                                           [  OK  ]
[root@server ~]# semanage permissive -a osad_t
[root@server ~]# service osad restart
Shutting down osad:                                        [  OK  ]
Starting osad:                                             [  OK  ]
[root@server ~]# rhn_check -vvv

Parallel rsync

Following steps did the job for me: Run the  rsync --dry-run  first in order to get the list of files those would be affected. rsync -...