Windows Image Build Instructions

Asked by Eric Holland

Good morning. I am trying to follow the instructions on how to build a Windows Image for Murano (located at murano.readthedocs.org for Kilo) and I am having issues.

Specifically the step that talks about running the make command. I receive the following:

cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ sudo make build-root
[sudo] password for cloud:
make: *** No rule to make target `build-root'. Stop.
cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$

Not sure what I'm doing wrong or if there is an issue with these instructions. Any insight would be greatly appreciated.
Thank you in advance
Eric Holland

Question information

Language:
English Edit question
Status:
Answered
For:
Murano Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Igor Yozhikov (iyozhikov) said :
#1
Revision history for this message
Eric Holland (eholland7080) said :
#2

Thank you. I am going thru the readme now. How do I get past the following please?

cloud@build-svr01:~$ sudo echo "${USER} ALL = NOPASSWD: ALL" > /etc/sudoers.d/${USER}
-bash: /etc/sudoers.d/cloud: Permission denied
cloud@build-svr01:~$

Thank you

Revision history for this message
Eric Holland (eholland7080) said :
#3

cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ sh runme.sh --download-requirements
runme.sh: 22: runme.sh: declare: not found
runme.sh: 25: runme.sh: Syntax error: "(" unexpected
cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$

Revision history for this message
Eric Holland (eholland7080) said :
#4

I think i may have figured this out.......
thanks

Revision history for this message
Eric Holland (eholland7080) said :
#5

Issue running ./runme.sh --run

cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ ./runme.sh --run
Checking free space for /var/lib/libvirt/images/vms folder partition...
Checking libvirt network...
Err: Can't build powershell CoreFunctions !

Getting close to getting to create an image. I thank you for your help. :)
Thanks
Eric

Revision history for this message
Ekaterina Chernova (efedorova) said :
#6

we will take a look.
how did you fix the previous problem?

and btw murano official docs is located here now http://docs.openstack.org/developer/murano/

Revision history for this message
Eric Holland (eholland7080) said :
#7

Good morning. Thank you, we are very excited to build a Murano Windows image.

With regards to the previous issue. I switched from running the script from sh rune.sh --{argument} to ./runme.sh --{argument}

Thank you
Eric

Revision history for this message
Eric Holland (eholland7080) said :
#8

Oh and just so you know, I am following the steps outlined in the link Igor sent me above.

https://github.com/openstack/murano-deployment/tree/master/contrib/windows/image-builder

Failing at:

cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ ./runme.sh --run
Checking free space for /var/lib/libvirt/images/vms folder partition...
Checking libvirt network...
Err: Can't build powershell CoreFunctions !

Thank you
Eric

Revision history for this message
Eric Holland (eholland7080) said :
#9

Please let me know if you need any further information.
Thank you
Eric

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#10

Hi,
1) please install zip linux package
2) also please run ./runme.sh --forceinstall-dependencies
3) ./runme.sh --run

Revision history for this message
Eric Holland (eholland7080) said :
#11

Hi Igor
What is the zip Linux package?
I am trying to build murano windows image.
Thank you
Eric

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#12

Hi Eric.
Zip used in Makefile for powershell CoreFunctions, so it is should be installed on Linux where you trying to build windows image.

apt-cache policy zip
zip:
  Installed: 3.0-8
  Candidate: 3.0-8
  Version table:
 *** 3.0-8 0
        500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status

apt-get install zip -y

Revision history for this message
Eric Holland (eholland7080) said :
#13

Thank you Igor.....I was able to past the previous error, but now I have the following, smb.conf is there:

cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ ./runme.sh --run
Checking free space for /var/lib/libvirt/images/vms folder partition...
Checking libvirt network...
Err: File /etc/samba/smb.conf not found!
cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ cd /etc
cloud@build-svr01:/etc$ cd samba
cloud@build-svr01:/etc/samba$ ll
total 32
drwxr-xr-x 3 root root 4096 Dec 18 11:10 ./
drwxr-xr-x 111 root root 4096 Dec 24 09:10 ../
-rw-r--r-- 1 root root 33 Dec 17 17:05 dhcp.conf
-rw-r--r-- 1 root root 8 Aug 13 16:44 gdbcommands
-rw-r--r-- 1 root root 9789 Dec 18 11:10 smb.conf
drwxr-xr-x 2 root root 4096 Aug 13 16:43 tls/
cloud@build-svr01:/etc/samba$

Revision history for this message
Eric Holland (eholland7080) said :
#14

cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ ./runme.sh --check-smb
Configuring local Samba server...
Restarting Samba services...
smbd start/running, process 14041
nmbd start/running, process 14052
Configuring iptables rules...
Mounting Samba share and checking rw access...
Unounting Samba share...
cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ ./runme.sh --run
Checking free space for /var/lib/libvirt/images/vms folder partition...
Checking libvirt network...
Err: File /etc/samba/smb.conf not found!
cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#15

Try to do next:
1) file runme.sh line 512 function run_normal()
change prepare_local_sambaserver -> prepare_local_sambaserver true

2) file config.ini set workdir to avoid using user home dir as part of exported path for samba server.
[default]
workdir=/opt/winimage-builder

Revision history for this message
Eric Holland (eholland7080) said :
#16

Hi Igor
Thank you so much for all of your assistance. I was able to get past the issues above. I am receiving the following, not sure if its normal or what should I be expecting now. Its been showing the activity below for about an hour now. What do I do now? Wait? I hit ctrl-c.

cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ ./runme.sh --show-configured
[win2k12r2] - Windows Server 2012 R2 x86_64(standard)
cloud@build-svr01:~/murano-deployment/contrib/windows/image-builder$ ./runme.sh --run
Checking free space for /var/lib/libvirt/images/vms folder partition...
Checking libvirt network...
Configuring local Samba server...
Restarting Samba services...
smbd start/running, process 28576
nmbd start/running, process 28587
Configuring iptables rules...
Mounting Samba share and checking rw access...
[win2k12r2] - standard - build started at - /var/lib/libvirt/images/vms/w2k12r2-standard...
Domain 'w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae' not exist.
-> Allocating new image file for VM ...
* Image file: '/var/lib/libvirt/images/vms/w2k12r2-standard/w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52caefec-REF.raw', requested size: '40G'
Formatting '/var/lib/libvirt/images/vms/w2k12r2-standard/w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52caefec-REF.raw', fmt=raw size=42949672960
<- done
-> Starting VM ...

Starting install...
Creating domain... | 0 B 00:00
Domain installation still in progress. Waiting for installation to complete.
Domain has shutdown. Continuing.
Starting domain... | 0 B 00:00
Domain installation still in progress. Waiting for installation to complete.
Domain has shutdown. Continuing.
Guest installation complete... restarting guest.
* Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running
* Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running
* Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running
* Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running
* Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#17

Hi Eric.
1) This is normal behavior and could take some time from 20 minutes to 1hr because builder used unattended installation windows feature:
...
Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running
...

2) After installation will be finished(windows vm will be automatically shutdown), script will convert RAW 40Gig image into QCOW2 ~10Gig, and reports to you where you can get final windows image in QCOW2 format on you file system.

N.B.:
1) I believe that you used a bare-metal Linux host with QEMU/KVM running on top for windows image building. Windows is very "hungry" for resources and do not works good in nested(included virtualziation for example KVM in KVM).
2) To access and take a look into building windows VM virtual screen you could use vncviewer with ssh port forwarding or SSVNC
Here you need to find endpoint of VM's virtual display. List your VMs runnign and find you windows VM name :
* virsh list
Get vnc virtual display address:
* virsh vncdisplay VM_NAME
Example output : 127.0.0.1:32
Using vncviewer or ssvnc you could join VM's virtual display and take a look what is going on inside, but do not interrupt any process inside(all image preparation procedure are fully automated)

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#18

Also, image build speed depends on HW resources you are using build procedure(SSD/HDD, CPU, general host workload).

Revision history for this message
Eric Holland (eholland7080) said :
#19

thank you Igor

the server has 32 GB of RAM, dual CPU, 1 TB SATA drive......

it has been at:

Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running

for 4 hours now....going to let it run

Revision history for this message
Eric Holland (eholland7080) said :
#20

Hi Igor
still running.....approx 7 hours........

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#21

Hi Eric.
Could you please join to VM virtual screen and take a look what is going on there , ie - what is on the screen.

Revision history for this message
Eric Holland (eholland7080) said :
#22

Hi Igor
Do you want me to stop the process?

Domain w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae still running

Also...not real familiar with connecting to VM. What is exact process please?

Thank you very much
Eric

Revision history for this message
Eric Holland (eholland7080) said :
#23

Hi Igor
I ran the following. The top two are from my previous attempts, the bottom one is the one still running.

cloud@build-svr01:~$ virsh list
 Id Name State
----------------------------------------------------
 4 w2k12r2-standard-432292d4-abfa-11e5-9d83-d4ae52cae running
 7 w2k12r2-standard-7500202a-ac02-11e5-9011-d4ae52cae running
 10 w2k12r2-standard-d41270be-ad7d-11e5-9b5c-d4ae52cae running

cloud@build-svr01:~$

Revision history for this message
Eric Holland (eholland7080) said :
#24

I ran a virsh shutdown on the top two, 4 and 7. 10 is still running

Revision history for this message
Eric Holland (eholland7080) said :
#25

Ok I got connected to VNC

It is at a Command prompt and says:

Enter the username for '192.168.122.1':

Thanks
Eric

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#26

Hi, please check samba credentials used by you to access your smb share used in image builder

Revision history for this message
Eric Holland (eholland7080) said :
#27

Hi Igor
This is what the Samba portion of the config.ini looks like:

# Samba setup/credentials
[samba]
mode=local
host=192.168.122.1
user=guest
domain=
password=
sharename=image-builder-share

Do you need me to check somewhere else?
Thanks
Eric

Revision history for this message
Eric Holland (eholland7080) said :
#28

Hello
Is the information above adequate or do you require further details?
Thank you in advance
Eric

Revision history for this message
Igor Yozhikov (iyozhikov) said :
#29

Hi Eric
Usually this is enough for setup local smb share with guest account access enabled.
I could try to help with debug of your environment.
Maybe we could arrange online meeting via google hangouts?
Looking forward for your answer.
Thanks
Igor

Can you help with this problem?

Provide an answer of your own, or ask Eric Holland for more information if necessary.

To post a message you must log in.