IP address is not assigned automatically after VM creation

Discussion in 'Networking Questions' started by Obviouser, Jun 12, 2014.

  1. Obviouser

    Obviouser Bit Poster

    Messages:
    2
    IP address is 0.0.0.0 after VM creation

    Hello!
    As being testing PCS and PVA together I need such plan of VM creation:
    I've created a template based on preinstalled Windows Server 2008 and from bash script I create VM:
    #!/bin/bash
    sshpass -p password ssh -o StrictHostKeyChecking=no root@192.168.1.254 'prlctl clone Template\ of\ Windows_Server_2008 --name '$1''
    sshpass -p password ssh -o StrictHostKeyChecking=no root@192.168.1.254 'prlctl set '$1' --device-set net0 --type routed'
    sshpass -p password ssh -o StrictHostKeyChecking=no root@192.168.1.254 'prlctl start '$1''

    As you can see IP 192.168.1.254 - IP of PCS
    I've configured a node with PVA installed with IP 192.168.1.10, added IP pool with addresses 192.168.1.11 -192.168.1.30
    VM is created successfully but none of ips were assigned from pool, just 0.0.0.0. I go into Hardware settings - Network adapter. My settings are there as they were preconfigured within template:
    ---------------------------------------------
    Enabled - yes
    Connected - yes
    Configure network settings from guest OS - no
    Network Type
    Routed - Bridged(eth0)
    -----------------------------------------------
    I click on submit button, my machine reboots and IP from pool is assigned as it should be during the creation.
    What am I doing wrong as it is not assigned during the creation of VM.
    Thanks in advance for your help
     
  2. Obviouser

    Obviouser Bit Poster

    Messages:
    2
    Hello!
    As being testing PCS and PVA together I need such plan of VM creation:
    I've created a template based on preinstalled Windows Server 2008 and from bash script I create VM:
    #!/bin/bash
    sshpass -p password ssh -o StrictHostKeyChecking=no root@192.168.1.254 'prlctl clone Template\ of\ Windows_Server_2008 --name '$1''
    sshpass -p password ssh -o StrictHostKeyChecking=no root@192.168.1.254 'prlctl set '$1' --device-set net0 --type routed'
    sshpass -p password ssh -o StrictHostKeyChecking=no root@192.168.1.254 'prlctl start '$1''

    As you can see IP 192.168.1.254 - IP of PCS
    I've configured a node with PVA installed with IP 192.168.1.10, added IP pool with addresses 192.168.1.11 -192.168.1.30
    VM is created successfully but none of ips were assigned from pool, just 0.0.0.0. I go into Hardware settings - Network adapter. My settings are there as they were preconfigured within template:
    ---------------------------------------------
    Enabled - yes
    Connected - yes
    Configure network settings from guest OS - no
    Network Type
    Routed - Bridged(eth0)
    -----------------------------------------------
    I click on submit button, my machine reboots and IP from pool is assigned as it should be during the creation.
    What am I doing wrong as it is not assigned during the creation of VM.
    Thanks in advance for your help
     
  3. IP^__^

    IP^__^ Odin Team

    Messages:
    80
    So far IP addresses from IP Pools can only be assigned if you will create the VM from Parallels Virtual Automation, they will not be used automatically if you will create the VM from the commandline.
    Also please keep in mind that you can configure the network settings only for virtual machines that have Parallels Tools installed (otherwise you need to configure the network from guest OS.

    To conclude: your VM template should have preinstalled Parallels Tools + the VM should be created from PVA (or freshly deployed cleanVM from PVA and after that installed Parallels Tools).

    If you need to be able to create VMs from commandline and to have IP addresses assigned from pool you may consider to take a look at PVA API - http://download.swsoft.com/pva/60/docs/en/html/PVA_Agent_XML_API_Reference/

    Also Parallels Cloud Server has it's native feature for templates, such templates are not listed in the VM list, however they can be easily deployed:

    # prlctl list -t
    UUID DIST T NAME
    {bc5c0ae4-2500-4ae1-92ff-a4b568724408} centos VM CentOS 6.4 Clean
    {83294164-e7bd-413d-8ed0-37d446a9be4c} win-2008 VM Template of CleanVZ
    {3a4d3ba3-49ec-4771-93b7-0152102324e9} centos VM Template of centos-5.6-clean

    # prlctl create TestVmCreatedFromTemplate --ostemplate 'CentOS 6.4 Clean'
    Creating the VM on the basis of the CentOS 6.4 Clean template...
    Clone the CentOS 6.4 Clean VM to VM TestVmCreatedFromTemplate...
    Copying hard disk 0 100%

    The VM has been successfully cloned.

    # prlctl list TestVmCreatedFromTemplate
    UUID STATUS IP_ADDR T NAME
    {9973e131-ab06-4d9f-a261-c19e8f2f3631} stopped - VM TestVmCreatedFromTemplate

    For more information you can refer to http://download.parallels.com/doc/pcs/html/Parallels_Cloud_Server_Users_Guide/30201.htm
     

Share This Page