Skip to content

Fix incorrect assumption for bootstrap.iso path#1882

Merged
caglar10ur merged 1 commit intovmware:masterfrom
caglar10ur:iso
Aug 9, 2016
Merged

Fix incorrect assumption for bootstrap.iso path#1882
caglar10ur merged 1 commit intovmware:masterfrom
caglar10ur:iso

Conversation

@caglar10ur
Copy link
Copy Markdown
Contributor

The ISO path that's generated is based off the display name, not the
actual VM folder path. This pr fixes that also removes the hardcoded
appliance.iso file name.

Fixes #1351 2nd time

The ISO path that's generated is based off the display name, not the
actual VM folder path. This pr fixes that also removes the hardcoded
appliance.iso file name.

Fixes #1351 2nd time
@caglar10ur
Copy link
Copy Markdown
Contributor Author

Created #1883 for the integration test part

@fdawg4l
Copy link
Copy Markdown
Contributor

fdawg4l commented Aug 9, 2016

LGTM

@caglar10ur
Copy link
Copy Markdown
Contributor Author

[conur@vir:/opt/go/src/github.com/vmware/vic(iso)] govc datastore.ls ZzZ/*.iso
b.iso
a.iso
[conur@vir:/opt/go/src/github.com/vmware/vic(iso)] govc datastore.download ZzZ/ZzZ.vmx ZzZ.vmx; grep iso ZzZ.vmx
[09-08-16 10:34:30] Downloading... OK
48:ide0:0.fileName = "a.iso"
102:guestinfo./bootstrap_image_path = "[vsanDatastore] 980faa57-97c1-5f89-4578-000c298a9889/b.iso"
[conur@vir:/opt/go/src/github.com/vmware/vic(iso)]

return nil, err
}
cdrom = devices.InsertIso(cdrom, fmt.Sprintf("[%s] %s/appliance.iso", conf.ImageStores[0].Host, d.vmPathName))
cdrom = devices.InsertIso(cdrom, fmt.Sprintf("[%s] %s/%s", conf.ImageStores[0].Host, d.vmPathName, settings.ApplianceISO))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we be using the actual path of the appliance VM rather than composing in this fashion. It'll currently work because we use ImageStores[0] as the applianceVM datastore, but if that ever changes then this will break.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conf.ImageStores[0] used everywhere in the vic-machine code so will open a issue to address that if needed

@hickeng
Copy link
Copy Markdown
Contributor

hickeng commented Aug 9, 2016

LGTM other than future proofing.

@emlin
Copy link
Copy Markdown
Contributor

emlin commented Aug 9, 2016

Caglar, this change is good.
Just wondering if we should custom the iso files in datastore.
I mean we uploaded the file here https://github.com/vmware/vic/blob/master/lib/install/management/create.go#L122, with the filename from local file system, would it be better to use "appliance.iso" and "bootstrap.iso" during uploading, no matter how user name them?
then we could assume them in our code as a constant name.

@caglar10ur caglar10ur deleted the iso branch November 29, 2016 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect formulation of bootstrap iso path

5 participants