- 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.
- Aside from the default login, your local user is now added to the VM and you
can ssh to the VM as your local user as well.
- The local user also has sudo privileges.
- This is so that libvirt/dnsmasq have a mapping of the IP->guest_hostname. If
the libvirt-nss package is installed and configured in nsswitch.conf, you can
ssh to guest names by hostname!
- Turns out setting --graphics=none was problematic only for Debian images. It
is now set to --graphics=spice. The Debian 8 openstack image still doesn't
work. I get connection refused on the SSH port. Will keep looking into it.
- noticed with Fedora26 or a more recent version of libvirt that if the storage pool doesn't exist before running virt-install, I started getting the following error:
Error: --disk baz.qcow2,format=qcow2,bus=virtio: 'vols'
In debug mode, the tail end of the traceback was:
File "/usr/share/virt-manager/virtinst/connection.py", line 252, in _cache_new_pool_raw
vollist = self._fetch_cache[self._FETCH_KEY_VOLS]
KeyError: 'vols'
Seems like precreating the storage pool fixes this problem. Without it, running the script a second time would work because the storage pool was created on the first go.
- other refactoring