Score:0

When creating a linux server in Azure, is it possible to declare the UUID somehow?

cc flag

We are currently doing fact finding in microsoft azure. For one of our software stacks, having known UUIDs is important (defined as the output from dmidecode|grep UUID).

In virtualbox/vagrant, it is possible to force a specific UUID on to a vm using something like this in the vagrantfile:

  config.vm.define :"box01" do |box01|
    box01.vm.box = BOX
    box01.vm.network :private_network, ip:"192.168.57.140"
    box01.vm.hostname = "box01"
    box01.vm.provider :virtualbox do |vb|
      vb.customize ['setextradata', :id, 'VBoxInternal/Devices/pcbios/0/Config/DmiSystemUuid',      '564DA11D-1112-7C62-2119-8E461180AE4A']
    end
  end

Inside ovirt there is a similar capability to force the UUID using the RESTful API, which we hardcode for all of our VMs.

Does such a capability exist within Azure?

jm flag
Have you considered putting in a front-end script that replaces the UUID line output by `dmidecode` with the needed value?
cc flag
Sadly we have an installer which directly invokes dmidecode which is what we need to work around. Could you provide an example of such a script?
Score:0
jm flag

Maybe not a real answer but this should work after the system is running.

# mv -f /bin/dmidecode /bin/dmidecode.real
# cat > /bin/dmidecode <<EOF
#!/bin/bash
/bin/dmidecode.real “$@“ | sed ‘s:/^\s*UUID.*/UUID: 564DA11D-1112-7C62-2119-8E461180AE4A/‘
EOF
# chmod 0755 /bin/dmidecode 

You can play with the regex to fix spaces if necessary.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.