Virtuozzo 7 was open sourced and available on Amazon EC2 since October 2015.
This document aims to give you a quick overview of steps to setup Virtuozzo on Amazon EC2.
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
1. Quick Start Guide
using
Virtuozzo 7 (β) on AWS EC2
Twitter: @ebiken | ebiken.g@gmail.com
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 1
2. • Virtuozzo 7 is now available on Amazon EC2 since October 2015.
• Announcement:
• https://lists.openvz.org/pipermail/users/2015-October/006548.html
• It is free provided you use t2.micro instance type.
• This document aims to give you a quick overview of steps to setup
Virtuozzo on Amazon EC2.
• Steps was referenced from below OpenVZ wiki.
• Please check the page for further information.
• https://openvz.org/Using_Virtuozzo_in_the_Amazon_EC2
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 2
About this Document
3. • Virtuozzo only supports containers when deployed on Amazon EC2.
• In other words, you can not create VMs on Virtuozzo running on EC2.
• (At least as of today)
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 3
Important notes when using Virtuozzo on AWS EC2
4. 1. Create EC2 (VPC) Instance
• Create instance based on Community AMI (Virtuozzo)
• Configure "Security Groups".
• Create Key Pair.
2. Configuring IP Address for Container
• To access container, you need to configure additional IP addresses.
• Allocate Private address
• Allocate Public (Elastic) IP address and associate with Private address
3. Connecting to the Instance via SSH
4. Create and Configure Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 4
Setting up Virtuozzo on Amazon EC2 : Overview
5. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 5
a. Sign into the AWS web console.
b. Click “EC2”
c. Click “Launch Instance”
6. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 6
a. Chose “Community AMIs”
b. Search for “Virtuozzo”
c. Click “Select”
7. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 7
a. Select “t2.micro” for free try.
b. Click “Review and Launch”
8. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 8
By default, SSH is allowed from
any address.
a. Click “Select”
Change any configuration to your preferred value.
Recommend changing “Security Groups”.
9. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 9
b. Click “Add Rule”
Example to only allow access from the current address.
a. Select “My IP”
IPv4 Address you are currently
accessing from is automatically filled.
10. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 10
a. Click “Launch”
Setting of “Security Groups” was changed.
11. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 11
“Key Pair” creation wizard would start after
clicking “Launch” in previous slide.
12. 1. Create EC2 (VPC) Instance
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 12
a. Select “Create a new key pair”
Create and Download Key Pair (Used later for SSH access)
b. Enter “Key pair name” and “Download Key Pair”
c. Click “Launch Instances”
13. 2. Configuring IP Address for Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 13
To access container, you need to configure additional IP addresses.
• Allocate Private address
• Allocate Public IP address and map with Private address
a. Select “Actions” -> “Networking” -> “Manage Private IP Addresses”
14. 2. Configuring IP Address for Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 14
a. Click “Assign new IP”
b. Click “Yes, Update”
d. Close the dialog window.
c. Address will be assigned.
15. 2. Configuring IP Address for Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 15
a. Click “Elastic IPs”
b. Click “Allocate New Address”
Allocating Public IP Address (Elastic Address)
16. 2. Configuring IP Address for Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 16
a. Select “VPC” (not EC2)
c. Click “Close”
Allocating Public IP Address (Elastic Address)
b. Select “Yes Allocate”
17. 2. Configuring IP Address for Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 17
!! Caution !!
If EC2 was selected, instance would not be
shown in the dialog box when associating it with
instance / private address.
18. 2. Configuring IP Address for Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 18
a. Select “Associate Address”
b. Enter “Instance ID”
Address will be associated.
Associate Public (Elastic) with Private IP Address.
c. Select newly allocated private address
d. Click “Associate”
19. 3. Connecting to the Instance via SSH
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 19
Example of connecting to the Instance via SSH (using TeraTerm)
a. Enter Public IP address of the instance.
b. User = “ec2user” / No Passphrase.
c. Specify “*.pem” file of the “Key Pair”.
d. Click “OK”
20. 4. Create and Configure Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 20
a. Check release. set hostname.
[ec2user@ip-172-30-x-xx ~]$ cat /etc/redhat-release
CloudLinux release 7.1 (Vladimir Komarov)
[ec2user@ip-172-30-x-xx ~]$ cat /etc/parallels-release
Virtuozzo release 7.0.0 (495)
[ec2user@ip-172-30-x-xx ~]$ sudo -i
[root@ip-172-30-x-xx ~]# hostnamectl set-hostname vz7
[root@vz7 ~]# hostnamectl status
Static hostname: vz7
Icon name: computer-vm
Chassis: vm
Machine ID: 85bd28436587402eb9b5ce23627487e7
Boot ID: 587a70b90bcb4d2e9813e03048a0e9c2
Virtualization: xen
Operating System: Virtuozzo release 7.0.0 (495)
CPE OS Name: cpe:/o:virtuozzoproject:vz:7
Kernel: Linux 3.10.0-123.1.2.vz7.5.29
Architecture: x86_64
Check Release
Set hostname
Virtuozzo 7 (β) is based on CloudLinux 7.1, which is based on CentOS7 / RHEL7.
Thus, General Linux commands are identical to above distributions.
21. 4. Create and Configure Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 21
b. Container creation / configuration
[ec2user@vz7 ~]$ prlctl create 100700 --vmtype ct
Creating the Virtuozzo Container...
The Container has been successfully created.
[ec2user@vz7 ~]$ prlctl set 100700 --ipadd 172.30.x.xxx/24
Enable automatic reconfiguration for this network adapter.
Configure venet0 (+) type='routed'
ips='172.30.x.xxx/255.255.255.0 '
Configured venet0 (+) type='routed'
ips='172.30.x.xxx/255.255.255.0 '
The CT has been successfully configured.
[ec2user@vz7 ~]$ prlctl set 100700 --nameserver 8.8.8.8
The CT has been successfully configured.
[ec2user@vz7 ~]$ prlctl set 100700 --hostname ct100700
The CT has been successfully configured.
[ec2user@vz7 ~]$ prlctl start 100700
Starting the CT...
The CT has been successfully started.
Set name server
and hostname
Create container.
(Container ID = 100700 can be
any number above 100)
Set private IP address allocated on
AWS console.
Start container
22. 4. Create and Configure Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 22
c. Check container. Set container password.
[ec2user@vz7 ~]$ sudo -i
[root@vz7 ~]# prlctl list
UUID STATUS IP_ADDR T NAME
{319323f3-7333-4286-98cc-12777e6d9c3c} running 172.30.x.xxx CT 100700
[root@vz7 ~]# prlctl enter 100700
entered into CT
CT-319323f3 /# passwd
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
“prlctl list” will show containers on the host.
Enter container and set password.
(password will be used when SSH to the container)
23. 4. Create and Configure Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 23
d. Login to the container via SSH.
SSH to “Elastic IP” associated with
Private IP address of the container.
User name : root
Passphrase: <the one you set in the container>
No need to specify “*.pem” file.
(Only User name / Passphrase)
25. 4. Create and Configure Container
Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 25
e. Sample output inside Container
[root@ct100700 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
link/void
inet 127.0.0.1/32 scope host venet0
valid_lft forever preferred_lft forever
inet 172.30.x.xxx/24 brd 172.30.0.255 scope global venet0:0
valid_lft forever preferred_lft forever
[root@ct100700 ~]# cat /etc/redhat-release
CentOS release 6.7 (Final)
[root@ct100700 ~]# cat /etc/parallels-release
cat: /etc/parallels-release: No such file or directory
Only “lo” and “venet”.
No “eth” etc having MAC addr.
Running “CentOS 6.7”
(different distribution from the host)
No “/etc/parallels-release”
26. Quick Start Guide using Virtuozzo 7 (beta) on AWS EC2 | 2015/10/31 26
Checkout OpenVZ wiki for more info!!
https://openvz.org/
Feedback to the slides is also welcome.
Twitter: @ebiken | email: ebiken.g@gmail.com
Notes de l'éditeur
Change any configuration to your preferred value.
Recommend changing Security Groups while testing.
Change any configuration to your preferred value.
Recommend changing Security Groups while testing.
Change any configuration to your preferred value.
Recommend changing Security Groups while testing.