1
0
mirror of https://github.com/gryf/boxpy.git synced 2026-04-25 21:31:25 +02:00

89 Commits

Author SHA1 Message Date
gryf d7544f52f6 Added run type option to create and rebuild subcommand.
For now, the only mode VirtualBox VM has launched was headless. For
debugging purposes, there were other types allowed using --type switch
for command create and rebuild, while headless will remain the default
one.
2021-08-19 21:09:06 +02:00
gryf 3c43263bb9 Fix clashing version from boxpy and subcommands.
Currently, you could pass long version of '--version' option to either
boxpy itself and subcommands create and rebuild. With this patch proper
context is now detected.
2021-08-19 21:08:34 +02:00
gryf bd59dd378e Added boxpy --version option. 2021-08-13 11:43:33 +02:00
gryf b2a6305728 Add user data file path to info command. 2021-08-13 11:19:34 +02:00
gryf 03b21369e3 Added new option for disabling nested virtualization.
By default, nested virtualization is enabled. It can be disabled by
passing --disable-nested.
2021-08-13 11:14:30 +02:00
gryf 635917faf2 Added ability to listing VMs created by boxpy 2021-07-13 15:54:13 +02:00
gryf 73803e2c4b Fix return value for storageattach method. 2021-07-06 19:51:48 +02:00
gryf 2048455410 Fix issue with undefined port. 2021-07-06 19:50:31 +02:00
gryf 2f7a37aaed Remove silent parameter for poweroff. 2021-07-06 19:50:06 +02:00
gryf 10d7b58ec3 Fixed minor linting issues 2021-07-06 19:48:53 +02:00
gryf 11e3c033c1 Fix for missing default config. 2021-07-05 20:00:38 +02:00
gryf 322e50a8f9 Add support for port passed ports fw. 2021-07-05 20:00:05 +02:00
gryf e324b6771c Pass config object to VBox.create 2021-07-05 19:58:58 +02:00
gryf 9ad861182a Handle forwarding ports mappings in config 2021-07-05 19:45:07 +02:00
gryf b2ef6890ba Added option for forwarding ports. 2021-07-05 18:50:21 +02:00
gryf c23b5f3e49 Handle multiple forwarding ports 2021-07-05 12:39:28 +02:00
gryf e5173c707d Fixed case when there is no user data provided. 2021-07-05 12:08:32 +02:00
gryf be91f6b827 Removed unused variable 2021-07-05 12:07:56 +02:00
gryf 2d83519b1c Minor logging fixes. 2021-06-30 15:31:54 +02:00
gryf 822609504d Added info command. 2021-06-27 19:34:05 +02:00
gryf 21dc3ec2ce Adding extra data 'creator'.
This field would help to distinguish if VM has been created by boxpy, or
manually.
2021-06-27 19:32:18 +02:00
gryf ac47f126c0 Removed surplus get_vm_info call in config. 2021-06-27 19:31:32 +02:00
gryf a975232042 Added additional parameter for get_media_size function. 2021-06-27 19:30:46 +02:00
gryf 7a9336f179 Minor fixes for logging. Removed unused exception classes. 2021-06-27 17:26:06 +02:00
gryf d1481ea02f Added logging messages here and there. Now it should looks better. 2021-06-27 17:17:13 +02:00
gryf a56b76f16d Changing approach with detecting if cloud init finished.
Till now, boxpy was based on the fact, that there was power_state
section, and there was a check if VM is down already. That approach have
their own issues.

Now, there will be no more power-off, there is a check by using
`cloud-init status` command through ssh.

Cleanup/destroy parts has needed some modification, so that there will
be no leftovers from cloud init ISO image.

And finally, there was some tweaks for user-data cloud-init part (mainly
for ssh handling), so that `cloud-init status` will not report phony
errors.
2021-06-26 15:48:43 +02:00
gryf cc4b4da253 Added wrapper on subprocess.run 2021-06-26 11:13:59 +02:00
gryf 82c52030c8 Fixes for log verbosity calculations 2021-06-26 10:35:29 +02:00
gryf ca20f8dbe3 Added colored "logging" with adjusted verbosity. 2021-06-25 20:03:18 +02:00
gryf 8b28914deb Do not overwrite previously set options.
If user doesn't provide options from commandline during rebuild, such
option will be overwritten by those stored in VM XML, even if user
change such option in config file. This commit fixing that.
2021-06-20 14:30:22 +02:00
gryf cbb0c6b5af Change description for create/rebuild and boxpy itself. 2021-06-20 14:29:44 +02:00
gryf 9bae81a993 Removed unneeded condition. 2021-06-20 11:33:24 +02:00
gryf f8f3d3f819 Move setting defaults to Config class. 2021-06-05 20:23:53 +02:00
gryf cd4bc42e54 Added check for already used port. 2021-06-05 20:12:25 +02:00
gryf 5cf00a3e09 Rework port for the ssh forwarding.
Till now, user has to provide port number (by commandline or through
config file), otherwise 2222 will be set. That's unfortunate in case you
need to have multiple machines and forgot about setting the correct
port. In this patch random port will be used if no port is provided.
2021-06-05 19:14:49 +02:00
gryf 81da9d7c13 Added ssh command 2021-06-05 17:54:14 +02:00
gryf 3f8dec1f2d Fix config behavior in case of empty args 2021-06-05 17:09:02 +02:00
gryf 1a058a1e2a Added fedora cloud to supported distros. 2021-06-04 18:39:10 +02:00
gryf de61390d5e Added ability to select distro. Yet, we still have only one ;) 2021-06-04 18:37:03 +02:00
gryf d78ed6db8b Parametrize user information 2021-06-04 16:43:06 +02:00
gryf 38e37f6274 Fixing some linting issues. 2021-06-04 16:38:00 +02:00
gryf 6e84b3befa Process template before reading files into cloud init. 2021-05-19 19:44:30 +02:00
gryf 4a46d793cb Parse filenames in global write_files section 2021-05-17 18:56:44 +02:00
gryf 074025c089 Make temporary files begin with meaningful prefix 2021-05-17 18:55:01 +02:00
gryf c0e4ad966b Add ability to write files to be written on guest by providing filename. 2021-05-14 15:07:57 +02:00
gryf d890f28eba Fixed bash completion for config; added default completion for all other options. 2021-05-14 14:19:00 +02:00
gryf 3b59622a68 Added warning if config file doesn't exists. 2021-05-14 13:46:15 +02:00
gryf f6a458e1f9 Save absolute path to the user config file 2021-05-14 13:45:26 +02:00
gryf 3ebe6ff529 Changing option cloud-config to config 2021-05-14 13:44:17 +02:00
gryf 1e8bd7a37d Do not relay on vboxmanage output.
There is a function which retrieve information about VM by looking on
the 'vboxmanage vminfo' command. The output wasn't consistent, yet it
was fixed recently so that amount of memory was all wrong.

Currently the only thing which is searched for is the VM configuration
path, and all the rest is taken out from the XML VM definition.
2021-05-06 20:53:36 +02:00