Skip to content

Commit

Permalink
vz: remove spice
Browse files Browse the repository at this point in the history
Fix issue 1260

Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Dec 23, 2022
1 parent a92ddad commit c437a9d
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions pkg/vz/vm_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit c437a9d

Please sign in to comment.