Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect virtual cdrom on boot #278

Merged
merged 1 commit into from
Dec 6, 2017
Merged

Connect virtual cdrom on boot #278

merged 1 commit into from
Dec 6, 2017

Conversation

palesiak
Copy link

@palesiak palesiak commented Dec 6, 2017

When cloning a VM, and specifying a virtual cdrom device, it doesn't boot with it connected.

I'm not sure if this PR is the appropriate approach -- maybe it should be a config parameter, however as it currently stands the virtual cdrom functionality does not mimic what was previously in 0.4.x, where it would automatically be connected.

@vancluever vancluever added the bug Type: Bug label Dec 6, 2017
@vancluever
Copy link
Contributor

Hey @palesiak, this looks good I think. I'm just going to add a test and I think we will be good to go.

I don't necessarily want to expose connection flags right now - I'd rather it be either you want a CD device or you don't - same for most virtual devices.

Thanks for catching this one too!

@vancluever
Copy link
Contributor

Just posting test results:

Before (failing on clone as expected):

=== RUN   TestAccResourceVSphereVirtualMachine
=== RUN   TestAccResourceVSphereVirtualMachine/cdrom
=== RUN   TestAccResourceVSphereVirtualMachine/clone_with_cdrom
--- FAIL: TestAccResourceVSphereVirtualMachine (134.50s)
    --- PASS: TestAccResourceVSphereVirtualMachine/cdrom (19.20s)
    --- FAIL: TestAccResourceVSphereVirtualMachine/clone_with_cdrom (115.29s)
    	testing.go:503: Step 0 error: Check failed: Check 2/2 error: expected CDROM device to be connected

After (both pass):

=== RUN   TestAccResourceVSphereVirtualMachine
=== RUN   TestAccResourceVSphereVirtualMachine/cdrom
=== RUN   TestAccResourceVSphereVirtualMachine/clone_with_cdrom
--- PASS: TestAccResourceVSphereVirtualMachine (143.07s)
    --- PASS: TestAccResourceVSphereVirtualMachine/cdrom (19.49s)
    --- PASS: TestAccResourceVSphereVirtualMachine/clone_with_cdrom (123.58s)

👍 Thanks again @palesiak - merging now!

@vancluever vancluever merged commit d2d1a94 into hashicorp:master Dec 6, 2017
vancluever added a commit that referenced this pull request Dec 6, 2017
@palesiak
Copy link
Author

palesiak commented Dec 6, 2017

cool, thanks for adding the test cases @vancluever 🚀

@ghost ghost locked and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants