ubuntu – 如何让FreeNAS响应libvirt关闭请求

前端之家收集整理的这篇文章主要介绍了ubuntu – 如何让FreeNAS响应libvirt关闭请求前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个在Ubuntu Server 10.04上运行的FreeNAS 0.7.1 Shere(修订版5127)的KVM VM,我无法说服VM从主机关闭
  1. virsh shutdown freenas

我希望这会发送一些ACPI?触发VM和FreeNAS,然后执行它所说的.

我不是FreeBSD的基金,所以我真的不知道要用什么软件包或进程来运行它.我试图说服powerd运行,但VM cpu没有所需的freq条目

Sysctl HW

  1. $sysctl hw
  2. hw.machine: amd64
  3. hw.model: QEMU Virtual cpu version 0.12.3
  4. hw.ncpu: 1
  5. hw.byteorder: 1234
  6. hw.physmem: 523116544
  7. hw.usermem: 463806464
  8. hw.pagesize: 4096
  9. hw.floatingpoint: 1
  10. hw.machine_arch: amd64
  11. hw.realmem: 536850432
  12. hw.aac.iosize_max: 65536
  13. hw.amr.force_sg32: 0
  14. hw.an.an_cache_iponly: 1
  15. hw.an.an_cache_mcastonly: 0
  16. hw.an.an_cache_mode: dbm
  17. hw.an.an_dump: off
  18. hw.ata.to: 15
  19. hw.ata.wc: 1
  20. hw.ata.atapi_dma: 1
  21. hw.ata.ata_dma_check_80pin: 1
  22. hw.ata.ata_dma: 1
  23. hw.ath.txbuf: 200
  24. hw.ath.rxbuf: 40
  25. hw.ath.regdomain: 0
  26. hw.ath.countrycode: 0
  27. hw.ath.xchanmode: 1
  28. hw.ath.outdoor: 1
  29. hw.ath.calibrate: 30
  30. hw.ath.hal.swba_backoff: 0
  31. hw.ath.hal.sw_brt: 10
  32. hw.ath.hal.dma_brt: 2
  33. hw.bce.msi_enable: 1
  34. hw.bce.tso_enable: 1
  35. hw.bge.allow_asf: 0
  36. hw.cardbus.cis_debug: 0
  37. hw.cardbus.debug: 0
  38. hw.cs.recv_delay: 570
  39. hw.cs.ignore_checksum_failure: 0
  40. hw.cs.debug: 0
  41. hw.cxgb.snd_queue_len: 50
  42. hw.cxgb.use_16k_clusters: 1
  43. hw.cxgb.force_fw_update: 0
  44. hw.cxgb.singleq: 0
  45. hw.cxgb.ofld_disable: 0
  46. hw.cxgb.msi_allowed: 2
  47. hw.cxgb.txq_mr_size: 1024
  48. hw.cxgb.sleep_ticks: 1
  49. hw.cxgb.tx_coalesce: 0
  50. hw.firewire.hold_count: 3
  51. hw.firewire.try_bmr: 1
  52. hw.firewire.fwmem.speed: 2
  53. hw.firewire.fwmem.eui64_lo: 0
  54. hw.firewire.fwmem.eui64_hi: 0
  55. hw.firewire.phydma_enable: 1
  56. hw.firewire.nocyclemaster: 0
  57. hw.firewire.fwe.rx_queue_len: 128
  58. hw.firewire.fwe.tx_speed: 2
  59. hw.firewire.fwe.stream_ch: 1
  60. hw.firewire.fwip.rx_queue_len: 128
  61. hw.firewire.sbp.tags: 0
  62. hw.firewire.sbp.use_doorbell: 0
  63. hw.firewire.sbp.scan_delay: 500
  64. hw.firewire.sbp.login_delay: 1000
  65. hw.firewire.sbp.exclusive_login: 1
  66. hw.firewire.sbp.max_speed: -1
  67. hw.firewire.sbp.auto_login: 1
  68. hw.mfi.max_cmds: 128
  69. hw.mfi.event_class: 0
  70. hw.mfi.event_locale: 65535
  71. hw.pccard.cis_debug: 0
  72. hw.pccard.debug: 0
  73. hw.cbb.debug: 0
  74. hw.cbb.start_32_io: 4096
  75. hw.cbb.start_16_io: 256
  76. hw.cbb.start_memory: 2281701376
  77. hw.pcic.pd6722_vsense: 1
  78. hw.pcic.intr_mask: 57016
  79. hw.pci.honor_msi_blacklist: 1
  80. hw.pci.enable_msix: 1
  81. hw.pci.enable_msi: 1
  82. hw.pci.do_power_resume: 1
  83. hw.pci.do_power_nodriver: 0
  84. hw.pci.enable_io_modes: 1
  85. hw.pci.host_mem_start: 2147483648
  86. hw.syscons.kbd_debug: 1
  87. hw.syscons.kbd_reboot: 1
  88. hw.syscons.bell: 1
  89. hw.syscons.saver.keybonly: 1
  90. hw.syscons.sc_no_suspend_vtswitch: 0
  91. hw.usb.uplcom.interval: 100
  92. hw.usb.uvscom.interval: 100
  93. hw.usb.uvscom.opktsize: 8
  94. hw.wi.debug: 0
  95. hw.wi.txerate: 0
  96. hw.xe.debug: 0
  97. hw.intr_storm_threshold: 1000
  98. hw.availpages: 127714
  99. hw.bus.devctl_disable: 0
  100. hw.ste.rxsyncs: 0
  101. hw.busdma.total_bpages: 32
  102. hw.busdma.zone0.total_bpages: 32
  103. hw.busdma.zone0.free_bpages: 32
  104. hw.busdma.zone0.reserved_bpages: 0
  105. hw.busdma.zone0.active_bpages: 0
  106. hw.busdma.zone0.total_bounced: 0
  107. hw.busdma.zone0.total_deferred: 0
  108. hw.busdma.zone0.lowaddr: 0xffffffff
  109. hw.busdma.zone0.alignment: 2
  110. hw.busdma.zone0.boundary: 65536
  111. hw.clockrate: 2808
  112. hw.instruction_sse: 1
  113. hw.apic.enable_extint: 0
  114. hw.kbd.keymap_restrict_change: 0
  115. hw.acpi.supported_sleep_state: S3 S4 S5
  116. hw.acpi.power_button_state: S5
  117. hw.acpi.sleep_button_state: S3
  118. hw.acpi.lid_switch_state: NONE
  119. hw.acpi.standby_state: S1
  120. hw.acpi.suspend_state: S3
  121. hw.acpi.sleep_delay: 1
  122. hw.acpi.s4bios: 0
  123. hw.acpi.verbose: 0
  124. hw.acpi.disable_on_reboot: 0
  125. hw.acpi.handle_reboot: 0
  126. hw.acpi.cpu.cx_lowest: C1

