Bobcares

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

by | Jan 1, 2016

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

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF