How to add ComputerName to rhevm-config?

Latest response

Hi,

I am trying to fine tune our sysprep so the computername is set bij the rhevm.

VM-name = ComputerName

 

When I set Computername value I get the following error:

#rhevm-config --set ComputerName=Value
Error setting ComputerName's value. No such entry.

In %systemroot%\Panther\Unattendgc\Setupact.log I see an error:

ComputerName: failed to set computername [hr0x80070057][gle=0x00000057]

Can anyone help me.

 

We have RHEV 3.1

 

Best regards

 

Bart

 

Responses

Hi Bart,

 

I was mistaken: you can't use rhevm-config to set a hostname to a virtual machine.

Maybe you should solve this with DHCP setting the hostname? Does that work for you?

 

Regards,

Vincent

If the VM is sysprepped, and you run it for the first time (or execute run-once with sysprep option enabled), RHEV will pass the VM name, as stated in RHEV, as the hostname for the vm. This is done by autogenerating an unattend.xml file that gets attached as a floppy to the VM.

"If the VM is sysprepped, and you run it for the first time ... RHEV will pass the VM name, as stated in RHEV"

I searched the RHEV 3.1 documentation via Google site-search, but didn't find any reference to this statement. I didn't find any reference to "unattend.xml" too, but maybe I should look for documentation at Microsoft about this.

Is your statement somewhere documented (especially the hostname part)?

On the RHEV Manager, the template unattend files are placed in the /etc/ovirt-engine/sysprep/ directory. If you were to launch a virtual machine with Run Once, and the sysprep floppy attached, you would be able to see an autopopulated version of the relevant file in the a:\ drive.

You will notice, like Dan mentioned above, the Computer Name populated as the name in RHEV in the sysprep.inf file there. Of course, you need to follow instructions at https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization/3.1/html-single/Administration_Guide/index.html#sect-Sealing_a_Windows_Template first.

Another thread worth looking at, if things don't work out, is https://access.redhat.com/discussion/settings-not-taken-sysprep-w7-desktop .

I have tried the mentiond documents. I have also looked into the sysprep.inf file. But the inf-file isn't what we want for this problem.

 

We are now looking into the option to rename the machine throw DHCP with the option 12.

This is an challange becaurse microsoft doesn't support it.