Skip to content

Commit

Permalink
vm-control: support creating VMs with multiple network interfaces/sub…
Browse files Browse the repository at this point in the history
…nets.
  • Loading branch information
rgooch committed Dec 8, 2018
1 parent 46ee22b commit b692b09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 8 additions & 7 deletions cmd/vm-control/createVm.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,14 @@ func createVmOnHypervisor(hypervisor string, logger log.DebugLogger) error {
request := hyper_proto.CreateVmRequest{
DhcpTimeout: *dhcpTimeout,
VmInfo: hyper_proto.VmInfo{
Hostname: *vmHostname,
MemoryInMiB: uint64(memory >> 20),
MilliCPUs: *milliCPUs,
OwnerGroups: ownerGroups,
OwnerUsers: ownerUsers,
Tags: vmTags,
SubnetId: *subnetId,
Hostname: *vmHostname,
MemoryInMiB: uint64(memory >> 20),
MilliCPUs: *milliCPUs,
OwnerGroups: ownerGroups,
OwnerUsers: ownerUsers,
Tags: vmTags,
SecondarySubnetIDs: secondarySubnetIDs,
SubnetId: *subnetId,
},
MinimumFreeBytes: uint64(minFreeBytes),
RoundupPower: *roundupPower,
Expand Down
2 changes: 2 additions & 0 deletions cmd/vm-control/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var (
probePortNum = flag.Uint("probePortNum", 0, "Port number on VM to probe")
probeTimeout = flag.Duration("probeTimeout", time.Minute*5,
"Time to wait before timing out on probing VM port")
secondarySubnetIDs flagutil.StringList
secondaryVolumeSizes flagutil.StringList
subnetId = flag.String("subnetId", "",
"Subnet ID to launch VM in")
Expand Down Expand Up @@ -77,6 +78,7 @@ func init() {
"minimum number of free bytes in root volume")
flag.Var(&ownerGroups, "ownerGroups", "Groups who own the VM")
flag.Var(&ownerUsers, "ownerUsers", "Extra users who own the VM")
flag.Var(&secondarySubnetIDs, "secondarySubnetIDs", "Secondary Subnet IDs")
flag.Var(&secondaryVolumeSizes, "secondaryVolumeSizes",
"Sizes for secondary volumes")
flag.Var(&vmTags, "vmTags", "Tags to apply to VM")
Expand Down

0 comments on commit b692b09

Please sign in to comment.