vmd terminates vms without an explicit "boot" line

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

vmd terminates vms without an explicit "boot" line

Aaron Bieber-3
Hola!

This one is a bit funky. I just setup a new server with Hetzner. When I
try to boot vms on it, they only start when I have a "boot" entry
specified. Anything that uses the bios (doesn't have a boot entry) fails
fairly silently.

I can take the same config (without a boot entry) on my x240, and it
boots (I can see the seabios startup).

Hetzner box:
  hw.model=Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
  cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR

x240:
  hw.model=Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
  cpu0:
  FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,SENSOR,ARAT

Config:
  switch "nat" {
          interface bridge1
  }

  vm "test" {
          disable
          memory 1G
          disk "/vm/test.img"

          interface { switch "nat" }
  }

The test.img file is a freshly created file with no OS installed.

When starting the vm with debug on the Hetzner server:
  frank# vmd -dvvv
  startup
  /etc/vm.conf:5: switch "nat" registered
  vm_register: registering vm 1
  /etc/vm.conf:13: vm "test" registered (disabled)
  vm_priv_brconfig: interface bridge1 description switch1-nat
  vmd_configure: not creating vm test (disabled)
  config_setconfig: setting config
  config_getconfig: retrieving config
  config_getconfig: retrieving config
  config_getconfig: retrieving config
  vm_opentty: vm test tty /dev/ttyp5 uid 0 gid 4 mode 620
  vm_register: registering vm 1
  vm_priv_ifconfig: interface tap0 description vm1-if0-test
  loadfile_bios: loaded BIOS image
  vm_priv_ifconfig: switch "nat" interface bridge1 add tap0
  run_vm: initializing hardware for vm test
  test: started vm 1 successfully, tty /dev/ttyp5
  virtio_init: vm "test" vio0 lladdr fe:e1:bb:d1:e4:39
  run_vm: starting vcpu threads for vm test
  vcpu_reset: resetting vcpu 0 for vm 33
  vmd: cannot reset VCPU 0 - exiting.
  vmm_sighdlr: handling signal 20
  vmm_sighdlr: attempting to terminate vm 1
  terminate_vm: terminating vmid 33
  vmm_sighdlr: calling vm_remove
  vm_remove: removing vm id 1 from running config
  vm_remove: calling vm_stop
  vm_stop: stopping vm 1
  vmd_dispatch_vmm: handling TERMINATE_EVENT for vm id 1 ret 5
  vmd_dispatch_vmm: about to stop vm id 1
  vm_stop: stopping vm 1

Output from vmctl when starting:
  frank# vmctl start test -c
  Connected to /dev/ttyp5 (speed 115200)

  [EOT]
  frank#

Cheers,
Aaron

--
PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A  4AF0 1F81 112D 62A9 ADCE

Reply | Threaded
Open this post in threaded view
|

Re: vmd terminates vms without an explicit "boot" line

Mike Larkin
On Thu, Jan 25, 2018 at 09:57:46PM -0700, Aaron Bieber wrote:

> Hola!
>
> This one is a bit funky. I just setup a new server with Hetzner. When I
> try to boot vms on it, they only start when I have a "boot" entry
> specified. Anything that uses the bios (doesn't have a boot entry) fails
> fairly silently.
>
> I can take the same config (without a boot entry) on my x240, and it
> boots (I can see the seabios startup).
>
> Hetzner box:
>   hw.model=Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz

This CPU is the problem. That is an a very old Nehalem CPU, which lacks
the "unrestricted guest" virtualization feature required to run virtualized
real mode code (eg, bios). This also means you're going to be stuck with
OpenBSD guests only.

You're going to have to use the -b option (or the "boot" entry like you
noted) on this CPU. I have plans to fix that someday but other things keep
jumping in front of this in line.

Does Hetzner offer a newer CPU option? (This CPU is 9 years old).

-ml

>   cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR
>
> x240:
>   hw.model=Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
>   cpu0:
>   FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,SENSOR,ARAT
>
> Config:
>   switch "nat" {
>           interface bridge1
>   }
>
>   vm "test" {
>           disable
>           memory 1G
>           disk "/vm/test.img"
>
>           interface { switch "nat" }
>   }
>
> The test.img file is a freshly created file with no OS installed.
>
> When starting the vm with debug on the Hetzner server:
>   frank# vmd -dvvv
>   startup
>   /etc/vm.conf:5: switch "nat" registered
>   vm_register: registering vm 1
>   /etc/vm.conf:13: vm "test" registered (disabled)
>   vm_priv_brconfig: interface bridge1 description switch1-nat
>   vmd_configure: not creating vm test (disabled)
>   config_setconfig: setting config
>   config_getconfig: retrieving config
>   config_getconfig: retrieving config
>   config_getconfig: retrieving config
>   vm_opentty: vm test tty /dev/ttyp5 uid 0 gid 4 mode 620
>   vm_register: registering vm 1
>   vm_priv_ifconfig: interface tap0 description vm1-if0-test
>   loadfile_bios: loaded BIOS image
>   vm_priv_ifconfig: switch "nat" interface bridge1 add tap0
>   run_vm: initializing hardware for vm test
>   test: started vm 1 successfully, tty /dev/ttyp5
>   virtio_init: vm "test" vio0 lladdr fe:e1:bb:d1:e4:39
>   run_vm: starting vcpu threads for vm test
>   vcpu_reset: resetting vcpu 0 for vm 33
>   vmd: cannot reset VCPU 0 - exiting.
>   vmm_sighdlr: handling signal 20
>   vmm_sighdlr: attempting to terminate vm 1
>   terminate_vm: terminating vmid 33
>   vmm_sighdlr: calling vm_remove
>   vm_remove: removing vm id 1 from running config
>   vm_remove: calling vm_stop
>   vm_stop: stopping vm 1
>   vmd_dispatch_vmm: handling TERMINATE_EVENT for vm id 1 ret 5
>   vmd_dispatch_vmm: about to stop vm id 1
>   vm_stop: stopping vm 1
>
> Output from vmctl when starting:
>   frank# vmctl start test -c
>   Connected to /dev/ttyp5 (speed 115200)
>
>   [EOT]
>   frank#
>
> Cheers,
> Aaron
>
> --
> PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A  4AF0 1F81 112D 62A9 ADCE
>

Reply | Threaded
Open this post in threaded view
|

Re: vmd terminates vms without an explicit "boot" line

Mike Larkin
On Mon, Jan 29, 2018 at 08:23:42PM -0800, Mike Larkin wrote:

> On Thu, Jan 25, 2018 at 09:57:46PM -0700, Aaron Bieber wrote:
> > Hola!
> >
> > This one is a bit funky. I just setup a new server with Hetzner. When I
> > try to boot vms on it, they only start when I have a "boot" entry
> > specified. Anything that uses the bios (doesn't have a boot entry) fails
> > fairly silently.
> >
> > I can take the same config (without a boot entry) on my x240, and it
> > boots (I can see the seabios startup).
> >
> > Hetzner box:
> >   hw.model=Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
>
> This CPU is the problem. That is an a very old Nehalem CPU, which lacks

Technically it's a Bloomfield but the problem is the same :)

> the "unrestricted guest" virtualization feature required to run virtualized
> real mode code (eg, bios). This also means you're going to be stuck with
> OpenBSD guests only.
>
> You're going to have to use the -b option (or the "boot" entry like you
> noted) on this CPU. I have plans to fix that someday but other things keep
> jumping in front of this in line.
>
> Does Hetzner offer a newer CPU option? (This CPU is 9 years old).
>
> -ml
>
> >   cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,DTES64,MWAIT,DS-CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,NXE,RDTSCP,LONG,LAHF,PERF,ITSC,SENSOR
> >
> > x240:
> >   hw.model=Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz
> >   cpu0:
> >   FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,DEADLINE,AES,XSAVE,AVX,F16C,RDRAND,NXE,PAGE1GB,RDTSCP,LONG,LAHF,ABM,PERF,ITSC,FSGSBASE,BMI1,AVX2,SMEP,BMI2,ERMS,INVPCID,IBRS,IBPB,STIBP,SENSOR,ARAT
> >
> > Config:
> >   switch "nat" {
> >           interface bridge1
> >   }
> >
> >   vm "test" {
> >           disable
> >           memory 1G
> >           disk "/vm/test.img"
> >
> >           interface { switch "nat" }
> >   }
> >
> > The test.img file is a freshly created file with no OS installed.
> >
> > When starting the vm with debug on the Hetzner server:
> >   frank# vmd -dvvv
> >   startup
> >   /etc/vm.conf:5: switch "nat" registered
> >   vm_register: registering vm 1
> >   /etc/vm.conf:13: vm "test" registered (disabled)
> >   vm_priv_brconfig: interface bridge1 description switch1-nat
> >   vmd_configure: not creating vm test (disabled)
> >   config_setconfig: setting config
> >   config_getconfig: retrieving config
> >   config_getconfig: retrieving config
> >   config_getconfig: retrieving config
> >   vm_opentty: vm test tty /dev/ttyp5 uid 0 gid 4 mode 620
> >   vm_register: registering vm 1
> >   vm_priv_ifconfig: interface tap0 description vm1-if0-test
> >   loadfile_bios: loaded BIOS image
> >   vm_priv_ifconfig: switch "nat" interface bridge1 add tap0
> >   run_vm: initializing hardware for vm test
> >   test: started vm 1 successfully, tty /dev/ttyp5
> >   virtio_init: vm "test" vio0 lladdr fe:e1:bb:d1:e4:39
> >   run_vm: starting vcpu threads for vm test
> >   vcpu_reset: resetting vcpu 0 for vm 33
> >   vmd: cannot reset VCPU 0 - exiting.
> >   vmm_sighdlr: handling signal 20
> >   vmm_sighdlr: attempting to terminate vm 1
> >   terminate_vm: terminating vmid 33
> >   vmm_sighdlr: calling vm_remove
> >   vm_remove: removing vm id 1 from running config
> >   vm_remove: calling vm_stop
> >   vm_stop: stopping vm 1
> >   vmd_dispatch_vmm: handling TERMINATE_EVENT for vm id 1 ret 5
> >   vmd_dispatch_vmm: about to stop vm id 1
> >   vm_stop: stopping vm 1
> >
> > Output from vmctl when starting:
> >   frank# vmctl start test -c
> >   Connected to /dev/ttyp5 (speed 115200)
> >
> >   [EOT]
> >   frank#
> >
> > Cheers,
> > Aaron
> >
> > --
> > PGP: 0x1F81112D62A9ADCE / 3586 3350 BFEA C101 DB1A  4AF0 1F81 112D 62A9 ADCE
> >
>