code: func toInstance(vm *model.VM) *instances.Instance {
  	inst := &instances.Instance{
  		Id:             vm.ID,
  		ConfigRevision: vm.Revision,
  		Disks:          make([]*instances.Disk, len(vm.Attributes.Disk)),
  		Drained:        vm.Drained,
  		Hostname:       vm.Hostname,
  		Lifetime:       vm.Lifetime,
  		Project:        vm.Attributes.Project,
  		Swarming:       vm.Swarming,
  		Timeout:        vm.Timeout,
  		Zone:           vm.Attributes.Zone,
  	}
  	for i, d := range vm.Attributes.Disk {
  		inst.Disks[i] = &instances.Disk{
  			Image: d.Image,
  		}
  	}
  	if vm.Created > 0 {
  		inst.Created = &timestamp.Timestamp{
  			Seconds: vm.Created,
  		}
  	}
  	if vm.Connected > 0 {
  		inst.Connected = &timestamp.Timestamp{
  			Seconds: vm.Connected,
  		}
  	}
  	return inst
  }
docs: // toInstance returns an *instances.Instance representation of the given
  // *model.VM.