From c437a9dbf8fdc6c56fcedc4ed049708906d7e9ed Mon Sep 17 00:00:00 2001 From: Akihiro Suda Date: Fri, 23 Dec 2022 14:35:51 +0900 Subject: [PATCH] vz: remove spice Fix issue 1260 Signed-off-by: Akihiro Suda --- pkg/vz/vm_darwin.go | 32 -------------------------------- 1 file changed, 32 deletions(-) diff --git a/pkg/vz/vm_darwin.go b/pkg/vz/vm_darwin.go index 247195aebe2..7747332caae 100644 --- a/pkg/vz/vm_darwin.go +++ b/pkg/vz/vm_darwin.go @@ -118,10 +118,6 @@ func createVM(driver *driver.BaseDriver, networkConn *os.File) (*vz.VirtualMachi return nil, err } - if err = attachConsole(driver, vmConfig); err != nil { - return nil, err - } - if err = attachFolderMounts(driver, vmConfig); err != nil { return nil, err } @@ -328,34 +324,6 @@ func attachDisplay(driver *driver.BaseDriver, vmConfig *vz.VirtualMachineConfigu return nil } -func attachConsole(_ *driver.BaseDriver, vmConfig *vz.VirtualMachineConfiguration) error { - consoleDevice, err := vz.NewVirtioConsoleDeviceConfiguration() - if err != nil { - return err - } - spiceAgentAttachment, err := vz.NewSpiceAgentPortAttachment() - if err != nil { - return err - } - spiceAgentName, err := vz.SpiceAgentPortAttachmentName() - if err != nil { - return err - } - spiceAgentPort, err := vz.NewVirtioConsolePortConfiguration( - vz.WithVirtioConsolePortConfigurationAttachment(spiceAgentAttachment), - vz.WithVirtioConsolePortConfigurationName(spiceAgentName), - ) - if err != nil { - return err - } - - consoleDevice.SetVirtioConsolePortConfiguration(0, spiceAgentPort) - vmConfig.SetConsoleDevicesVirtualMachineConfiguration([]vz.ConsoleDeviceConfiguration{ - consoleDevice, - }) - return nil -} - func attachFolderMounts(driver *driver.BaseDriver, vmConfig *vz.VirtualMachineConfiguration) error { var mounts []vz.DirectorySharingDeviceConfiguration if *driver.Yaml.MountType == limayaml.VIRTIOFS {