Skip to content

Commit

Permalink
Merge pull request lima-vm#1261 from AkihiroSuda/vz-remove-spice
Browse files Browse the repository at this point in the history
vz: remove spice
  • Loading branch information
AkihiroSuda committed Dec 23, 2022
2 parents a92ddad + c437a9d commit f8f3a7b
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 f8f3a7b

Please sign in to comment.