From: "Ján Tomko" <jtomko@redhat.com>
To: ted.h.kim@oracle.com
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
sgarzare@redhat.com, netdev@vger.kernel.org,
Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: vsock CID questions
Date: Tue, 25 Feb 2020 12:30:10 +0100 [thread overview]
Message-ID: <20200225113010.GH1133033@lpt> (raw)
In-Reply-To: <b08eda42-9cc7-7a9a-b5b1-5adc44050896@oracle.com>
[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]
On Fri, Feb 21, 2020 at 11:49:06AM -0800, ted.h.kim@oracle.com wrote:
>Hi Jan,
>
>Thanks for responding - let me see if I am understanding correctly.
>
>
>I think you are saying on migration the process of determining the CID
>assigned is the same as when you start a domain.
>
><cid auto='yes'> means assignment to the first available value.
>It also seems for auto='yes' that any address='<value>' part of the
>CID definition is ignored, even as a suggested value.
>(I always get CID 3 when starting auto='yes' and no other domains have
>started, even if there is an specific address in the definition, e.g.
>address='12'.)
>
>But if auto='no', either the domain gets the address field value or if
>the value is already assigned, the domain will fail to start/migrate.
>
>Is that right?
>
Yes.
>
>In cases, where auto='yes', it does not seem that the host/hypervisor
>can find out what CID value was assigned to a domain. Even parsing the
>XML only reveals that it was auto-assigned and no specific value can
>be determined.
The value is not recorded in the inactive XML, but after domain startup,
the address should be visible in the live XML:
<vsock model="virtio">
<cid auto="yes" address="3"/>
<alias name="vsock0"/>
<address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
</vsock>
>
>Is this correct?
>
>If this is the case, I would advocate for a specific API which can
>lookup the current CID of a domain.
This can already be queried from the XML through virDomainGetXMLDesc:
$ virsh dumpxml libvirt-fedora-31 | xmllint --xpath 'string(//cid/@address)' -
3
Jano
>Otherwise the host/hypervisor cannot tell which auto='yes' domain is
>on the other end of the connected socket, when there is more than one.
>
>
>Thanks.
>-ted
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-02-25 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-18 22:45 vsock CID questions ted.h.kim
2020-02-19 10:44 ` Stefano Garzarella
2020-02-19 15:43 ` Stefan Hajnoczi
2020-02-20 16:09 ` Ján Tomko
2020-02-21 19:49 ` ted.h.kim
2020-02-25 11:30 ` Ján Tomko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200225113010.GH1133033@lpt \
--to=jtomko@redhat.com \
--cc=boris.ostrovsky@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=sgarzare@redhat.com \
--cc=stefanha@redhat.com \
--cc=ted.h.kim@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.