Re: [PATCH libvirt v1 3/3] Improve `virsh create --console` behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/28/23 17:37, Marc Hartmayer wrote:
> When starting a guest via libvirt (`virsh create --console`), early
> console output was missed because the guest was started first and then
> the console was attached. This patch changes this to the following
> sequence:
> 
> 1. create a paused transient guest
> 2. attach the console
> 3. resume the guest
> 
> Reviewed-by: Boris Fiuczynski <fiuczy@xxxxxxxxxxxxx>
> Signed-off-by: Marc Hartmayer <mhartmay@xxxxxxxxxxxxx>
> ---
>  tools/virsh-domain.c | 34 ++++++++++++++++++++++++++++------
>  1 file changed, 28 insertions(+), 6 deletions(-)
> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 36670039444c..2f055df0d97d 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -8212,6 +8212,13 @@ static const vshCmdOptDef opts_create[] = {
>      {.name = NULL}
>  };
>  
> +
> +static virshDomain *virDomainCreateXMLHelper(virConnectPtr conn, const char *xmlDesc, unsigned int nfds, int *fds, unsigned int flags) {
> +  if (nfds)
> +      return virDomainCreateXMLWithFiles(conn, xmlDesc, nfds, fds, flags);
> +  return virDomainCreateXML(conn, xmlDesc, flags);
> +}
> +

s/virDomainCreate/virshDomainCreate/

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux