Hi Juan,

thank you so much for the information.

Best regards
Christoph

Am 26.01.2016 um 17:41 schrieb Juan Hernández:
On 01/22/2016 10:01 PM, Nir Soffer wrote:
Adding Francesco

On Fri, Jan 22, 2016 at 1:40 PM,  <ov...@timmi.org> wrote:
Hi list,

it is possible to change the DMI Chassis Serial value in the VM config?

Virtualbox is able to perform this via the following command for example:
c:\Program Files\Oracle\VirtualBox\VBoxManage.exe setextradata
"NAME_OF_VIRTUAL_MACHINE"
"VBoxInternal/Devices/pcbios/0/Config/DmiChassisSerial" "123456789"

Handle 0x0300, DMI type 3, 21 bytes
Chassis Information
     Manufacturer: Red Hat
     Type: Other
     Lock: Not Present
     Version: RHEL 7.2.0 PC (i440FX + PIIX, 1996)
     Serial Number: Not Specified
     Asset Tag: Not Specified
     Boot-up State: Safe
     Power Supply State: Safe
     Thermal State: Safe
     Security Status: Unknown
     OEM Information: 0x00000000
     Height: Unspecified
     Number Of Power Cords: Unspecified
     Contained Elements: 0

root@demo:~ # dmidecode -s chassis-serial-number
Not Specified


I want to change the red above!!
Is there a way to change that in Ovirt as well?

Best regards and thank you for your help.
Christoph

You should be able to change it from the GUI: Edit -> Show Advanced
Options -> System -> General -> Provide Custom serial number policy ->
Custom serial number.

You can also change it with the API, for example with the Python SDK:

---8<---
#!/usr/bin/python

from ovirtsdk.api import API
from ovirtsdk.xml import params

# Connect to the server:
api = API(
     url="https://rhevm36.example.com/ovirt-engine/api";,
     username="admin@internal",
     password="...",
     ca_file="/etc/pki/ovirt-engine/ca.pem",
     debug=True
)

# Find the VM:
vm = api.vms.get(name="myvm")

# Set a custom serial number:
vm.set_serial_number(
     params.SerialNumber(
         policy="custom",
         value="myserialnumber",
     )
)
vm.update()

# Disconnect:
api.disconnect()
--->8---



_______________________________________________
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users

Reply via email to