Bobcares

WeSupport

Call Us! 1-800-383-5193
Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Emergency Response Time custom

Our experts have had an average response time of 11.06 minutes in March 2021 to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

OnApp error: internal error Attempt to migrate guest to the same host

by | Jun 24, 2021

Stuck with OnApp error: internal error Attempt to migrate guest to the same host? We can help you.

As part of our Server Virtualization Technologies and Services, we assist our customers with several OnApp queries.

Today, let us see how we can fix the migration error in OnApp.

 

OnApp error: internal error Attempt to migrate guest to the same host

The above error can occur due to different reason. Check the following:

  • When trying to hot migrate a VS on a static compute resource, the migration fails with the error “error: internal error Attempt to migrate guest to the same host”.
  • When trying to hot migrate a VS on a cloud-boot compute resource, the migration fails with the error “error: internal error Attempt to migrate guest to the same host”.

Issue can cause if same UUIDS across source and destination compute resources.

Before the migration starts, virsh checks the UUID of the system by executing virsh sysinfo.

Also, it executes the same command on the host that the VS will be migrated to.

This is to avoid migrating to the same server in case of a cluster of compute resources.

 

How to resolve “internal error Attempt to migrate guest to the same host” on static compute resource?

To resolve the issue, you need to configure the unique libvirt UUID.

  • Firstly, check the current libvirt UUID with the command:
# virsh capabilities | grep uuid
<uuid>b4eef507-e834-428f-82f5-188ab3d1b26e</uuid>
  • Then, generate the new libvirt UUID:
# uuidgen

b1285b1c-7fa0-4c07-8ec7-cb8237b41140
  • Edit file /etc/libvirt/libvirtd.conf and add/edit the following line:
host_uuid = “b1285b1c-7fa0-4c07-8ec7-cb8237b41140”
  • Finally, restart libvirtd# service:
# service libvirtd restart
Redirecting to /bin/systemctl restart libvirtd.service

 

How to resolve it on cloud-boot compute resource?

Before the migration starts, virsh check the UUID of the system by executing virsh sysinfo.

Also, it executes the same command on the host that the VS will be migrated to.

In order to troubleshoot the issue, please follow the steps below:

  • Firstly, check what virsh sysinfo returns for your compute resources.
dmidecode -s system-uuid
4C4C4544-0053-4C10-8038-B2C04F334831

dmidecode -s system-uuid
4C4C4544-0053-4C10-8038-B2C04F334831

dmidecode -s system-uuid
4C4C4544-0053-4C10-8038-B2C04F334831

dmidecode -s system-uuid
4C4C4544-0053-4C10-8038-B2C04F334831
  • As you can see they all have the same UUID, so in this case this was Dell all in one 4x servers in one enclosure.

 

Now, let us go through the steps followed by our Support Techs in order to resolve it.

1.Firstly, go to the images directory:

cd /tftpboot/images/centos6/ramdisk-kvm/

2.Then, backup the initrd:

cp initrd.img initrd.img.backup

3.Create the directory where we will unpack the original initrd:

mkdir -v /tftpboot/images/centos6/ramdisk-kvm/initrd.unpacked && cd /tftpboot/images/centos6/ramdisk-

kvm/initrd.unpacked

4.Decompress the intrd:

zcat ../initrd.img | cpio -id

5.Mount the usr directory (it will be readonly):

mount -o loop usr.cramfs usr

6.Copy the info of the usr to another location so we can edit and apply the changes:

rsync -av usr/ /tmp/cramfs-usr/

7.Copy the real binary “demidecode”:

cp usr/sbin/dmidecode sbin/dmidecode.orig

8.Now download the wrapper and copy it to the temporary directory and give permissions to execute:

wget http://downloads.repo.onapp.com/dmidecode
cp demidecode (This should be the wrapper) /tmp/cramfs-usr/sbin/dmidecode
chmod +x /tmp/cramfs-usr/sbin/dmidecode

9.Again, from within the /tftpboot/images/centos6/ramdisk-kvm/initrd.unpacked directory umount the usr.cramfs image and delete it:

umount usr.cramfs
rm -rf usr.cramfs

10.Create the usr.cramfs with the wrapper applied, this will create a ro cramfs image:

mkfs.cramfs /tmp/cramfs-usr/ usr.cramfs

11.Recreate the initrd and clean the dirs created:

find . | cpio -H newc --quiet -o | gzip -9 > ../initrd.img.new && cd .. && mv -fv initrd.img.new initrd.img

12.Now clean user:

rm -rf /tmp/cramfs-usr/

13.Add the following custom config to all compute resources. Create a UUID with uuidgen so that the UUIDs are different:

##uuid for libvirtd.conf##
echo 'host_uuid = "BA7CC229-D375-410F-88E9-0A918DAA7120" ' >> /etc/libvirt/libvirtd.conf
service libvirtd restart
#####

14.Reboot the compute resources in order to load the new initrd and Custom config.

15.Check that the new UUID is being used by libvirtd.

As you can see, the UUID in libvirtd.conf is the same as the one we get when doing virsh sysinfo:

tail /etc/libvirt/libvirtd.conf
# sending any keepalive messages.
#
#keepalive_interval = 5
#keepalive_count = 5
#
# If set to 1, libvirtd will refuse to talk to clients that do not
# support keepalive protocol. Defaults to 0.
#
#keepalive_required = 1
host_uuid = "BA7CC229-D375-410F-88E9-0A918DAA7120"

virsh sysinfo | grep uuid
<entry name='uuid'>BA7CC229-D375-410F-88E9-0A918DAA7120</entry>

 

[Need help with the fix? We are here for you]

Conclusion

In short, today we saw how our Support Techs resolve OnApp error: internal error Attempt to migrate guest to the same host.

PREVENT YOUR SERVER FROM CRASHING!

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

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

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

OnApp Support

Spend time on your business, not on your servers.

Managing a server is time consuming. Whether you are an expert or a newbie, that is time you could use to focus on your product or service. Leave your server management & end-user tech support to us, and use that time to focus on the growth and success of your business.

TALK TO US Or click here to learn more.
OnApp Support

Spend time on your business, not on your servers.

Managing a server is time consuming. Whether you are an expert or a newbie, that is time you could use to focus on your product or service. Leave your server management & end-user tech support to us, and use that time to focus on the growth and success of your business.

TALK TO US Or click here to learn more.

Categories:

Tags:

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

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

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

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