oVirt Integration & Custom Development

How to fix oVirt error: “Failed to attach Storage Domain [ ] to Data Center [ ]”

How to fix oVirt error: “Failed to attach Storage Domain [ ] to Data Center [ ]”

Recently, we setup an oVirt system for a cloud hosting provider. Much of the installation went through like a breeze, but we did face a few road blocks which were not covered in the oVirt docs or community.

One such error is “Failed to attach Storage Domain [] to Data Center []“. In the community forums we saw many other users facing the same issue. So, to all oVirt users out there, here’s how we got this error and resolved it.

See how our WHMCS oVirt plugin helps you!

In our oVirt installation, the first indication of trouble was when we tried to create a new Virtual Machine. In the “Run Once” menu, we found the ISO list to be empty.

No ISO images during VM creation

No ISO images during VM creation

 

It meant that the storage domain called “ISO_DOMAIN”, which contained all the ISO images, was not attached to the oVirt Data Center we were using.

So, we headed over to the System –> Storage tab, and tried attaching the storage domain ISO_DOMAIN to “oVirtDC1”.

Action leading to Failed to attach Storage Domain [] to Data Center []

Attach ISO storage to new DC

This gave us the error, “Failed to attach Storage Domain ISO_DOMAIN to Data Center oVirtDC1“.

It looked like the ISO storage domain is somehow inaccessible.

To confirm that the configuration entries about ISO domains were correct, we checked the oVirt configuration file:

[root@ovirt1 ~]# grep iso /etc/ovirt-engine-setup.conf.d/20-setup-ovirt-post.conf
OVESETUP_CONFIG/isoDomainMountPoint=str:/mnt/iso
OVESETUP_CONFIG/isoDomainSdUuid=str:0985b8fd-0175-4e57-91ed-1fcd0fd5c783
OVESETUP_CONFIG/isoDomainName=str:ISO_DOMAIN
OVESETUP_CONFIG/isoDomainStorageDir=none:None
OVESETUP_CONFIG/isoDomainExists=bool:True

All looked good.

[ Looking for the WHMCS plugin to manage your oVirt interface? Get our WHMCS plugin for oVirt management here. ]

Next, we tried listing the ISO storage domains.

[root@ovirt1 ~]# ovirt-iso-uploader list
Please provide the REST API password for the admin@internal oVirt Engine user (CTRL+D to abort): 
ERROR: There are no ISO storage domains.

Well, we knew that we did define an ISO storage domain. So, we checked the VDSM logs located at ‘/var/log/vdsm/vdsm.log’ to find what exactly was happening at the time of attaching the storage:

2015-10-21 14:25:06,598 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-36) [7d8ef9c5] Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: Failed to connect Host oVirtNode01 to the Storage Domains ISO_DOMAIN.
2015-10-21 14:25:06,610 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-8-thread-36) [7d8ef9c5] Correlation ID: null, Call Stack: null, Custom Event ID: -1, Message: The error message for connection ovirt1.mydomain.com:/mnt/iso returned by VDSM was: Problem while trying to mount target
2015-10-21 14:25:06,614 ERROR [org.ovirt.engine.core.bll.storage.NFSStorageHelper] (org.ovirt.thread.pool-8-thread-36) [7d8ef9c5] The connection with details ovirt1.mydomain.com:/mnt/iso failed because of error code 477 and error message is: problem while trying to mount target

As per the logs, oVirt node was unable to mount the ISO storage directory. To test it, we tried mounting it manually from the node:

[root@oVirtNode01 ~]# mount -t nfs ovirt1.mydomain.com:/mnt/iso /rhev/data-center/mnt/ovirt1.mydomain.com\:_mnt_iso/
mount.nfs: access denied by server while mounting ovirt1.mydomain.com:/mnt/iso

Now, the error was more clear. The mount request was expressly DENIED. So, we checked the corresponding NFS daemon logs in the ISO storage domain server. It showed:

Oct 21 14:33:44 ovirt1 rpc.mountd[15701]: refused mount request from 111.111.111.111 for /mnt/iso (/): not exported

It said the mount point /mnt/iso was not exported. A quick check of the export list showed:

[root@ovirt1 ~]# exportfs 
/mnt/iso ovirt1.mydomain.com
/mnt/hdd2 ovirtnode01.mydomain.com

The exportfs command showed the ISO storage domain directory “/mnt/iso” was shared only with “ovirt1.mydomain.com”, where as the oVirt Data Center was created with another server called “ovirtnode01.mydomain.com”.

So, we edited /etc/exports, and included “ovirtnode01.mydomain.com” in the list of “/mnt/iso” shares.

We restarted NFS service and ovirt-engine service to make the changes live.

Attaching the ISO domain to the Data Center went through fine, and we were then able to install new VMs using ISO images from the ISO DOMAIN.

Today we covered how an oVirt system error was resolved by linking one sub-component to another. Quick resolution to such system errors is possible if the trace of evidence is followed. Bobcares helps Cloud and VPS hosting providers deliver top-notch services by providing 24/7 systems administration, preventive maintenance, and 24/7 technical support.

 


BUY NOW - WHMCS PLUGIN FOR OVIRT

We provide custom WHMCS plugin for managing your oVirt VMs easily

CLICK HERE FOR WHMCS OVIRT PLUGIN

Submit a Comment

Your email address will not be published. Required fields are marked *

Bobcares
Bobcares is a server management company that helps businesses deliver uninterrupted and secure online services. Our engineers manage close to 51,500 servers that include virtualized servers, cloud infrastructure, physical server clusters, and more.
MORE ABOUT BOBCARES