1

Is it possible to set a domain id for a vm in xen at all? I'd imagine that changing it while it is running would be problematic, but if I can even set it in the config file or when xm create foo is run that would be helpful.

5
  • Why do you want to do this? If you want to use a UID use a fixed UID in your config.
    – Nils
    Aug 30, 2011 at 20:07
  • Well, for one, vifs and taps are named bades on the domid, and I'd like to make them deterministic for certain VMs. UIDs aren't going to help with this, and they also aren't displayed with the standard tools such as "xm list", so I'd have to build a map so I know what Dom IDs are associated with which UIDs. Sep 2, 2011 at 20:14
  • You could use xm list -l. What Linux in which version are you running, which xen-version are you using? Do you want to fix the DomU-ID, or is it enough to get the current ID for a certain VM?
    – Nils
    Sep 12, 2011 at 20:11
  • I want to fix it. E.g. DomU "A" always gets DomID "3". I'm running debian squeeze with Xen 4.0. Sep 12, 2011 at 23:12
  • The answer of Michael Trausch is correct. Think of the DomID as a dynamic sequence number. But I am pretty sure there is another way of fixing your real problem. Since you wrote about taps you propably want to do something with the network device associated with the DomU within the Dom0. Cant you wrap that so you can use something like xm list $DOMU|awk '[print $2}'`?
    – Nils
    Sep 13, 2011 at 19:10

1 Answer 1

1

The domain ID is set dynamically, at the time of the xm create command. IDs are sequentially assigned integers. If a domain is restarted, it will get the next available integer ID for its domain ID. If you have 30 guests running, and you start them all at boot, they will be assign domain ID numbers 1 - 30 (the dom0 takes the first number, 0). Now, let's say that domain #3 needs to restart sometime later; when it restarts, it will get domain ID 31 (assuming that no other guests have been restarted between host node startup and the point where node #3 was restarted).

In short, no, you cannot set this property of the VM.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .