Having seperate directories makes it easier to work multiple images and vms.
This change keeps the current image storage location as ~/virt/images but
moves the domains under the ~/virt/vms directory.
Also adds the -L switch to customize the VM storage location.
* Add check for bridge status file and assume it's a layer 2 bridge if it doesn't exist
* Move known_hosts check inside if condition
* Formatting
* Initial commit for custom runcmd support
* Add r as supported option
* Add option for graphics type
* Quotes
* No autoport with this version of virt-install
* Add listen
* Add option to customize additional user
* Custom port support for graphical console
* Fix typos
* Add verbosity to help
* Fix README text
* Unnecessary quotes
* Add workaround for VNC port number
* Load IMAGEDIR for bats tests, increase sleep before hostname resolution test, fix DISKDIR used by attach-disk function
* Make VM name unique to avoid issues with stale libvirt-nss hostname resolution
* Only set VMNAME if it's not already set
* Missing quote
* Export VMNAME
* Increase sleep to 45 seconds
* Add centos user to ssh command
* Fix description of attach-disk
* Change user-data to multipart MIME archive to allow inclusion of a shell script instead of additional runcmd items fs
* Fix boundary
* Remove comment line I never filled in
* Fix typo
* Fix typo and missing colon
* Add autostart option
* Handle output of autostart
* Redirect
* Use outputn
* Add -a to valid options
- In certain cases, the directory can exist when the domain is not defined.
When calling the 'remove' subfunction, it will now delete the directory as
expected, even if the domain doesn't exist.
- Restarting network alone seems to not work consistently. Stopping/restarting
seems better. Just need the hostname to get sent in the DHCP request to
dnsmasq.
- Fixed restart command for apt systems to "networking"
- Exit if PKGMGR is not set.
- Changed runcmd to list of strings and changed order to avoid to shellify error.
- Run function to set network restart command so that hostname is sent to dnsmasq and libvirt-nss works.
- Change delete_vm() to remove() when overwriting an exiting VM to avoid storage pool creation error.