The following pull request was submitted through Github.
It can be accessed and reviewed at: https://github.com/lxc/lxd/pull/6446

This e-mail was sent by the LXC bot, direct replies will not reach the author
unless they happen to be subscribed to this list.

=== Description (from pull-request) ===
VMs can detect the LXD hypervisor by checking `dmidecode -s
system-product-name` which will then be set to `LXD`.

Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
From fe1cee3e23354da1036d4f194279a1386ec1d9df Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.h...@canonical.com>
Date: Wed, 13 Nov 2019 16:02:39 +0100
Subject: [PATCH] lxd: Add hypervisor detection

VMs can detect the LXD hypervisor by checking `dmidecode -s
system-product-name` which will then be set to `LXD`.

Signed-off-by: Thomas Hipp <thomas.h...@canonical.com>
---
 lxd/vm_qemu.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lxd/vm_qemu.go b/lxd/vm_qemu.go
index 2a87f9c893..3c11fd1a31 100644
--- a/lxd/vm_qemu.go
+++ b/lxd/vm_qemu.go
@@ -471,7 +471,7 @@ func (vm *vmQemu) Start(stateful bool) error {
                return err
        }
 
-       _, err = shared.RunCommand("qemu-system-x86_64", "-name", vm.Name(), 
"-uuid", vmUUID, "-daemonize", "-cpu", "host", "-nographic", "-serial", 
"chardev:console", "-nodefaults", "-readconfig", confFile, "-pidfile", 
vm.pidFilePath())
+       _, err = shared.RunCommand("qemu-system-x86_64", "-name", vm.Name(), 
"-uuid", vmUUID, "-daemonize", "-cpu", "host", "-nographic", "-serial", 
"chardev:console", "-smbios", "type=1,product=LXD", "-nodefaults", 
"-readconfig", confFile, "-pidfile", vm.pidFilePath())
        if err != nil {
                return err
        }
_______________________________________________
lxc-devel mailing list
lxc-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to