lzap / snap-guest

Bash script for quick provisioning of copy-on-write KVM guests
40 stars 19 forks source link

possible bug on parsing the MAC address #16

Closed rplevka closed 7 years ago

rplevka commented 7 years ago

Hello, from time to time we're presented by the following error during setting the MAC address:

2016-12-13 11:50:47 - robottelo.ssh - DEBUG - <<< stdout
Creating snapshot guest 139635740847248.domain.com
Creating snapshot image
Formatting '/opt/robottelo/images/139635740847248.domain.com.img', fmt=qcow2 size=214748364800 backing_file='/var/lib/libvirt/images/rhel72-base.img' encryption=off cluster_size=65536 lazy_refcounts=off 
OS: linux rhel 7 2
Disable fsck startup check for all volumes
Configuring message of the day
Configuring /etc/hosts file
Setting up for Fedora / RHEL
Setting MAC address
Setting hostname
Provisioning guest 139635740847248.domain.com
Hostname: 139635740847248.domain.com
CPUs:     1
Memory:   512 MB
Swap:     512 MB
MAC:      52:54:00:41:f8*

2016-12-13 11:50:47 - robottelo.ssh - DEBUG - <<< stderr
ERROR    Error: --network bridge=br0,mac=52:54:00:41:f8*: MAC address must be of the format AA:BB:CC:DD:EE:FF, was '52:54:00:41:f8*'

Perhaps https://github.com/lzap/snap-guest/blob/98cefa9bd6fd9fda573fd2662b634ddb9bfda4bf/prepare-image.pl#L75 does not conveniently work in all cases?

lzap commented 7 years ago

Please file a patch, I no longer maintain this tool. If you are interested I will make you admin of the repo.