I use KVM-based virtualization on my fedora 30 OS to run 3 virtual machines, runnung Ubuntu 18.04 LTS with a mini Hadoop cluster for test purposes.

The storage for virtual machines in configured to use file, mapped to LVM logical volumes.

First I created one machine master and then, after creating new logical volume for next machine, used virt-clone to create another one, slave1. Then I ran virt-sysprep --hostname slave1 -d slave1 and green-colored output contained line like changing hostname, but after I logged in to slave1 I found that hostname doesn't actually change and is the same as source VM has - master which is not what I expected.

All examples I've found used qcow image for VM storage, maybe it is related to my issue somehow, but I don't have enough expertise to find it out. Please note that I didn't use storage pool to create VM's storage.


Bit late on an answer but I had to add --enable customize to the command to get it to set the hostname.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.