mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
virt-install: Add '--console none' and '--channel none'
For skipping the default channel and default console behavior
This commit is contained in:
parent
18fa751059
commit
d4103eac26
@ -64,16 +64,6 @@
|
||||
</interface>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes"/>
|
||||
<console type="pty">
|
||||
<target type="virtio"/>
|
||||
</console>
|
||||
<channel type="unix">
|
||||
<source mode="bind"/>
|
||||
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
</channel>
|
||||
<channel type="spicevmc">
|
||||
<target type="virtio" name="com.redhat.spice.0"/>
|
||||
</channel>
|
||||
<video>
|
||||
<model type="qxl"/>
|
||||
</video>
|
||||
@ -143,16 +133,6 @@
|
||||
</interface>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes"/>
|
||||
<console type="pty">
|
||||
<target type="virtio"/>
|
||||
</console>
|
||||
<channel type="unix">
|
||||
<source mode="bind"/>
|
||||
<target type="virtio" name="org.qemu.guest_agent.0"/>
|
||||
</channel>
|
||||
<channel type="spicevmc">
|
||||
<target type="virtio" name="com.redhat.spice.0"/>
|
||||
</channel>
|
||||
<video>
|
||||
<model type="qxl"/>
|
||||
</video>
|
||||
|
@ -466,7 +466,7 @@ c.add_valid("--nodisks --boot hd --paravirt --arch i686") # 32 on 64 xen
|
||||
|
||||
|
||||
c = vinst.add_category("kvm", "--connect %(KVMURI)s --noautoconsole")
|
||||
c.add_compare("--os-variant fedora20 --file %(EXISTIMG1)s --location %(TREEDIR)s --extra-args console=ttyS0 --cpu host", "kvm-f14-url") # F14 Directory tree URL install with extra-args
|
||||
c.add_compare("--os-variant fedora20 --file %(EXISTIMG1)s --location %(TREEDIR)s --extra-args console=ttyS0 --cpu host --channel none --console none", "kvm-f14-url") # F14 Directory tree URL install with extra-args
|
||||
c.add_compare("--os-variant fedora20 --disk %(NEWIMG1)s,size=.01 --location %(TREEDIR)s --extra-args console=ttyS0 --quiet", "quiet-url") # Quiet URL install should make no noise
|
||||
c.add_compare("--cdrom %(EXISTIMG2)s --file %(EXISTIMG1)s --os-variant win2k3 --wait 0 --sound --controller usb", "kvm-win2k3-cdrom") # HVM windows install with disk
|
||||
c.add_compare("--os-variant fedora20 --nodisks --boot hd --paravirt", "kvm-xenner") # xenner
|
||||
|
@ -1756,6 +1756,13 @@ def _parse_char(guest, optstr, dev):
|
||||
opts = parse_optstr(optstr, remove_first="char_type")
|
||||
ctype = opts.get("char_type")
|
||||
|
||||
if ctype == "none" and dev_type == "console":
|
||||
guest.skip_default_console = True
|
||||
return
|
||||
if ctype == "none" and dev_type == "channel":
|
||||
guest.skip_default_channel = True
|
||||
return
|
||||
|
||||
def support_check(dev, paramname, dictname):
|
||||
if type(paramname) is not str:
|
||||
return
|
||||
|
@ -103,6 +103,9 @@ class Guest(XMLBuilder):
|
||||
# Allow virt-manager to override the default graphics type
|
||||
self.default_graphics_type = cliconfig.default_graphics
|
||||
|
||||
self.skip_default_console = False
|
||||
self.skip_default_channel = False
|
||||
|
||||
self._os_variant = None
|
||||
self._random_uuid = None
|
||||
self._install_devices = []
|
||||
@ -519,6 +522,8 @@ class Guest(XMLBuilder):
|
||||
self.add_device(virtinst.VirtualAudio(self.conn))
|
||||
|
||||
def add_default_console_device(self):
|
||||
if self.skip_default_console:
|
||||
return
|
||||
if self.os.is_xenpv():
|
||||
return
|
||||
if self.get_devices("console") or self.get_devices("serial"):
|
||||
@ -558,6 +563,8 @@ class Guest(XMLBuilder):
|
||||
self.add_device(dev)
|
||||
|
||||
def add_default_channels(self):
|
||||
if self.skip_default_channel:
|
||||
return
|
||||
if self.get_devices("channel"):
|
||||
return
|
||||
|
||||
@ -856,6 +863,9 @@ class Guest(XMLBuilder):
|
||||
if chn.type == chn.TYPE_SPICEVMC:
|
||||
return True
|
||||
|
||||
if self.skip_default_channel:
|
||||
return
|
||||
|
||||
if (not has_spice_agent() and
|
||||
self.conn.check_conn_support(
|
||||
self.conn.SUPPORT_CONN_CHAR_SPICEVMC)):
|
||||
|
Loading…
Reference in New Issue
Block a user