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

Allow to pass a different url for contacting libvirt #63

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@karmab
Copy link

commented Nov 7, 2017

this adds new parameters:

  • kvm-connection-url (which defaults to qemu:///system)
  • kvm-pool (which defaults to default)

the corresponding attribute (d.ConnectionString), capitalized for that matter is now exposed in the config of the vm (to allow post creation operations on the vm).
uploading of the bootdocker iso and custom image file is done using the libvirt api
additionally , we use an alternative to retrieve the ip of the vm by checking leases server side and also make sure the uploaded image gets properly deleted upon removal of the vm

@karmab karmab force-pushed the karmab:allow_arbitrary_url branch from 3750f9b to 7576d93 Nov 8, 2017

@Vanuan

This comment has been minimized.

Copy link

commented Sep 18, 2018

Is there a prebuilt version with this patch somewhere?

@karmab

This comment has been minimized.

Copy link
Author

commented Sep 18, 2018

@Vanuan

This comment has been minimized.

Copy link

commented Sep 24, 2018

I've just tested it, and it doesn't seem to work:

(testVM2) Creating SSH key...
Error creating machine: Error in driver during machine creation: Panic in the driver: runtime error: invalid memory address or nil pointer dereference
goroutine 45 [running]:
runtime/debug.Stack(0xc4201ab638, 0x4169f7, 0x7f1fe8000ce0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0x79
github.com/docker/machine/libmachine/drivers/rpc.(*StandardStack).Stack(0xd65880, 0x87c600, 0xd10620, 0xd20d40)
	/go/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:23 +0x22
github.com/docker/machine/libmachine/drivers/rpc.trapPanic(0xc4201abae0)
	/go/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:129 +0xa5
panic(0x87c600, 0xd10620)
	/usr/local/go/src/runtime/panic.go:489 +0x2cf
github.com/libvirt/libvirt-go.(*StoragePool).Refresh(0x0, 0xc400000000, 0x7, 0x0)
	/go/src/github.com/libvirt/libvirt-go/storage_pool.go:276 +0x26
github.com/dhiltgen/docker-machine-kvm.(*Driver).Create(0xc420148000, 0x910260, 0xc42003fae0)
	/go/src/github.com/dhiltgen/docker-machine-kvm/kvm.go:446 +0x547
github.com/docker/machine/libmachine/drivers/rpc.(*RPCServerDriver).Create(0xc420136080, 0xd65b50, 0xd65b50, 0x0, 0x0)
	/go/src/github.com/docker/machine/libmachine/drivers/rpc/server_driver.go:140 +0x78
reflect.Value.call(0xc42014a0c0, 0xc420142150, 0x13, 0x8f2820, 0x4, 0xc42003ff20, 0x3, 0x3, 0x2, 0x420144, ...)
	/usr/local/go/src/reflect/value.go:434 +0x91f
reflect.Value.Call(0xc42014a0c0, 0xc420142150, 0x13, 0xc420032720, 0x3, 0x3, 0xc420032718, 0x44efe1, 0xc420068340)
	/usr/local/go/src/reflect/value.go:302 +0xa4
net/rpc.(*service).call(0xc420138580, 0xc4201380c0, 0xc42016a080, 0xc42013ee00, 0xc42015c620, 0x843280, 0xd65b50, 0x16, 0x843280, 0xd65b50, ...)
	/usr/local/go/src/net/rpc/server.go:387 +0x144
created by net/rpc.(*Server).ServeCodec
	/usr/local/go/src/net/rpc/server.go:481 +0x404

My machine version is this:
docker-machine version 0.14.0, build 89b8332

@Vanuan

This comment has been minimized.

Copy link

commented Sep 24, 2018

And I can't delete it:

(testVM2) Failed to fetch machine
Error removing host "testVM2": unexpected EOF
@Vanuan

This comment has been minimized.

Copy link

commented Sep 24, 2018

docker-machine rm -f testVM2 helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.