пн, 3 дек. 2018 г. в 12:27, Daniel P. Berrangé <berrange@redhat.com>:> > We don't have any plans to add it, but if someone's interested we'd > accept patches. It would need to integrate with our virStream APIs > to allow download, in similar way to how virStorageVolDownload() worksWhat args this function need to receive? VolDownload this args: virStorageVolDownload(virStorageVolPtr vol, virStreamPtr stream, unsigned long long offset, unsigned long long length, unsigned int flags) I think that we can use all of this, but instead of vol, what we need to recv? Vasiliy Tolstov, e-mail: v.tolstov@selfip.ru
Daniel P. Berrangé
2018-Dec-03 11:06 UTC
Re: [libvirt-users] console type tcp with logging
On Mon, Dec 03, 2018 at 01:38:45PM +0300, Vasiliy Tolstov wrote:> пн, 3 дек. 2018 г. в 12:27, Daniel P. Berrangé <berrange@redhat.com>: > > > > We don't have any plans to add it, but if someone's interested we'd > > accept patches. It would need to integrate with our virStream APIs > > to allow download, in similar way to how virStorageVolDownload() works > > What args this function need to receive? VolDownload this args: > virStorageVolDownload(virStorageVolPtr vol, > virStreamPtr stream, > unsigned long long offset, > unsigned long long length, > unsigned int flags) > > I think that we can use all of this, but instead of vol, what we need to recv?We need the domain object, and the device alias name, eg virDomainOpenDeviceLogFile(virDomainPtr dom, const char *name, unsigned long long offset, unsigned long long length, unsigned int flags); Where name maps to <alias name=.../>. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
On 12/3/18 12:06 PM, Daniel P. Berrangé wrote:> On Mon, Dec 03, 2018 at 01:38:45PM +0300, Vasiliy Tolstov wrote: >> пн, 3 дек. 2018 г. в 12:27, Daniel P. Berrangé <berrange@redhat.com>: >>> >>> We don't have any plans to add it, but if someone's interested we'd >>> accept patches. It would need to integrate with our virStream APIs >>> to allow download, in similar way to how virStorageVolDownload() works >> >> What args this function need to receive? VolDownload this args: >> virStorageVolDownload(virStorageVolPtr vol, >> virStreamPtr stream, >> unsigned long long offset, >> unsigned long long length, >> unsigned int flags) >> >> I think that we can use all of this, but instead of vol, what we need to recv? > > We need the domain object, and the device alias name, eg > > virDomainOpenDeviceLogFile(virDomainPtr dom,virStreamPtr stream,> const char *name, > unsigned long long offset, > unsigned long long length, > unsigned int flags);We can have it used the same way as virStorageVolDownload: stream = virStreamNew(); virDomainOpenDeviceLogFile(dom, stream, alias, 0, 0, 0); virStreamRecvAll(stream, ...); Michal