流程

  1. $ps ax
  2. PID TT STAT TIME COMMAND
  3. 0 ?? DLs 0:00.00 [swapper]
  4. 1 ?? ILs 0:00.00 /sbin/init --
  5. 2 ?? DL 0:00.08 [g_event]
  6. 3 ?? DL 0:00.29 [g_up]
  7. 4 ?? DL 0:00.33 [g_down]
  8. 5 ?? DL 0:00.00 [crypto]
  9. 6 ?? DL 0:00.00 [crypto returns]
  10. 7 ?? DL 0:00.00 [xpt_thrd]
  11. 8 ?? DL 0:00.00 [kqueue taskq]
  12. 9 ?? DL 0:00.00 [acpi_task_0]
  13. 10 ?? RL 34:12.42 [idle: cpu0]
  14. 11 ?? WL 0:01.13 [swi4: clock sio]
  15. 12 ?? WL 0:00.00 [swi3: vm]
  16. 13 ?? WL 0:00.00 [swi1: net]
  17. 14 ?? DL 0:00.04 [yarrow]
  18. 15 ?? WL 0:00.00 [swi6: task queue]
  19. 16 ?? WL 0:00.00 [swi2: cambio]
  20. 17 ?? DL 0:00.00 [acpi_task_1]
  21. 18 ?? DL 0:00.00 [acpi_task_2]
  22. 19 ?? WL 0:00.00 [swi5: +]
  23. 20 ?? DL 0:00.01 [thread taskq]
  24. 21 ?? WL 0:00.00 [swi6: Giant taskq]
  25. 22 ?? WL 0:00.00 [irq9: acpi0]
  26. 23 ?? WL 0:00.09 [irq14: ata0]
  27. 24 ?? WL 0:00.11 [irq15: ata1]
  28. 25 ?? WL 0:00.57 [irq11: ed0 uhci0]
  29. 26 ?? DL 0:00.00 [usb0]
  30. 27 ?? DL 0:00.00 [usbtask-hc]
  31. 28 ?? DL 0:00.00 [usbtask-dr]
  32. 29 ?? WL 0:00.01 [irq1: atkbd0]
  33. 30 ?? WL 0:00.00 [swi0: sio]
  34. 31 ?? DL 0:00.00 [sctp_iterator]
  35. 32 ?? DL 0:00.00 [pagedaemon]
  36. 33 ?? DL 0:00.00 [vmdaemon]
  37. 34 ?? DL 0:00.00 [idlepoll]
  38. 35 ?? DL 0:00.00 [pagezero]
  39. 36 ?? DL 0:00.01 [bufdaemon]
  40. 37 ?? DL 0:00.00 [vnlru]
  41. 38 ?? DL 0:00.14 [syncer]
  42. 39 ?? DL 0:00.01 [softdepflush]
  43. 1221 ?? Is 0:00.00 /sbin/devd
  44. 1289 ?? Is 0:00.01 /usr/sbin/syslogd -ss -f /var/etc/syslog.conf
  45. 1608 ?? Is 0:00.00 /usr/sbin/cron -s
  46. 1692 ?? Ss 0:00.03 /usr/local/sbin/mDNSResponderPosix -b -f /var/etc/mdn
  47. 1730 ?? S 0:00.43 /usr/local/sbin/lighttpd -f /var/etc/lighttpd.conf -m
  48. 1882 ?? DL 0:00.00 [system_taskq]
  49. 1883 ?? DL 0:00.00 [arc_reclaim_thread]
  50. 4139 ?? S 0:00.03 /usr/local/bin/PHP /usr/local/www/exec.PHP
  51. 4144 ?? S 0:00.00 sh -c ps ax
  52. 4145 ?? R 0:00.00 ps ax
  53. 1816 v0 Is 0:00.01 login [pam] (login)
  54. 1818 v0 I+ 0:00.03 -tcsh (csh)
  55. 1817 v1 Is+ 0:00.00 /usr/libexec/getty Pc ttyv1
  56. 1402 con- I 0:00.00 /usr/local/sbin/afpd -F /var/etc/afpd.conf
  57. 1404 con- S 0:00.00 /usr/local/sbin/cnid_Metad
  58. 1682 con- I 0:02.78 /usr/local/sbin/mt-daapd -m -c /var/etc/mt-daapd.conf
  59. 1789 con- S 0:00.18 /usr/local/bin/fuppesd --config-dir /var/etc --config

