mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-03-08 04:58:29 +03:00
Add bhyve support
Allow connection to bhyve using bhyve:///system URI. That is disabled by default and could be enabled using the new configure option 'with-bhyve'.
This commit is contained in:
parent
35c9afad45
commit
05df5a6484
5
setup.py
5
setup.py
@ -324,6 +324,8 @@ class configure(Command):
|
||||
"Hide config bits that are not considered stable (default=no)"),
|
||||
("default-graphics=", None,
|
||||
"Default graphics type (spice or vnc) (default=spice)"),
|
||||
("with-bhyve=", None,
|
||||
"whether enable Bhyve connection support (default=no)"),
|
||||
|
||||
]
|
||||
description = "Configure the build, similar to ./configure"
|
||||
@ -341,6 +343,7 @@ class configure(Command):
|
||||
self.preferred_distros = None
|
||||
self.stable_defaults = None
|
||||
self.default_graphics = None
|
||||
self.with_bhyve = None
|
||||
|
||||
|
||||
def run(self):
|
||||
@ -364,6 +367,8 @@ class configure(Command):
|
||||
self.stable_defaults)
|
||||
if self.default_graphics is not None:
|
||||
template += "default_graphics = %s\n" % self.default_graphics
|
||||
if self.with_bhyve is not None:
|
||||
template += "with_bhyve = %s\n" % self.with_bhyve
|
||||
|
||||
file(cliconfig.cfgpath, "w").write(template)
|
||||
print "Generated %s" % cliconfig.cfgpath
|
||||
|
@ -161,6 +161,7 @@ class vmmConfig(object):
|
||||
self.libvirt_packages = cliconfig.libvirt_packages
|
||||
self.askpass_package = cliconfig.askpass_package
|
||||
self.default_graphics_from_config = cliconfig.default_graphics
|
||||
self.with_bhyve = cliconfig.with_bhyve
|
||||
self.cli_usbredir = None
|
||||
|
||||
self.default_storage_format_from_config = "qcow2"
|
||||
|
@ -32,7 +32,8 @@ from virtManager.baseclass import vmmGObjectUI
|
||||
(HV_QEMU,
|
||||
HV_XEN,
|
||||
HV_LXC,
|
||||
HV_QEMU_SESSION) = range(4)
|
||||
HV_QEMU_SESSION,
|
||||
HV_BHYVE) = range(5)
|
||||
|
||||
(CONN_SSH,
|
||||
CONN_TCP,
|
||||
@ -153,6 +154,8 @@ class vmmConnect(vmmGObjectUI):
|
||||
model.append(["Xen"])
|
||||
model.append(["LXC (Linux Containers)"])
|
||||
model.append(["QEMU/KVM user session"])
|
||||
if self.config.with_bhyve:
|
||||
model.append(["Bhyve"])
|
||||
combo.set_model(model)
|
||||
uiutil.set_combo_text_column(combo, 0)
|
||||
|
||||
@ -364,6 +367,8 @@ class vmmConnect(vmmGObjectUI):
|
||||
hvstr = "xen"
|
||||
elif hv == HV_QEMU or hv == HV_QEMU_SESSION:
|
||||
hvstr = "qemu"
|
||||
elif hv == HV_BHYVE:
|
||||
hvstr = "bhyve"
|
||||
else:
|
||||
hvstr = "lxc"
|
||||
|
||||
@ -385,7 +390,7 @@ class vmmConnect(vmmGObjectUI):
|
||||
hoststr += addrstr + "/"
|
||||
|
||||
uri = hvstr + hoststr
|
||||
if hv == HV_QEMU:
|
||||
if hv in (HV_QEMU, HV_BHYVE):
|
||||
uri += "system"
|
||||
elif hv == HV_QEMU_SESSION:
|
||||
uri += "session"
|
||||
|
@ -88,3 +88,4 @@ hv_packages = _split_list(_get_param("hv_packages", ""))
|
||||
askpass_package = _split_list(_get_param("askpass_packages", ""))
|
||||
libvirt_packages = _split_list(_get_param("libvirt_packages", ""))
|
||||
default_graphics = _get_param("default_graphics", "spice")
|
||||
with_bhyve = bool(int(_get_param("with_bhyve", "0")))
|
||||
|
Loading…
x
Reference in New Issue
Block a user