Libvert片段

  1. <domain type='kvm'>
  2. <name>freenas</name>
  3. <uuid>********-****-****-****-************</uuid>
  4. <memory>524288</memory>
  5. <currentMemory>524288</currentMemory>
  6. <vcpu>1</vcpu>
  7. <os>
  8. <type arch='x86_64' machine='pc-0.12'>hvm</type>
  9. <boot dev='hd'/>
  10. </os>
  11. <features>
  12. <acpi/>
  13. <apic/>
  14. <pae/>
  15. </features>
  16. <clock offset='utc'/>
  17. <on_poweroff>destroy</on_poweroff>
  18. <on_reboot>restart</on_reboot>
  19. <on_crash>restart</on_crash>
  20. <devices>
  21. <emulator>/usr/bin/kvm</emulator>

这可能吗?理想情况下,我希望能够在不必手动处理关闭VM的情况下停止主机.

我发现这个工作的唯一方法是将-no-kvm-irqchip参数传递给kvm.在libvirt中执行此操作的最简单方法是创建包装脚本(例如/usr/local / bin / kvmbsd)
  1. #!/bin/sh
  2. exec /usr/bin/kvm "$@" -no-kvm-irqchip

并更改libvirt配置中的模拟器行以指向包装器脚本.

在/usr/local / bin目录/ kvmbsd

这允许我干净地关闭(但不重启 – 这似乎没有在libvirt / kvm中实现)我的freebsd基于vms.

猜你在找的Ubuntu相关文章